HP Serviceguard Extended Distance Cluster for Linux A.12.00.00 Deployment Guide, March 2014
IMPORTANT: You need to repeat this procedure to create all MD devices that are used in a
package.
When data is written to this device, the MD driver writes to both the underlying disks. In case of
read requests, the MD reads from one device or the other based on its algorithms. After creating
this device you treat it like any other LUN that is going to have shared data in a Serviceguard
environment and then create a logical volume and a file system on it.
3.3.4 Creating Volume Groups and Configuring VG Exclusive Activation on the MD
Mirror
Once the MD mirror device is created, you need to create volume groups and logical volumes on
it. You must use the Volume Group Exclusive activation feature. This protects against a volume
group which is already active on one node to be activated again (accidentally or on purpose) on
any other node in the cluster.
Creating the volume group and logical volume infrastructure on an MD device is similar to creating
the same on a single device. However, when you create a logical volume on an MD device, it can
be done on a physical disk (LUN) or on a partition.
For example, let us assume that /dev/sde and /dev/sdf are two physical disks that form the
md device /dev/md0. The persistent device names for /dev/sde and /dev/sdf are /dev/
hpdev/md0_mirror0 and /dev/hpdev/md0_mirror1 respectively. When you create a logical
volume, duplicate entries are detected for the two physical disks that form the mirror device. The
following message may be displayed:
Found duplicate PV 9w3TIxKZ6lFRqWUmQm9tlV5nsdUkTi4i: using/dev/sde not
/dev/sdf
where, /dev/sde and /dev/sdf are the two physical disks that form the mirror device.
The workaround for this problem is to create a filter for LVM.
To create the filter add the following line in the /etc/lvm/lvm.conf file:
filter = [ "a|/dev/./by-id/.|", "a|/dev/md0|",
"r|/dev/hpdev/md0_mirror0|" , "r|/dev/hpdev/md0_mirror1|" ]
where, /dev/md0 is the MD device that is specified in the package configuration file.
NOTE: For each MD device that you create in the package configuration file, you have to edit
the filter to add the MD name and to reject the persistent device names for it's mirror half.
For example, if /dev/md0 and /dev/md1 are the two MD devices that are specified in the
package configuration file, edit the filter in the /etc/lvm/lvm.conf file:
filter = [ "a|/dev/./by-id/.|", "a|/dev/md0|", "a|/dev/md1|",
"r|/dev/hpdev/md0_mirror0|" , "r|/dev/hpdev/md0_mirror1|" ,
"r|/dev/hpdev/md1_mirror0|" , "r|/dev/hpdev/md1_mirror1|" ]
where /dev/hpdev/md1_mirror0 and /dev/hpdev/md1_mirror1 are the persistent device
names for the physical disks that form the md device /dev/md1.
NOTE: When adding the filter, ensure that you use the persistent names of all the devices used
in the mirrors.
This prevents these mirror devices from being scanned or used for logical volumes.
Once you add the filter to the /etc/lvm/lvm.conf file, create the logical volume infrastructure
on the MD mirror device as you would on a single disk. For more information on creating volume
groups and logical volumes, see the latest edition of the Managing HP Serviceguard A.12.00.00
for Linux at http://www.hp.com/go/linux-serviceguard-docs.
3.3 Configuring the Storage Environment 25