When Oracle_rac is installed on vmware, the udev disk has no scsi_id return value
During this period of time, a set of oracle11g_rac was installed on the customer vmware, which is based on the redhat6.4 system. Before doing the redhat5 version, there were ready-made asmlib tools available, but Red Hat 6 did not have a corresponding version of asmlib at first. Later, although oracle and redhat worked together to launch the RHEL6 version of asmlib, it was unbearable for this product to register for RHN download. In addition, I also belong to the UDEV faction. So I decided to use udev to bind the disk to asm. At first, the UDEV rule file I wrote was to take the scsi_id of each disk, and then bind it to the specified drive letter name, but later, because the customer used a vmware virtual machine, the default disk did not have a scsi_id return value, so we had to consider using other methods.
The first is to solve the problem at the VMWARE level, modify the vmx file with a text editor, and add the following line anywhere in the vmx file (usually at the end):
Disk.EnableUUID = "TRUE"
This method has disadvantages, that is, every time the disk or network card information is modified, the parameters will become the default false and have to be modified every time, which does not meet the requirements of the actual production environment.
Another way is that our udev uses other value methods to bind the disk, such as
Root@udev ~] # udevinfo-a-p / sys/block/sdc/sdc1
Udevinfo starts with the device specified by the devpath and then
Walks up the chain of parent devices. It prints for every device
Found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
And the attributes from one single parent device.
Looking at device'/ block/sdc/sdc1':
KERNEL== "sdc1"
SUBSYSTEM== "block"
SYSFS {dev} = = "8:33"
SYSFS {partition} = = "1"
SYSFS {start} = "63"
SYSFS {size} = "16771797"
We replace scsi_id with the three values marked red above, so my rules file can be written like this
More 99-oracle-asmdevices.rules
KERNEL== "sdc1", SUBSYSTEM== "block", SYSFS {size} = = "16771797", SYSFS {start} = = "63", NAME= "asmdisk1-crs", OWNER= "grid", GROUP= "asmadmin", MODE= "0660"
The idea is to use the udevinfo command to find other unique values to replace.