To preserve the device names across reboots in Linux, udev rules is the recommended option. The idea is to extract SCSI device’s unique ID and assign it to a symbolic name that will persist across reboots. To get the SCSI device’s unique ID, Linux command scsi_id can be used.
On VMware, you might run into an issue where scsi_id did not return any results.
1 2 |
[root@oradb02 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sda [root@oradb02 ~]# |
To fix this, you have to enable a VMX configuration named disk.EnableUUID to TRUE. You can accomplish this in two ways.
- Editing the VM’s vmx file
- Adding the option through VM’s settings in vCenter GUI.
Enabling through vCenter GUI
- Power off the VM
- Right click on the VM and select Edit Settings
- Select the VM Options tab, expand the Advanced option and click “Edit Configuration ..”
- At the bottom, enter disk.EnableUUID in the name field, TRUE in the value field and press Add and click OK.
- Power On the VM
1 2 3 |
[root@oradb02 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sda 36000c2902c772ac74bc3bfcde421c6e4 [root@oradb02 ~]# |