5.Create shared storage for a LVM volume group with mirroring for use by cluster packages. cmpreparestg –l<vgname> –p<pv_path> ... –n<node1> –n<node2>

<vgname> is the path name of the volume group that is to be created and imported to each specified node, and each <pv_path> is the name of a physical volume on the local node from which the volume group specified by <vgname> is to be created.

For example, suppose that /dev/cdisk/disk12 and /dev/cdisk/disk13 are two physical devices on the primary SCSI bus or adapter, and /dev/cdisk/disk14 and /dev/ cdisk/disk15 are two physical devices on a secondary bus or adapter, and you want the devices on the secondary bus to contain PVG-strict mirror copies, proceed as follows.

a.cmpreparestg –l /dev/vgdatabase –p /dev/cdisk/disk12 –p /dev/ cdisk/disk13 –p /dev/cdisk/disk14 –p /dev/cdisk/disk15 –n ftsys9 –n ftsys10

This configures physical devices /dev/cdisk/disk12 and /dev/cdisk/disk13 on the primary bus, and /dev/cdisk/disk14 and /dev/cdisk/disk15 on the secondary bus, into the volume group /dev/vgdatabase, and imports the volume group on the non-local node in the cluster created in step b.

b.Edit /etc/lvmpvg on node1 and node2 so the relevant portion now reads as follows:

VG /dev/vgdatabase PVG bus0 /dev/cdisk/disk12 /dev/cdisk/disk13

PVG bus1 /dev/cdisk/disk14 /dev/cdisk/disk15

NOTE: If you are not using cDSFs, you may need to change the DSF names to make sure that the DSF names point to the same physical storage on each node. If you are using cDSFs, the names are guaranteed to be the same.

c.cmpreparestg –l /dev/vgdatabase –L –o lv_opts=”-L 120 –m 1 –s g” –o fs_opts=”-F vxfs” –m /newdir –n ftsys9 –n ftsys10

This configures the logical volume /dev/vgdatabase/lvol<n> with PVG-strict mirroring from the disks on the primary bus (bus0, disks /dev/cdisk/disk12 and /dev/cdisk/ disk13) to those on the secondary bus (bus1, disks /dev/cdisk/disk14 and /dev/ cdisk/disk15). LVM supplies the logical volume number (<n>).

This command also builds a VxFS file system on the logical volume, and mounts it to /newdir. If the logical volume will be used for raw storage (for example for a database) omit the fsopts and –moptions; for example:

cmpreparestg –l /dev/vgdatabase –L –o lv_opts=”-L 120 –s g” –n ftsys9 –n ftsys10

You can also create a shared storage for a VxVM/CVM disk group for use by cluster packages. For example, suppose that /dev/disk/disk39 and /dev/disk/disk40 are two physical devices and you want to create a VxVM/CVM disk group and configure a logical volume with mirroring across the two disks, use the cmpreparestg command as follows:

cmpreparestg –g dg_sat –p /dev/disk/disk39 –p /dev/disk/disk40 –L lvol1 –o lv_opts=”100M layout=mirror nmirror=2” –o fs_opts=”-F vxfs” –m /mnt1

This command creates a VxVM/CVM disk group with name dg_sat and create a logical volume lvol1 with mirroring across the two disks /dev/disk/disk39 and /dev/disk/ disk40.

Preparing Your Systems 165

Page 165
Image 165
HP Serviceguard manual PVG bus1 /dev/cdisk/disk14 /dev/cdisk/disk15