HP Serviceguard Extended Distance Cluster for Linux A.11.20.20 Deployment Guide, August 2013
a. Run the following command:
# mdadm -A -R /dev/md0 /dev/hpdev/sde /dev/hpdev/sdf
b. To have the name of MD device consistent across the nodes, see step 2 as described in
creating MD device.
3. Stop the MD device on the other node by running the following command:
# mdadm -S /dev/md0
You must stop the MD device soon after you assemble it on the second node.
4. If you want to create volume groups, restart the MD device on the first node by running the
following command:
# mdadm -A -R /dev/md0 /dev/hpdev/sde /dev/hpdev/sdf
5. After you have created the volume groups, stop the MD device by running the following
command:
# mdadm -S /dev/md0
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.
26 Configuring your Environment for Software RAID