Managing Serviceguard Nineteenth Edition, Reprinted June 2011
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 153) 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 173).
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
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.
NOTE: You can create file systems by means of the cmpreparestg (1m) command. See
“Using Easy Deployment Commands to Configure the Cluster” (page 153) for more information. If
you use cmpreparestg, you can skip the procedure that follows, and proceed to “Making Physical
Volume Group Files Consistent” (page 173).
Use the following commands to create a file system for mounting on the logical volume just created.
1. Create the file system on the newly created logical volume:
newfs -F vxfs /dev/vgdatabase/rlvol1
Note the use of the raw device file for the logical volume.
2. Create a directory to mount the disk:
mkdir /mnt1
3. Mount the disk to verify your work:
mount /dev/vgdatabase/lvol1 /mnt1
Note the mount command uses the block device file for the logical volume.
4. Verify the configuration:
vgdisplay -v /dev/vgdatabase
Preparing Your Systems 171