Grid: 版本 11.2.0.4.0
Os:Red Hat Enterprise Linux Server release 6.8 (Santiago)
1,测试环境
prod01 的asm-test01,asm-test02 与prod02的asm-test101,asm-test102 对应的是相同的磁盘名称不同。
prod01:
[root@prod01 rules.d]# ll /dev/asm-test0*
brw-rw---- 1 grid asmadmin 8, 64 Oct 29 09:07 /dev/asm-test01
brw-rw---- 1 grid asmadmin 8, 80 Oct 29 09:07 /dev/asm-test02
[root@prod01 rules.d]# ll /dev/disk/by-id/|grep test
lrwxrwxrwx 1 root root 16 Oct 29 09:07 scsi-36000c293a9f6f98b804798c3a7779baf -> ../../asm-test01
lrwxrwxrwx 1 root root 16 Oct 29 09:07 scsi-36000c29b6b59bc1c7a06829306735d12 -> ../../asm-test02
lrwxrwxrwx 1 root root 16 Oct 29 09:07 wwn-0x6000c293a9f6f98b804798c3a7779baf -> ../../asm-test01
lrwxrwxrwx 1 root root 16 Oct 29 09:07 wwn-0x6000c29b6b59bc1c7a06829306735d12 -> ../../asm-test02
prod02:
[root@prod02 ~]# ll /dev/asm-test*
brw-rw---- 1 grid asmadmin 8, 80 Oct 29 09:10 /dev/asm-test101
brw-rw---- 1 grid asmadmin 8, 96 Oct 29 09:10 /dev/asm-test102
[root@prod02 ~]# ll /dev/disk/by-id|grep test
lrwxrwxrwx 1 root root 17 Oct 29 09:10 scsi-36000c293a9f6f98b804798c3a7779baf -> ../../asm-test101
lrwxrwxrwx 1 root root 17 Oct 29 09:10 scsi-36000c29b6b59bc1c7a06829306735d12 -> ../../asm-test102
lrwxrwxrwx 1 root root 17 Oct 29 09:10 wwn-0x6000c293a9f6f98b804798c3a7779baf -> ../../asm-test101
lrwxrwxrwx 1 root root 17 Oct 29 09:10 wwn-0x6000c29b6b59bc1c7a06829306735d12 -> ../../asm-test102
2,创建asm磁盘组测试是否可以成功?
prod01:
[grid@prod01 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 29 09:21:35 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> create diskgroup dg1 external redundancy disk '/dev/asm-test01','/dev/asm-test02' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0';
Diskgroup created.
SQL>
SQL> col path format a30;
col name format a30;
set linesize 800
select dg.NAME,dg.TYPE,d.GROUP_NUMBER,d.NAME,d.path,d.OS_MB,d.TOTAL_MB/1024 from v$asm_disk d,V$ASM_DISKGROUP dg where d.GROUP_NUMBER=dg.GROUP_NUMBER order by dg.name;SQL> SQL> SQL>
NAME TYPE GROUP_NUMBER NAME PATH OS_MB D.TOTAL_MB/1024
------------------------------ ------ ------------ ------------------------------ ------------------------------ ---------- ---------------
DATA NORMAL 1 DATA_0002 /dev/asm-diskd 5120 5
DATA NORMAL 1 DATA_0001 /dev/asm-diskc 5120 5
DATA NORMAL 1 DATA_0000 /dev/asm-diskb 5120 5
DG1 EXTERN 2 DG1_0000 /dev/asm-test01 3072 3
DG1 EXTERN 2 DG1_0001 /dev/asm-test02 3072 3
PROD02:
[grid@prod02 ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Mon Oct 29 09:26:50 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> col path format a30;
col name format a30;
set linesize 800
select dg.NAME,dg.TYPE,d.GROUP_NUMBER,d.NAME,d.path,d.OS_MB,d.TOTAL_MB/1024 from v$asm_disk d,V$ASM_DISKGROUP dg where d.GROUP_NUMBER=dg.GROUP_NUMBER order by dg.name;SQL> SQL> SQL>
NAME TYPE GROUP_NUMBER NAME PATH OS_MB D.TOTAL_MB/1024
------------------------------ ------ ------------ ------------------------------ ------------------------------ ---------- ---------------
DATA NORMAL 1 DATA_0000 /dev/asm-diskcc 5120 5
DATA NORMAL 1 DATA_0002 /dev/asm-diskee 5120 5
DATA NORMAL 1 DATA_0001 /dev/asm-diskdd 5120 5
DG1 0 /dev/asm-test101 3072 0
DG1 0 /dev/asm-test102 3072 0
SQL>
SQL> alter diskgroup dg1 mount;
Diskgroup altered.
SQL> col path format a30;
col name format a30;
set linesize 800
select dg.NAME,dg.TYPE,d.GROUP_NUMBER,d.NAME,d.path,d.OS_MB,d.TOTAL_MB/1024 from v$asm_disk d,V$ASM_DISKGROUP dg where d.GROUP_NUMBER=dg.GROUP_NUMBER order by dg.name;SQL> SQL> SQL>
NAME TYPE GROUP_NUMBER NAME PATH OS_MB D.TOTAL_MB/1024
------------------------------ ------ ------------ ------------------------------ ------------------------------ ---------- ---------------
DATA NORMAL 1 DATA_0000 /dev/asm-diskcc 5120 5
DATA NORMAL 1 DATA_0002 /dev/asm-diskee 5120 5
DATA NORMAL 1 DATA_0001 /dev/asm-diskdd 5120 5
DG1 EXTERN 2 DG1_0000 /dev/asm-test101 3072 3
DG1 EXTERN 2 DG1_0001 /dev/asm-test102 3072 3
SQL>
3,asm 对操作系统磁盘名称并不要求一致。
附录:
查看磁盘id:
[root@prod01 rules.d]# ll /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root 10 Oct 26 09:35 dm-name-rootvg-root -> ../../dm-0
lrwxrwxrwx 1 root root 10 Oct 26 09:35 dm-name-rootvg-swap -> ../../dm-1
lrwxrwxrwx 1 root root 10 Oct 26 09:35 dm-uuid-LVM-uD4Lhf0xjcHNyc6w4pPYSp3AOMYUWI6RFQUOCFxTenzvlmR5bkmAJCWmL4Loj3eQ -> ../../dm-0
lrwxrwxrwx 1 root root 10 Oct 26 09:35 dm-uuid-LVM-uD4Lhf0xjcHNyc6w4pPYSp3AOMYUWI6RiSHe08dQp8f7j0ibkN1o673UuWqrwtEm -> ../../dm-1
lrwxrwxrwx 1 root root 10 Oct 26 09:35 lvm-pv-uuid-Gf5Q4P-6jLo-NBpD-rnPD-Y8kG-XOmw-Nm04AZ -> ../../sda2
lrwxrwxrwx 1 root root 9 Oct 26 09:38 scsi-36000c291ebbc447cf66ff6b6a95fcba5 -> ../../sdd
lrwxrwxrwx 1 root root 9 Oct 29 08:58 scsi-36000c293a9f6f98b804798c3a7779baf -> ../../sde
lrwxrwxrwx 1 root root 9 Oct 26 09:38 scsi-36000c29834a76f994d32c360690ff23d -> ../../sdb
lrwxrwxrwx 1 root root 9 Oct 26 09:38 scsi-36000c299cf17f09b48e2fdd05d3baad3 -> ../../sdc
lrwxrwxrwx 1 root root 9 Oct 29 08:58 scsi-36000c29b6b59bc1c7a06829306735d12 -> ../../sdf
lrwxrwxrwx 1 root root 9 Oct 26 09:38 wwn-0x6000c291ebbc447cf66ff6b6a95fcba5 -> ../../sdd
lrwxrwxrwx 1 root root 9 Oct 29 08:58 wwn-0x6000c293a9f6f98b804798c3a7779baf -> ../../sde
lrwxrwxrwx 1 root root 9 Oct 26 09:38 wwn-0x6000c29834a76f994d32c360690ff23d -> ../../sdb
lrwxrwxrwx 1 root root 9 Oct 26 09:38 wwn-0x6000c299cf17f09b48e2fdd05d3baad3 -> ../../sdc
lrwxrwxrwx 1 root root 9 Oct 29 08:58 wwn-0x6000c29b6b59bc1c7a06829306735d12 -> ../../sdf
[root@prod01 rules.d]# /sbin/scsi_id -g /dev/sde
36000c293a9f6f98b804798c3a7779baf
[root@prod01 rules.d]# /sbin/scsi_id -g /dev/sdf
36000c29b6b59bc1c7a06829306735d12
prod01: asm.log
Mon Oct 29 09:21:40 2018
SQL> create diskgroup dg1 external redundancy disk '/dev/asm-test01','/dev/asm-test02' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0'
NOTE: Assigning number (2,0) to disk (/dev/asm-test01)
NOTE: Assigning number (2,1) to disk (/dev/asm-test02)
NOTE: initializing header on grp 2 disk DG1_0000
NOTE: initializing header on grp 2 disk DG1_0001
NOTE: initiating PST update: grp = 2
Mon Oct 29 09:21:41 2018
GMON updating group 2 at 8 for pid 27, osid 65275
NOTE: group DG1: initial PST location: disk 0000 (PST copy 0)
NOTE: PST update grp = 2 completed successfully
NOTE: cache registered group DG1 number=2 incarn=0x370c90f2
NOTE: cache began mount (first) of group DG1 number=2 incarn=0x370c90f2
NOTE: cache opening disk 0 of grp 2: DG1_0000 path:/dev/asm-test01
NOTE: cache opening disk 1 of grp 2: DG1_0001 path:/dev/asm-test02
Mon Oct 29 09:21:41 2018
* allocate domain 2, invalid = TRUE
kjbdomatt send to inst 2
Mon Oct 29 09:21:41 2018
NOTE: attached to recovery domain 2
NOTE: cache creating group 2/0x370C90F2 (DG1)
NOTE: cache mounting group 2/0x370C90F2 (DG1) succeeded
NOTE: allocating F1X0 on grp 2 disk DG1_0000
NOTE: Created Used Space Directory for 1 threads
NOTE: diskgroup must now be re-mounted prior to first use
NOTE: cache dismounting (clean) group 2/0x370C90F2 (DG1)
NOTE: messaging CKPT to quiesce pins Unix process pid: 65275, image: oracle@prod01 (TNS V1-V3)
NOTE: lgwr not being msg'd to dismount
kjbdomdet send to inst 2
detach from dom 2, sending detach message to inst 2
freeing rdom 2
NOTE: detached from domain 2
NOTE: cache dismounted group 2/0x370C90F2 (DG1)
GMON dismounting group 2 at 9 for pid 27, osid 65275
GMON dismounting group 2 at 10 for pid 27, osid 65275
NOTE: Disk DG1_0000 in mode 0x7e marked for de-assignment
NOTE: Disk DG1_0001 in mode 0x7e marked for de-assignment
SUCCESS: diskgroup DG1 was created
NOTE: cache deleting context for group DG1 2/0x370c90f2
NOTE: cache registered group DG1 number=2 incarn=0x3dec90f5
NOTE: cache began mount (first) of group DG1 number=2 incarn=0x3dec90f5
NOTE: Assigning number (2,0) to disk (/dev/asm-test01)
NOTE: Assigning number (2,1) to disk (/dev/asm-test02)
NOTE: GMON heartbeating for grp 2
GMON querying group 2 at 13 for pid 27, osid 65275
NOTE: cache opening disk 0 of grp 2: DG1_0000 path:/dev/asm-test01
NOTE: F1X0 found on disk 0 au 2 fcn 0.0
NOTE: cache opening disk 1 of grp 2: DG1_0001 path:/dev/asm-test02
NOTE: cache mounting (first) external redundancy group 2/0x3DEC90F5 (DG1)
* allocate domain 2, invalid = TRUE
kjbdomatt send to inst 2
NOTE: attached to recovery domain 2
NOTE: cache recovered group 2 to fcn 0.0
NOTE: redo buffer size is 256 blocks (1053184 bytes)
Mon Oct 29 09:21:48 2018
NOTE: LGWR attempting to mount thread 1 for diskgroup 2 (DG1)
NOTE: LGWR found thread 1 closed at ABA 0.10750
NOTE: LGWR mounted thread 1 for diskgroup 2 (DG1)
NOTE: LGWR opening thread 1 at fcn 0.0 ABA 2.0
NOTE: setting 11.2 start ABA for group DG1 thread 1 to 2.0
NOTE: cache mounting group 2/0x3DEC90F5 (DG1) succeeded
NOTE: cache ending mount (success) of group DG1 number=2 incarn=0x3dec90f5
Mon Oct 29 09:21:48 2018
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
SUCCESS: diskgroup DG1 was mounted
SUCCESS: create diskgroup dg1 external redundancy disk '/dev/asm-test01','/dev/asm-test02' attribute 'compatible.rdbms'='11.2.0.0', 'compatible.asm'='11.2.0.0'
Mon Oct 29 09:21:48 2018
NOTE: diskgroup resource ora.DG1.dg is online
ERROR: failed to update diskgroup resource ora.DG1.dg
Mon Oct 29 09:27:33 2018
NOTE: enlarging ACD to 2 threads for group 2/0x3dec90f5 (DG1)
SUCCESS: ACD enlarged for group 2/0x3dec90f5 (DG1)
PROD02 ASM.LOG
Mon Oct 29 09:21:40 2018
* allocate domain 2, invalid = TRUE
freeing rdom 2
Received detach msg from inst 1 for dom 2
* allocate domain 2, invalid = TRUE
Mon Oct 29 09:27:29 2018
SQL> alter diskgroup dg1 mount
NOTE: cache registered group DG1 number=2 incarn=0x3ded834a
NOTE: cache began mount (not first) of group DG1 number=2 incarn=0x3ded834a
NOTE: Assigning number (2,0) to disk (/dev/asm-test101)
NOTE: Assigning number (2,1) to disk (/dev/asm-test102)
Mon Oct 29 09:27:30 2018
GMON querying group 2 at 5 for pid 27, osid 26882
NOTE: cache opening disk 0 of grp 2: DG1_0000 path:/dev/asm-test101
NOTE: F1X0 found on disk 0 au 2 fcn 0.0
NOTE: cache opening disk 1 of grp 2: DG1_0001 path:/dev/asm-test102
NOTE: cache mounting (not first) external redundancy group 2/0x3DED834A (DG1)
Mon Oct 29 09:27:30 2018
kjbdomatt send to inst 1
Mon Oct 29 09:27:30 2018
NOTE: attached to recovery domain 2
NOTE: redo buffer size is 256 blocks (1053184 bytes)
Mon Oct 29 09:27:30 2018
NOTE: LGWR attempting to mount thread 2 for diskgroup 2 (DG1)
NOTE: ACD expansion required for disk group 2
NOTE: LGWR attempting to mount thread 2 for diskgroup 2 (DG1)
NOTE: LGWR found thread 2 closed at ABA 0.10750
NOTE: LGWR mounted thread 2 for diskgroup 2 (DG1)
NOTE: LGWR opening thread 2 at fcn 0.0 ABA 2.0
NOTE: setting 11.2 start ABA for group DG1 thread 2 to 2.0
NOTE: cache mounting group 2/0x3DED834A (DG1) succeeded
NOTE: cache ending mount (success) of group DG1 number=2 incarn=0x3ded834a
Mon Oct 29 09:27:33 2018
NOTE: Instance updated compatible.asm to 11.2.0.0.0 for grp 2
SUCCESS: diskgroup DG1 was mounted
Mon Oct 29 09:27:33 2018
NOTE: diskgroup resource ora.DG1.dg is online
SUCCESS: alter diskgroup dg1 mount
NOTE: diskgroup resource ora.DG1.dg is updated