Managing Serviceguard A.11.20, March 2013
where hh must be unique to the volume group you are creating. Use a unique minor number
that is available across all the nodes for the mknod command above. (This will avoid further
reconfiguration later, when NFS-mounted logical volumes are created in the volume group.)
Use the following command to display a list of existing volume groups:
ls -l /dev/*/group
3. Create the volume group and add physical volumes to it with the following commands:
vgcreate -g bus0 /dev/vgdatabase /dev/dsk/c1t2d0
vgextend -g bus1 /dev/vgdatabase /dev/dsk/c0t2d0
CAUTION: Volume groups used by Serviceguard must have names no longer than 34
characters (that is, the name that follows /dev/, in this example vgdatabase, must be at
most 34 characters long).
NOTE: If you are using cDSFs, you should be using them exclusively.
The first command creates the volume group and adds a physical volume to it in a physical
volume group called bus0. The second command adds the second drive to the volume group,
locating it in a different physical volume group named bus1. The use of physical volume
groups allows the use of PVG-strict mirroring of disks.
An LVM volume group configured using iSCSI storage in a package can have persistent
reservations and registrations on its physical volumes. When you extend the LVM volume
group to add another disk, the persistent reservation and registration keys (if any) must be
copied to the new physical volumes. To do this, you can use the vg_pr_key utility. For more
information, see “Distributing Persistent Reservation Keys on Extended Volume Groups”
(page 92).
NOTE: When you remove a physical disk containing the persistent reservation and registration
keys from a volume group using vgreduce, the keys are not removed from the disk.
4. Repeat steps 1–3 for additional volume groups.
Creating Logical Volumes
NOTE: You can create a single logical volume or multiple logical volumes by means of the
cmpreparestg (1m) command. See “Using Easy Deployment Commands to Configure the
Cluster” (page 167) and the manpage for more information. If you use cmpreparestg, you can
skip this step and proceed to “Making Physical Volume Group Files Consistent” (page 187).
Use a command such as the following to create a logical volume (the example is for /dev/
vgdatabase).
lvcreate -L 120 -m 1 -s g /dev/vgdatabase
This command creates a 120 MB mirrored volume named lvol1. The name is supplied by default,
since no name is specified in the command. The -s g option means that mirroring is PVG-strict;
that is, the mirror copy of any given piece of data will be in a different physical volume group
from the original.
NOTE: If you are using disk arrays in RAID 1 or RAID 5 mode, omit the -m 1 and -s g options.
Setting Logical Volume Timeouts
In the event that a I/O request to a logical volume never succeeds (for example, a vital set of disks
fails), your application or file system may block indefinitely. To prevent this, you can set a timeout
on the logical volume. If the device fails to respond within the timeout period, LVM will return an
I/O error to the caller. Set the timeout value using the -t option of the lvchange command. This
184 Building an HA Cluster Configuration