星期五, 6月 16, 2017

Data Guard RMAN delete Archive log policy 注意事項

Data Guard RMAN delete Archive log policy 注意事項

For 11g版本以後 :
1.記得在Primary/ Standby db 加上 CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY; 否則archive log 在standby db : ASM DISKGROUP RECO 會滿,
無法以rman delete expired archivelog all; 指令進行清除

2.記得在Primary/ Standby db 加上_log_deletion_policy='ALL';  第一點才會正常的運作work.
   SQL>  alter system set "_log_deletion_policy"='ALL' scope=spfile;

因為Primary DB / Standby DB都有角色切換的機會, 所以都要進行設定.

ref:
https://justiono.wordpress.com/2010/04/25/archivelog-files-deletion-policy-in-data-guard-environment/
http://jaychu649.blogspot.tw/2012/01/oracle-11g-active-dataguard-config_18.html
http://jaychu649.blogspot.tw/2011/11/archive-log.html

星期四, 6月 15, 2017

[轉載] ASM Disk Header 備份與還原

Ref:

--
1. dd備份恢復

備份表決磁片:
dd if=/dev/raw/raw3 of=/tmp/votedisk_lhr.bak bs=1024k count=4
恢復表決磁片:
dd if=/tmp/votedisk_lhr.bak of=/dev/raw/raw3 bs=1024k count=4

註:11g不推薦使用dd來進行備份恢復ASM Disk Header一般是前4K

2. kfed恢復ASM Disk Header

dd if=/dev/rhdisk2 of=/asm_rhdisk2_dd.bak bs=1024 count=4
dd if=/dev/zero of=/dev/rhdisk2 bs=1024 count=4
kfed repair /dev/rhdisk2
關於kfedkfodamdu的更多內容可以參考:http://blog.itpub.net/26736162/viewspace-1694198/

3. md_backupmd_restoreASM Disk Header (11g 以後可以透過md_backup方式來備份ASM disk header)


asmcmd md_backup /oracle/app/11.2.0/grid/cdata/ZFTPCCDB-crs/asm_md_backup.bak
asmcmd md_restore /oracle/app/11.2.0/grid/cdata/ZFTPCCDB-crs/asm_md_backup.bak


#坊間謠傳ASM Disk Header4K , 請在您的test environment實際測試過
dd if=/dev/rhdisk2 of=/asm_rhdisk2_dd.bak bs=1024k count=4
dd if=/dev/zero of=/dev/rhdisk2 bs=1024k count=4
crsctl stop has -f
crsctl start has
ASMCMD [+] > startup force nomount;
ASMCMD [+] > md_restore /asm_rhdisk2_dd.bak


ASMCMD [+] > md_backup /rman/asm_md.bak
dd if=/dev/zero  of=/dev/rhdisk2 bs=1024 count=4
crsctl stop has -f
crsctl start has
ASMCMD [+] > startup force nomount;
ASMCMD [+] > md_restore /rman/asm_md.bak


關於md_backupmd_restore更多內容可以參考:http://blog.itpub.net/26736162/viewspace-2121309/

[轉載] Mount ASM diskgroups with new ASM instance

Mount ASM diskgroups with new ASM instance

Ref:

ASM Disks 透過Storage Snapshot mirror 到異機去, 而異機上面沒有任何duplicated OS環境,
會需要透過一些特殊手法讓新安裝的Grid Infrastructure 認到ASM LUN Header, 進而掛載並讀取裡面的資料檔案

# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
# oracleasm listdisks
DISK1
DISK2
DISK3
DISK4
DISK5
FRA1

Install "Oracle Grid Infrastructure software only" option

After installation finished run noted perl script as root to configure Grid Infrastructure for a Stand-Alone server.
For my configuration script looks like this:
To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/11.2.0.1/grid/perl/bin/perl -I/u01/app/11.2.0.1/grid/perl/lib -I/u01/app/11.2.0.1/grid/crs/install /u01/app/11.2.0.1/grid/crs/install/roothas.pl

Start cssd if it's not running.

# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        OFFLINE OFFLINE
ora.diskmon
      1        OFFLINE OFFLINE
# ./crs_start ora.cssd
Attempting to start `ora.cssd` on member `asterix`
Attempting to stop `ora.diskmon` on member `asterix`
Stop of `ora.diskmon` on member `asterix` succeeded.
Attempting to start `ora.diskmon` on member `asterix`
Start of `ora.diskmon` on member `asterix` succeeded.
Start of `ora.cssd` on member `asterix` succeeded.

手動再 $GRID_HOME/dbs 下編輯init+ASM.ora
*.asm_diskstring='/dev/oracleasm/disks'
*.asm_power_limit=1
*.diagnostic_dest='/u01/app/grid'
*.instance_type='asm'
*.large_pool_size=12M
*.remote_login_passwordfile='EXCLUSIVE'

Register and start ASM instance.

$ export ORACLE_SID=+ASM
$ export ORACLE_HOME=/u01/app/11.2.0.1/grid
$ srvctl add asm -p $ORACLE_HOME/dbs/init+ASM.ora
$ srvctl start asm
$ srvctl status asm
ASM is running on asterix

./asmca

Click "Mount all" to mount them all.


Install Oracle database software and create parameter file in "$ORACLE_HOME/dbs" to start database.
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
$ export ORACLE_SID=ora11gr2

$ cd $ORACLE_HOME/dbs
$ cat initora11gr2.ora
*.spfile='+DATA1/ora11gr2/spfileora11gr2.ora'

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Oct 29 14:29:37 2014

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area  668082176 bytes
Fixed Size                  2216344 bytes
Variable Size             222301800 bytes
Database Buffers          436207616 bytes
Redo Buffers                7356416 bytes
Database mounted.
Database opened.
SQL>
SQL>
SQL> select name from v$datafile;

NAME
--------------------------------------------------------------------------------
+DATA1/ora11gr2/datafile/system.297.844627929
+DATA1/ora11gr2/datafile/sysaux.265.844627967
+DATA1/ora11gr2/datafile/undotbs1.266.844627991
+DATA1/ora11gr2/datafile/users.267.844628031
+DATA2/ora11gr2/datafile/marko.261.859213577

Database is successfully opened and you can register instance using SRVCTL command.
$ srvctl add database -d $ORACLE_SID -o $ORACLE_HOME -p $ORACLE_HOME/dbs/initora11gr2.ora
$ srvctl start database -d $ORACLE_SID

Final status.
$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA1.dg
               ONLINE  ONLINE       asterix
ora.DATA2.dg
               ONLINE  ONLINE       asterix
ora.FRA1.dg
               ONLINE  ONLINE       asterix
ora.asm
               ONLINE  ONLINE       asterix                  Started
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       asterix
ora.diskmon
      1        ONLINE  ONLINE       asterix
ora.ora11gr2.db
      1        ONLINE  ONLINE       asterix                  Open






星期四, 6月 08, 2017

OEM 13c Cloud Control 如何刪掉已經連不上的主機

Ref:
OEM 13c : Remove Target with EMCLI Terminal session
https://dbafaq.wordpress.com/2016/03/15/oem-13c-remove-target-with-emcli-terminal-session/

主要是因為DB資料庫設備搬遷以後, 舊的IP已經連接不到主機了
所以需要透過指令方式刪掉該台主機

[oracle@oem_server bin]$ /u01/app/oracle/product/oms/bin/emcli login -username=sysman
Enter password

Login successful
[oracle@oem_server bin]$ ./emcli get_targets |grep 10.
-bash: ./emcli: No such file or directory
[oracle@oem_server bin]$ /u01/app/oracle/product/oms/bin/emcli get_targets |grep 192.168
4       Agent Unreachab  host                  192.168.0.x                                           
4       Agent Unreachab  oracle_emd            192.168.0.x:3872                 
1       Up               oracle_emd            

[oracle@oem_server bin]$ /u01/app/oracle/product/oms/bin/emcli delete_target -name="192.168.0.x" -type="host" -delete_monitored_targets
Host target cannot be deleted via this command. Host target can only be removed
when decommissioning an Agent from Enterprise Manager.

Follow these steps to decommission the Agent, which removes all targets,
including host monitored by it:
1. Navigate to the Agents home page.
2. Decommission the Agent via clicking on Agent -> Target Setup -> Agent
Decommission.
[oracle@oem_server bin]$ /u01/app/oracle/product/oms/bin/emcli delete_target -name="192.168.0.x:3872" -type="oracle_emd" -delete_monito
red_targets
Target "192.168.0.x:3872:oracle_emd" deleted successfully
[oracle@oem_server bin]$


最後再回到OEM 13c畫面, 從[Targets] ->[All Targets]去搜尋該台主機
發現已經成功拿掉了.

[Oracle VM 3.4] 如何Reset OVM Manager 與 OVS Server

[Oracle VM 3.4] 如何Reset OVM Manager OVS Server (清除所有VM內部的組態 : dbpool, dbpool_VIP, VM repository, Network...etc)

 

1.備份OVMM 上面的組態

[root@ovmm ~]# cat /u01/app/oracle/ovm-manager-3/.config

DBTYPE=MySQL

DBHOST=localhost

SID=ovs

LSNR=49500

OVSSCHEMA=ovs

APEX=8080

WLSADMIN=weblogic

OVSADMIN=admin

COREPORT=54321

UUID=0004fb0000010000b6da2e8330b1856b

BUILDID=3.4.2.1384

 

[root@ovmm sysconfig]# cat /etc/sysconfig/ovmm

JVM_MEMORY_MAX=4096m

JVM_MAX_PERM=512m

RUN_OVMM=YES

DBBACKUP=/u01/app/oracle/mysql/dbbackup

DBBACKUP_CMD=/opt/mysql/meb-3.12/bin/mysqlbackup

UUID=0004fb0000010000b6da2e8330b1856b

 

2.備份OVMM上面的MySQL Database

[root@ovmm sysconfig]# /u01/app/oracle/ovm-manager-3/ovm_tools/bin/BackupDatabase -w

Enter your OVM Manager username: admin

Enter your OVM Manager password:

 

INFO:  Backup job starting with destination:

        /u01/app/oracle/mysql/dbbackup/ManualBackup-20170606_211402

 

        Job Id   = 'Start Backup to: ManualBackup(1496754841989)

Uri: https://localhost:7002/ovm/core/wsapi/rest/Job/14967548419

89'

        Job Name = 'Start Backup to: ManualBackup'

 

INFO:  Backup job finished

 

[root@ovmm sysconfig]#

 

 

(optional) 如果要回復OVMM DB , 方法如下

-----------------------------------------------------------------------------------

Restore :

20170606_211402

su - oracle

bash /u01/app/oracle/ovm-manager-3/ovm_tools/bin/RestoreDatabase.sh ManualBackup-20170606_211402

 

 

#打包備份檔案用, 如果要migration OVMM DB, 需要Copy這個資料夾到其他機器

#tar -zcvf ovmmdb_bak.tar.gz /u01/app/oracle/mysql/dbbackup/ManualBackup-20170606_211402/*

-----------------------------------------------------------------------------------

 

service ovmm stop

service ovmcli stop

 

 

 

[root@ovmm ~]# sh /u01/app/oracle/ovm-manager-3/bin/ovm_upgrade.sh --deletedb --dbsid=ovs --dbpass=Welcome1 --dbport=49500

 

COMMAND: /u01/app/oracle/ovm-manager-3/ovm_upgrade/bin/ovm_upgrade.sh --deletedb --dbsid=ovs --dbpass=Welcome1 --dbport=49500

 

Copying deleted classes files to patch path location

2017-06-06 21:29:19,581  INFO Oracle OVM Manager Upgrade Processor

2017-06-06 21:29:19,582  INFO

Jun 06, 2017 9:29:20 PM oracle.security.jps.JpsStartup start

INFO: Jps initializing.

Jun 06, 2017 9:29:21 PM oracle.security.jps.JpsStartup start

INFO: Jps started.

2017-06-06 21:29:21,415  INFO Upgrade Initialization Starting

2017-06-06 21:29:21,508  INFO Oracle Distributed Object Fabric (ODOF): Copyright (C) 2007, 2016 Oracle.  All rights reserved.

2017-06-06 21:29:21,514  INFO ODOF Version: 1.3.1.4

2017-06-06 21:29:21,514  INFO Initializing...

2017-06-06 21:29:22,384  INFO Initialization Complete

2017-06-06 21:29:22,385  INFO Upgrade Initialization Complete

2017-06-06 21:29:22,385  INFO Database Wipe Starting

2017-06-06 21:29:22,386  INFO Wiping Exchange

2017-06-06 21:29:22,410  INFO Initializing / Clearing Database Tables

2017-06-06 21:29:23,583  INFO Wiping Complete!

2017-06-06 21:29:23,584  INFO Database Wipe Complete

 

service ovmcli start

service ovmm stop

 

#生成新的憑證 (admin/ Welcome1 for OVM console : https://ovmm:7002/ovm/console )

sh /u01/app/oracle/ovm-manager-3/bin/configure_client_cert_login.sh

service ovmm start

 

至此, OVMM 的組態已經清空

 

3.Reset OVS db

已實際在Oracle VM 3.4 上面實際測試成功

 

ref: http://ask.chinaunix.net/question/785390

 

Oracle VM server 如何刪除vm manager的管理

登入OVS作業系統上,停止ovs-agent

# service ovs-agent stop

刪除ovs-agent-db

# mv /etc/ovs-agent/db /etc/ovs-agent/db.bak

啟動ovs-agent

# service ovs-agent start

 

接著登入到OVMM Console , OVMM [Servers and VMs] Tab discovery OVS主機即可

星期三, 6月 07, 2017

如何刪除vm manager對Oracle VM server的管理

已實際在Oracle VM 3.4 上面實際測試成功

ref: http://ask.chinaunix.net/question/785390

Oracle VM server 如何刪除vm manager的管理
登陸OVS作業系統上,停止ovs-agent
# service ovs-agent stop
刪除ovs-agent-db
# mv /etc/ovs-agent/db /var/tmp/db.bak
啟動ovs-agent
# service ovs-agent start

OVM 介面登入後, discovery 該OVS Server即可

星期四, 6月 01, 2017

OVM 3.4.x 一些有用的管理文件

1.Provisioning ISO Files for PVM Guest Installations
http://docs.oracle.com/cd/E64076_01/E64083/html/vmadm-config-iso-provisioning.html

2.Oracle VM: How To Change Hostname or IP Address of Oracle VM Manager Host or Oracle VM Server (Doc ID 1595344.1)

3.Backup OVS Server Configuration : /etc/multipathd.conf , /etc/resolv.conf , /etc/ntpd.conf

4.
 4.1 Backup Guest VM (關機備份)

Oracle VM: How To Backup And Restore A VM Guest (domU) Domain On Oracle VM 3.x (Doc ID  1477421.1)

 4.2 How to create a new VM Template from an exiting VM
  https://www.youtube.com/watch?v=enAPCmU8Rj8

5.Backup and restore Oracle VM Manager

 Import VM template
 ref:  
 https://technology.amis.nl/2013/09/16/quick-easy-migrate-vm-from-oracle-vm-2-x-to-3-2-3/

 Click on 'Import VM Template'

 Provide the url to the img and vm.cfg files

  Put them all together in the the ‘VM Template URL's box of the Import window.

  http://10.x.x.10/System.img
  http://10.x.x.10/u01.img
  http://10.x.x.10/vm.cfg

6. Virtual Machine Backup Options
http://docs.oracle.com/cd/E64076_01/E64083/html/vmadm-backup-restore-vm.html

星期三, 5月 31, 2017

Oracle VM 3 如何線上 add CPU / add memory

特別是在Oracle VM online document沒有看到太多文件, 因為知道OVM是基於Xen Server

去改的, 所以就上網找一下關於Xen Server的步驟啦...

 

[root@ ovs01 ~]# xm list

Name                                        ID   Mem VCPUs      State   Time(s)

0004fb0000069991df26eff8            76 2300     6     -b----   2443.8

Domain-0                                     0 11474    20     r----- 266098.2

xm mem-set 0004fb0000069991df26eff8 4500  (單位為 MB, 把記憶體從2300MB 放大到4500MB)

 

xm list

vcpu-set 0004fb0000069991df26eff8 16 (CPU 6 vCPU 放大到16 vCPU)

 

 

--

Ref

How to Hot Add/Remove Memory from a Xen Domain

http://backdrift.org/xen-memory-hot-add-and-remove

 

How to Hot Add/Remove VCPUs from a Xen Domain

http://backdrift.org/how-to-hot-addremove-vcpus-from-a-xen-domain

[Oracle Linux 6.8 ] ASMCA時發現無法順利create ASM DISKGROUP

今天在Oracle Linux 6.8 安裝完畢後, ASMCA時發現無法順利create ASM DISKGROUP, 且發生ORA 7445 , ORA 600等相關的錯誤

Alert_+ASM.log 發現
Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0xFFFFFFFFFFFFFFF0] [PC:0xBBB6283, kghalf()+259] [flags: 0x0, count: 1]
Errors in file /u01/app/oracle/diag/asm/+asm/+ASM/trace/+ASM_ora_16372.trc  (incident=169):
ORA-07445: exception encountered: core dump [kghalf()+259] [SIGSEGV] [ADDR:0xFFFFFFFFFFFFFFF0] [PC:0xBBB6283] [Address not mapped to object] []
Incident details in: /u01/app/oracle/diag/asm/+asm/+ASM/incident/incdir_169/+ASM_ora_16372_i169.trc

Errors in file /u01/app/oracle/diag/asm/+asm/+ASM/trace/+ASM_ora_16774.trc  (incident=2089):
ORA-00600: internal error code, arguments: [kfdds::badaddr], [0x7F3894182108], [], [], [], [], [], [], [], [], [], []
Incident details in: /u01/app/oracle/diag/asm/+asm/+ASM/incident/incdir_2089/+ASM_ora_16774_i2089.trc
Use ADRCI or Support Workbench to package the incident.

解決方法
參考以下兩篇, 就可以正常create asm disks
Oracle Linux 6 - ASM Instances Fail with 4K Sector Size LUN (Doc ID 2211975.1)
New Block Size Feature for OracleASM and oracleasm-support (Doc ID 1530578.1)
看起來是新的ASM RPM (oracleasm-support-2.1.8-1.el6.x86_64) 需要調整一個參數 ORACLEASM_USE_LOGICAL_BLOCK_SIZE ASM(512 byte block) 配合Storage 使用的block size(4K block) (常發生於Storage Block Size : 4K 或是All SSD的設備)

Step 1.
# oracleasm configure -p
Writing Oracle ASM library driver configuration: done
[root@tpechdrdb01 ~]# oracleasm configure | grep ORACLEASM_USE_LOGICAL_BLOCK_SIZE
ORACLEASM_USE_LOGICAL_BLOCK_SIZE="true"

Step 2.
vi /etc/sysconfig/oracleasm
set ORACLEASM_USE_LOGICAL_BLOCK_SIZE="true"

Step 3.
Reboot

--
其他參考link
 http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html

  The Oracle ASMLib kernel driver is now included in the Unbreakable Enterprise Kernel.  No driver package needs to be installed when using this kernel.

--


来源于:  CRS Not Able to Discover Voting Disk after Kernel and Module kmod-oracleasm Upgrade (文档 ID 1994371.1)

适用于:
Linux 6.0
以及更新版本
Linux x86-64bit

症状:

使用如下的参数来配置的asmlib:
[html] view plain copy
  1. ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true   

linux kernelkmod-oracleasm 2.0.6.rh1-2.el6.x86_64 升级到 2.0.8-4.el6_6.x86_64之后,CRS不能发现voting disk
[html] view plain copy
  1. 2015-03-24 03:59:47.421: [ CSSD][2286941952]clssnmvDiskVerify: discovered a potential voting file  
  2. 2015-03-24 03:59:47.421: [ SKGFD][2286941952]Handle 0x7feb7813ddf0 from lib :ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so: for disk :ORCL:OCRVOTE11:  
  3.   
  4. 2015-03-24 03:59:47.422: [ CSSD][2286941952]clssnmvDiskVerify: TOC format mismatch expected(0x634c7373 0x546f636b), found(0x0000 0x0000)  
  5. 2015-03-24 03:59:47.422: [ SKGFD][2286941952]Lib :ASM:/opt/oracle/extapi/64/asm/orcl/1/libasm.so: closing handle 0x7feb7813ddf0 for disk :ORCL:OCRVOTE11:  
变化:
Linux kernel
升级之后,kmod-oracleasm 2.0.6.rh1-2.el6.x86_64 升级到 2.0.8-4.el6_6.x86_64.

原因:
对于disk来说,有两种block size:
[html] view plain copy
  1. •logical block size  
  2. •physical block size  

对于传统的disk,linux,这两种block size均为512Bytes

现在越来越多的disk physical block size等于4096,但是logical block size 依然是512

比如:
[html] view plain copy
  1. # grep "" /sys/block/sdag/queue/*block_size  
  2. /sys/block/sdag/queue/logical_block_size:512  
  3. /sys/block/sdag/queue/physical_block_size:4096  

在老的配置中, kmod-oracleasm-2.0.6.rh1-2.el6.x86_64 不支持在 ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true 这个选项(该选项在/etc/sysconfig/oracleasm文件中).
因此,即使 ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true ,oracleasmsector size4096,而不是512
[html] view plain copy
  1. $ modinfo ./kmod-oracleasm-2.0.6.rh1-2.el6.x86_64/lib/modules/2.6.32-358.el6.x86_64/extra/oracleasm/oracleasm.ko  
  2. filename:       ./kmod-oracleasm-2.0.6.rh1-2.el6.x86_64/lib/modules/2.6.32-358.el6.x86_64/extra/oracleasm/oracleasm.ko  
  3. description:    Kernel driver backing the Generic Linux ASM Library.  
  4. author:         Joel Becker <joel.becker@oracle.com>  
  5. version:        2.0.6  
  6. license:        GPL  
  7. srcversion:     B6C06FFEF593E8060B7BFEE  
  8. depends:          
  9. vermagic:       2.6.32-358.el6.x86_64 SMP mod_unload modversions  


但是,新的驱动kmod-oracleasm-2.0.8-4.el6_6.x86_64确实支持该参数
[html] view plain copy
  1. $ modinfo ./kmod-oracleasm-2.0.8-4.el6_6.x86_64/lib/modules/2.6.32-504.1.3.el6.x86_64/extra/oracleasm/oracleasm.ko  
  2. filename:       ./kmod-oracleasm-2.0.8-4.el6_6.x86_64/lib/modules/2.6.32-504.1.3.el6.x86_64/extra/oracleasm/oracleasm.ko  
  3. description:    Kernel driver backing the Generic Linux ASM Library.  
  4. author:         Joel Becker <joel.becker@oracle.com>  
  5. version:        2.0.8  
  6. license:        GPL  
  7. srcversion:     223CD1891C9BE8AFC0A0E76  
  8. depends:          
  9. vermagic:       2.6.32-504.1.3.el6.x86_64 SMP mod_unload modversions  
  10. parm:           use_logical_block_size:Prefer logical block size over physical (Y=logicalN=physical [default]) (bool)        <==== now it support  


当升级完kernel之后,并且ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true,这样的话,使用的sector size 512.
因此,会由于sector size的不匹配导致 CRS 不能发现voting disk.
[html] view plain copy
  1. There are similar issues which are caused by opposite reason, please refer to:  
  2. Linux: After NetApp ONTAP Upgrade: CRS-1714:Unable to discover any voting files, retrying discovery in 15 seconds (Doc ID 1641344.1)  
  3. Alert: After SAN Firmware Upgrade, ASM Diskgroups ( Using ASMLIB) Cannot Be Mounted Due To ORA-15085: ASM disk "" has inconsistent sector size. (Doc ID 1500460.1)  

解决方案:
第一步:重新配置oracleasm以便使用physical block size 
# oracleasm configure -p
[html] view plain copy
  1. It's not recommended to edit the file /etc/sysconfig/oracleasm directly, as you might hit another issue described in:  
  2. Updates to ASMLib Configuration File "/etc/sysconfig/oracleasm" Not Effective (Doc ID 868352.1)  
第二步:reboot 操作系统.

参考文档:
[html] view plain copy
  1. NOTE:1500460.1 - Alert: After SAN Firmware Upgrade, ASM Diskgroups ( Using ASMLIB) Cannot Be Mounted Due To ORA-15085: ASM disk "" has inconsistent sector size.  
  2. NOTE:1641344.1 - Linux: After NetApp ONTAP Upgrade: CRS-1714:Unable to discover any voting files, retrying discovery in 15 seconds  
  3. NOTE:868352.1 - Updates to ASMLib Configuration File "/etc/sysconfig/oracleasm" Not Effective  
  4. NOTE:1530578.1 - New Block Size Feature for OracleASM and oracleasm-support  

译者总结:
其实这个文章说的比较绕,我个人总结如下:

前提: 

1.
这个asm diskgroup用了asmlib来实现的
2.
升级前:/etc/sysconfig/oracleasm文件中的ORACLEASM_USE_LOGICAL_BLOCK_SIZE等于true (意味着asm使用底层disklogical block size)
3.asm disk
physical block size等于4096,logical block size等于512

升级前:
kmod-oracleasm-2.0.6.rh1-2.el6.x86_64,
但是该版本的kmod-oracleasm不支持ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true,
也就是说Oracleasm其实还是用的4096physical sector size,512logical block size.其实这是4k sector sizeemulition mode.


升级后:
kmod-oracleasm-2.0.8-4.el6_6.x86_64,
该版本的kmod-oracleasm支持ORACLEASM_USE_LOGICAL_BLOCK_SIZE=true,
也就是说Oracleasm其实还是用的4096physical sector size,4096logical sector size.


问题被解决之后的状态:
/etc/sysconfig/oracleasm
文件中的ORACLEASM_USE_LOGICAL_BLOCK_SIZE等于false(意味着asm使用底层diskphysical block size)

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...