HP Serviceguard Extended Distance Cluster for Linux A.11.20.10 Deployment Guide, December 2012

in the device name prevents the MD mirror from starting. To avoid this problem, HP requires that
you make the device names persistent.
When there is a disk related failure and subsequent reboot, there is a possibility that the devices
are renamed. Linux names disks in the order they are found. The device that was /dev/sdf may
be renamed to /dev/sde if any “lower device is failed or removed. As a result, you cannot
activate the MD device with the original name.
HP requires that the device names be persistent to avoid reorientation after a failure and reboot.
For more information on creating persistent device names, see the Using udev to Simplify HP
Serviceguard for Linux Configuration white paper that is available at the following location:
http://www.hp.com/go/linux-serviceguard-docs
When creating persistent device names, ensure that the same udev rules file exists in all the nodes.
This is necessary for the symlinks to appear and point to the correct device. Use these persistent
device names wherever there is a need to specify the devices for extended cluster configuration
or during recovery process after a failure. A persistent device created based on the instructions in
the document mentioned earlier will have a device name that starts with/dev/hpdev/.
NOTE: The name of the MD device must be unique across all packages in the cluster. Also, the
names of each of their component udev devices must also be unique across all nodes in the cluster.
udev rule files are stored in the /etc/udev/rules.d directory.
3.3.3 Creating a Multiple Disk Device
To enable Software RAID in your environment, you need to first create the mirror setup. This implies
that you specify two disks to create a Multiple Device (MD). When configuring disks in RAID 1
level, use a disk or LUN from each datacenter as one mirror half. Be sure to create disk sets of the
same size as they need to store data that are of identical sizes. Differences in disk set size results
in a mirror being created of a size equal to the smaller of the two disks. Be sure to create the mirror
using the persistent device names of the component devices.
As mentioned earlier, the first step for enabling Software RAID in your environment is to create the
Multiple Disk (MD) device using two underlying component disks. This MD device is a virtual device
which ensures that any data written to it is written to both component disks. As a result, the data
is identical on both disks that make up the MD device.
This section describes how to create an MD device. This is the only step that you must complete
before you enable Software RAID for a package. The other RAID operations are needed only
during maintenance or during recovery process after a failure has occurred.
NOTE: For all the steps in the subsequent sections, all the persistent device names, and not the
actual device names, must be used for the two component disks of the MD mirror.
3.3.3.1 Creating and Assembling an MD Device
This example shows how to create the MD device /dev/md0, you must create it from a LUN of
storage device 1 (/dev/hpdev/sde ) and another LUN from storage 2 (/dev/hpdev/sdf ) .
To create an MD device:
1. Run the following command:
# mdadm --create --verbose /dev/md0 --name=0 --level=1
--raid-devices=2 /dev/hpdev/sde /dev/hpdev/sdf
2. To have the name of MD device consistent across the nodes, copy the output of
nl
# mdadm Db /dev/md0 command to /etc/mdadm.conf file:
mdadm Db /dev/md0
The output will be as follows:
3.3 Configuring the Storage Environment 23