Using udev to simplify HP Serviceguard for Linux configuration, March 2014

Technical white paper | Using udev to simplify HP Serviceguard for Linux configuration
3
CCISS
Writing udev rules is not required for CCISS devices (MSA500 family). Because of the nature of the MSA500 family, device
names will not change unless a device is deleted. To prevent issues with Serviceguard, do not delete a MSA500 device
whose identifier is between two other devices.
Naming for mirror halves of an MD device
It is recommended to use persistent names using udev for the mirror halves of an MD device.
Configuring udev
The configuration files for udev are in /etc/udev/rules.d. The udev configuration file entries associate a physical device to a
logical name based on information that uniquely identifies the physical device. The two major steps to configuring udev for
the shared storage used by Serviceguard are:
Writing rules for a device
Creating links for persistence
Writing rules for a device
You must write a rule for a LUN to add persistence to that LUN. You need to create and edit the rules file
/etc/udev/rules.d/10-HP-Local.rules to create a rule for the LUN. To create a rule for a LUN, complete the steps below:
1. Find out the scsi_id of the LUN.
For example, to find out the scsi_id of the device /dev/sda enter the following commands depending on the operating
system installed on the system:
Red Hat 5:
# /sbin/scsi_id –g –u –s /block/sda
Red Hat 6, Novell SLES 11 SP1, or Novell SLES 11 SP2:
# /lib/udev/scsi_id --page=0x83 --whitelisted
--replace-whitespace /dev/sda
2. Append the following rule to the /etc/udev/rules.d/10-HP-Local.rules file:
Novell SLES 11 SP1 or Novell SLES 11 SP2:
SUBSYSTEM==”block”, KERNEL==”sd*”, PROGRAM=”/lib/udev/scsi_id
--page=0x83 --whitelisted --replace-whitespace
--device=/dev/%k”,
RESULT==”360060e80042747000000274700000315”,
SYMLINK=”hpdev/mylink-sda%n”
Where 360060e80042747000000274700000315 is the output of
“/lib/udev/scsi_id --page=0x83 --whitelisted
--replace-whitespace /dev/sda” command.
If you are using multipath devices (DM devices), append the following rule to the
/etc/udev/rules.d/10-HP-Local.rules file:
SUBSYSTEM==”block”, KERNEL==”dm*”, PROGRAM=”/lib/udev/scsi_id
--page=0x83 --whitelisted --replace-whitespace
--device=/dev/%k”,
RESULT==”360060e80042747000000274700000315”,
SYMLINK=”hpdev/mylink-dm”
Where 360060e80042747000000274700000315 is the output of
“/lib/udev/scsi_id --page=0x83 --whitelisted
--replace-whitespace /dev/dm-1” command