Oracle ASM depends upon the names of each LUN device to determine which LUN belongs in a disk group. The problem with Linux is that these LUN device names may change upon reboot. In the past I have used ASMLIB from Oracle to help with this but I found that udev rules are actually easier to use and do not rely on third-party software to get the job done.
I will use the following LUNs for this example:
| Purpose | Size | Device Name |
|---|---|---|
| DATA | 50 GB | /dev/sddlmab |
| FRA | 30 GB | /dev/sddlmac |
| TEMP | 20 GB | /dev/sddlmad |
| REDO | 10 GB | /dev/sddlmae |
Udev rules can be used to give consistent names to devices when the server boots. In order to do this you need a unique identifier for each LUN that does not change on boot. This identifier is the SCSI ID. You can get this using the scsi_id command against each LUN device name: