To work on VMware Fusion, set the following on the .vmx file; without this entry, the scsi_id command does not return any values by default.
disk.EnableUUID = “TRUE”

Retrieve and generate a unique SCSI identifier with the scsi_id command:

[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdc

36000c29b80c12910ca4e6a95a1949d8b
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdd
36000c29344da4eab5b78409de3706424
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sde
36000c291cd542d388fdee223fa90ca69
[root@rhel59dra ~]# /sbin/scsi_id -g -u -s /block/sdf
36000c296666187fd5223c0a34ca52f71

Add entries to a custom udev rules file

[root@rhel59dra ~]# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c29b80c12910ca4e6a95a1949d8b", NAME="ASMOCR01", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c29344da4eab5b78409de3706424", NAME="ASMOCR02", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sd?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/$parent", RESULT=="36000c291cd542d388fdee223fa90ca69", NAME="ASMOCR03", OWNER="oracle", GROUP="dba", MODE="0660"
KERNEL=="sdf[0-9]", BUS=="scsi", PROGRAM=="/usr/bin/udevinfo -q name -p %p", RESULT=="%k", PROGRAM=="scsi_id -g -u -d /dev/$parent", RESULT=="36000c296666187fd5223c0a34ca52f71", NAME="ASMDATA0%n", OWNER="oracle", GROUP="dba", MODE="0660"

Note:
For disks with multiple partitions, the syntax in the udev rules are different.

KERNEL==”sd[c-z]1″, BUS==”scsi”, PROGRAM=”/sbin/scsi_id -g -u -s /block/%P”, RESULT==”3*”, NAME=”ASM%c”, OWNER=”oracle”, GROUP=”dba”, MODE=”0660″

To make sure that udev rules work:

[root@rhel59dra ~]# udevtest /block/sdc/sdc1
[root@rhel59dra ~]# udevtest /block/sdd/sdd1
[root@rhel59dra ~]# udevtest /block/sde/sde1
[root@rhel59dra ~]# udevtest /block/sdf/sdf1    
[root@rhel59dra ~]# udevtest /block/sdf/sdf2    
[root@rhel59dra ~]# udevtest /block/sdf/sdf3    
[root@rhel59dra ~]# udevtest /block/sdf/sdf4    

Restart udev rules:
RHEL 5: /sbin/udevcontrol reload_rules
RHEL 6: /sbin/udevadm control –reload-rules
/sbin/start_udev

Verify that proper devices are created

[root@rhel59dra ~]# ls -l /dev/ASM*

brw-rw---- 1 oracle dba 8, 81 May 15 23:45 /dev/ASMDATA01
brw-rw---- 1 oracle dba 8, 82 May 15 23:45 /dev/ASMDATA02
brw-rw---- 1 oracle dba 8, 83 May 15 23:45 /dev/ASMDATA03
brw-rw---- 1 oracle dba 8, 84 May 15 23:45 /dev/ASMDATA04
brw-rw---- 1 oracle dba 8, 33 May 15 23:45 /dev/ASMOCR01
brw-rw---- 1 oracle dba 8, 49 May 15 23:45 /dev/ASMOCR02
brw-rw---- 1 oracle dba 8, 65 May 15 23:45 /dev/ASMOCR03 

Written by Charles Kim, Oracle ACE Director


Create ASMLIB disks with /etc/init.d/oracleasm command. 

You must be logged in as root:

– root: cat /proc/partitions  |grep emcpower

 120    32    1048576 emcpowerc
 120    33    1047383 emcpowerc1
 120    48    1048576 emcpowerd
 120    49    1047383 emcpowerd1
 120    64    1048576 emcpowere
 120    65    1047383 emcpowere1
 120    80    1048576 emcpowerf
 120    81    1047383 emcpowerf1
 120    96    1048576 emcpowerg
 120    97    1047383 emcpowerg1
 120   112  471859200 emcpowerh
 120   113  471849051 emcpowerh1
 120   128  471859200 emcpoweri
 120   129  471849051 emcpoweri1
 120   144  471859200 emcpowerj
 120   145  471849051 emcpowerj1
 120   160  471859200 emcpowerk
 120   161  471849051 emcpowerk1
 120   176  524288000 emcpowerl
 120   177  524277179 emcpowerl1
 120   192  524288000 emcpowerm
 120   193  524277179 emcpowerm1
 120   208  471859200 emcpowern
 120   209  471849051 emcpowern1
 120   224  471859200 emcpowero
 120   225  471849051 emcpowero1
 
 – root: cat cr_asmlib_disks.txt
/etc/init.d/oracleasm createdisk VISC_PV101_DISK1 /dev/emcpowerc1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK2 /dev/emcpowerd1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK3 /dev/emcpowere1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK4 /dev/emcpowerf1
/etc/init.d/oracleasm createdisk VISC_PV101_DISK5 /dev/emcpowerg1
 
 – root: ksh cr_asmlib_disks.txt
Marking disk “VISC_PV101_DISK1” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK2” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK3” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK4” as an ASM disk: [  OK  ]
Marking disk “VISC_PV101_DISK5” as an ASM disk: [  OK  ]
 
Next, you need to scan the disks on the remaining RAC nodes:

– root: /etc/init.d/oracleasm scandisks
Scanning the system for Oracle ASMLib disks:

You can verify the the disks on the other RAC nodes with the listdisks option:

– root: /etc/init.d/oracleasm listdisks
TRAX_PV101_DISK1
TRAX_PV101_DISK2
TRAX_PV101_DISK3
TRAX_PV101_DISK4
TRAX_PV101_DISK5