Managing HP Serviceguard for Linux, Sixth Edition, August 2006

Building an HA Cluster Configuration
Creating the Logical Volume Infrastructure
Chapter 5156
Building Volume Groups and Logical Volumes
Step 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 500
Series)” on page 153. (For Fibre Channel storage you would use
device-file names such as those used in the section “Creating Partitions
on page 149.) See also the Logical Volume Manager How To at
www.linuxdoc.org/HowTo/LMV-HOWTO.html
Step 2. On Linux distributions that support it, enable activation protection for
volume groups. See “Enabling VG Activation Protection” on page 152.
Step 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
Step 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
NOTE Serviceguard for Linux supports the ext3, reiserfs and XFS journaling
filesystems. Reiserfs and XFS may not be available on Red Hat. All three
are available on SLES9.
Step 5. To test that the file system /extra was created correctly and with high
availability, you can create a file on it, and read it.
# echo "Test of LVM" >> /extra/LVM-test.ascii
# cat /extra/LVM-test.ascii