HP Serviceguard Creating Logical Volumes, Creating File Systems, Setting Logical Volume Timeouts

Models: Serviceguard

1 407
Download 407 pages 39.81 Kb
Page 180
Image 180

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 35 characters (that is, the name that follows /dev/, in this example vgdatabase, must be at most 35 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.

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 162) 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 183).

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 -toption of the lvchange command. This sets the timeout value in seconds for a logical volume. For example, to set the timeout for /dev/ vg01/lvol1 to one minute, enter the following command:

lvchange -t 60 /dev/vg01/lvol1

TIP: Set the logical volume timeout to an integral multiple of any timeout assigned to the underlying physical volumes. Otherwise, the actual duration of the I/O request can exceed the logical volume timeout. For details on how to change the I/O timeout value on a physical volume, see the manpage for pvchange (1m).

Creating File Systems

If your installation uses file systems, create them next. If you want to use the Logical Volume group (LVM) as a shared LVM, then do not create a file system on the shared logical volume group.

180 Building an HA Cluster Configuration

Page 180
Image 180
HP Serviceguard manual Creating Logical Volumes, Creating File Systems, Setting Logical Volume Timeouts