Managing HP Serviceguard for Linux Ninth Edition, April 2009

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.
Building Volume Groups and Logical Volumes
1. Use Logical Volume Manager (LVM) to create volume groups that can be activated
by Serviceguard packages.
For an example showing volume-group creation on LUNs, see “Building Volume
Groups: Example for Smart Array Cluster Storage (MSA 2000 Series)” (page 164).
(For Fibre Channel storage you would use device-file names such as those used
in the section “Creating Partitions” (page 161).)
2. On Linux distributions that support it, enable activation protection for volume
groups. See “Enabling Volume Group Activation Protection” (page 163).
3. To store data on these volume groups you must create logical volumes. The
following creates a 500 Megabyte logical volume named /dev/vgpkgA/lvol1
and a one Gigabyte logical volume named /dev/vgpkgA/lvol2 in volume group
vgpkgA:
lvcreate -L 500M vgpkgA
lvcreate -L 1G vgpkgA
4. Create a file system on one of these logical volumes, and mount it in a newly
created directory:
mke2fs -j /dev/vgpkgA/lvol1
mkdir /extra
mount -t ext3 /dev/vgpkgA/lvol1 /extra
Preparing Your Systems 165