Managing HP Serviceguard A.11.20.20 for Linux, March 2014

where node is the value of uname -n.
5. Run vgscan:
vgscan
NOTE: At this point, the setup for volume-group activation protection is complete. Serviceguard
adds a tag matching the uname -n value of the owning node to each volume group defined
for a package when the package runs and deletes the tag when the package halts. The
command vgs -o +tags vgname will display any tags that are set for a volume group.
The sections that follow take you through the process of configuring volume groups and logical
volumes, and distributing the shared configuration. When you have finished that process, use
the procedure under “Testing the Shared Configuration (page 151) to verify that the setup has
been done correctly.
5.1.12.4 Building Volume Groups: Example for Smart Array Cluster Storage (MSA 2000 Series)
NOTE: For information about setting up and configuring the MSA 2000 for use with Serviceguard,
see HP Serviceguard for Linux Version A.11.19 or later Deployment Guide at http://www.hp.com/
go/linux-serviceguard-docs.
Use Logical Volume Manager (LVM) on your system to create volume groups that can be activated
by Serviceguard packages. This section provides an example of creating Volume Groups on LUNs
created on MSA 2000 Series storage. For more information on LVM, see the Logical Volume
Manager How To, which you can find at http://tldp.org/HOWTO/HOWTO-INDEX/howtos.html.
Before you start, partition your LUNs and label them with a partition type of 8e (Linux LVM). Use
the type t parameter of the fdisk command to change from the default of 83 (Linux).
Do the following on one node:
1. Update the LVM configuration and create the /etc/lvmtab file. You can omit this step if
you have previously created volume groups on this node.
vgscan
NOTE: The files /etc/lvmtab and /etc/lvmtab.d may not exist on some distributions.
In that case, ignore references to these files.
2. Create LVM physical volumes on each LUN. For example:
pvcreate -f /dev/sda1
pvcreate -f /dev/sdb1
pvcreate -f /dev/sdc1
3. Check whether there are already volume groups defined on this node. Be sure to give each
volume group a unique name.
vgdisplay
4. Create separate volume groups for each Serviceguard package you will define. In the following
example, we add the LUNs /dev/sda1 and /dev/sdb1 to volume group vgpkgA, and
/dev/sdc1 to vgpkgB:
vgcreate --addtag $(uname -n) /dev/vgpkgA /dev/sda1 /dev/sdb1
vgcreate --addtag $(uname -n) /dev/vgpkgB /dev/sdc1
NOTE: Use vgchange --addtag only if you are implementing volume-group activation
protection. Remember that volume-group activation protection, if used, must be implemented
on each node.
5.1 Preparing Your Systems 149