The post provides an example of how to define and associated meaningful device names for Candidate or Member ASM Disks on Linux/Unix using mknod. The example shown below is of a 2 node RAC setup with +ASM1 and +ASM2 instances.
1. We have below mounted on both +ASM1 & +ASM2 instances:
GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 CRSDG MOUNTED EXTERN 20480 20052 2 DATADG1 MOUNTED EXTERN 102400 77005 3 DATADG2 MOUNTED EXTERN 102400 85268
2. On the +ASM1 instance the diskgroups are mapped to the disks as follow:
GROUP_NUMBER NAME Logical Disk on +ASM1 Physical Disk on +ASM1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 CRSDG CRSDG_0001 /dev/rdisk/disk78 2 DATADG1 DATADG1_0001 /dev/rdisk/disk79 3 DATADG2 DATADG2_0001 /dev/rdisk/disk80
3. On the +ASM2 instance the diskgroups are mapped to the disks as follow:
GROUP_NUMBER NAME Logical Disk on +ASM1 Physical Disk on +ASM1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 CRSDG CRSDG_0001 /dev/rdisk/disk85 2 DATADG1 DATADG1_0001 /dev/rdisk/disk86 3 DATADG2 DATADG2_0001 /dev/rdisk/disk87
4. So the disks mapping on each node is different. This is normal since each node/OS could provide a different disk name (e.g. /dev/rdsk## to access the same physical disk).
5. If you want to have same disks name on all the nodes & ASM instances to access the same physical disks, then you need to create an alias, either mknod devices or symbolic links on the physical disks (e.g. /dev/rdsk##) one each node. For example. assuming you have the next devices on:
Node #1:
crw-rw- 1 root sys 118, 40 Apr 2 15:00 /dev/rdsk/disk78 crw-rw- 1 root sys 118, 0 Apr 2 15:00 /dev/rdsk/disk79 crw-rw- 1 root sys 118, 42 Apr 2 15:00 /dev/rdsk/disk80
Create the alias:
# mkdir /asmdisks # chown oracle:dba /asmdisks # cd /asmdisks # mknod asmdisk1 c 118 40 # mknod asmdisk2 c 118 0 # mknod asmdisk3 c 118 42
Then you will have the next alias devices:
/asmdisks/asmdisk1 /asmdisks/asmdisk2 /asmdisks/asmdisk3
You will need to set the correct ownership:
# chown oracle:dba /asmdisks/asmdisk1 # chown oracle:dba /asmdisks/asmdisk2 # chown oracle:dba /asmdisks/asmdisk3
Node #2:
crw-rw- 1 root sys 118, 40 Apr 2 15:00 /dev/rdsk/disk78 crw-rw- 1 root sys 118, 0 Apr 2 15:00 /dev/rdsk/disk79 crw-rw- 1 root sys 118, 42 Apr 2 15:00 /dev/rdsk/disk80
Create the alias:
# mkdir /asmdisks # chown oracle:dba /asmdisks # cd /asmdisks # mknod asmdisk1 c 118 46 # mknod asmdisk2 c 118 49 # mknod asmdisk3 c 118 15
Then you will have the next alias devices:
/asmdisks/asmdisk1 /asmdisks/asmdisk2 /asmdisks/asmdisk3
You will need to set the correct ownership:
# chown oracle:dba /asmdisks/asmdisk1 # chown oracle:dba /asmdisks/asmdisk2 # chown oracle:dba /asmdisks/asmdisk3
6. Then update the asm_diskstring pointing to the new alias devices one both ASM instances:
+ASM1 instance:
SQL> alter system set asm_diskstring = '/asmdisks/asmdisk*' scope=spfile;
+ASM2 instance:
SQL> alter system set asm_diskstring = '/asmdisks/asmdisk*' scope=spfile;
7. Then the next time you restart the ASM instances, they will access the physical disks using the alias located at ‘/asmdisks/asmdisk*’ on each node.