| United States-English |
|
|
|
![]() |
Managing Serviceguard Twelfth Edition > Chapter 5 Building
an HA Cluster ConfigurationCreating the Storage Infrastructure and Filesystems with LVM and VxVM |
|
In addition to configuring the cluster, you create the appropriate logical volume infrastructure to provide access to data from different nodes. This is done several ways:
You can also use a mixture of volume types, depending on your needs. LVM and VxVM configuration is done before configuring the cluster. CVM and CFS configuration is done after configuring the cluster. This section describes storage configuration with LVM. Separate procedures are given for the following:
The Event Monitoring Service HA Disk Monitor provides the capability to monitor the health of LVM disks. If you intend to use this monitor for your mirrored disks, you should configure them in physical volume groups. For more information, refer to the manual Using High Availability Monitors. The procedure described in this section uses physical volume groups for mirroring of individual disks to ensure that each logical volume is mirrored to a disk on a different I/O bus. This kind of arrangement is known as PVG-strict mirroring. It is assumed that your disk hardware is already configured in such a way that a disk to be used as a mirror copy is connected to each node on a different bus than the bus that is used for the other (primary) copy. For more information on using LVM, refer to the HP-UX Managing Systems and Workgroups manual. You can use SAM to prepare the volume group and logical volume structure needed for HA packages. In SAM, choose the “Disks and File Systems Area.” Then use the following procedure for each volume group and filesystem you are using with the package:
Skip ahead to the section “Deactivating the Volume Group”. If your volume groups have not been set up, use the procedure in the next sections. If you have already done LVM configuration, skip ahead to the section “Configuring the Cluster.” Obtain a list of the disks on both nodes and identify which device files are used for the same disk on both. Use the following command on each node to list available disks as they are known to each system:
In the following examples, we use /dev/rdsk/c1t2d0 and /dev/rdsk/c0t2d0, which happen to be the device names for the same disks on both ftsys9 and ftsys10. In the event that the device file names are different on the different nodes, make a careful note of the correspondences. On the configuration node (ftsys9), use the pvcreate command to define disks as physical volumes. This only needs to be done on the configuration node. Use the following commands to create two physical volumes for the sample configuration:
Use the following steps to build a volume group on the configuration node (ftsys9). Later, the same volume group will be created on other nodes.
Use the following command to create logical volumes (the example is for /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 copies of data will be in different physical volume groups.
If your installation uses filesystems, create them next. Use the following commands to create a filesystem for mounting on the logical volume just created:
If you are configuring volume groups that use mass storage on HP's HA disk arrays, you should use redundant I/O channels from each node, connecting them to separate ports on the array. Then you can define alternate links (also called PV links) to the LUNs or logical disks you have defined on the array. In SAM, choose the type of disk array you wish to configure, and follow the menus to define alternate links. The following example shows how to configure alternate links using LVM commands. In the example, the following disk configuration is assumed:
Assume that the disk array has been configured, and that both the following device files appear for the same LUN (logical disk) when you run the ioscan command:
Use the following steps to configure a volume group for this logical disk:
You can now use the vgdisplay -v command to see the primary and alternate links. LVM will now recognize the I/O channel represented by /dev/dsk/c0t15d0 as the primary link to the disk; if the primary link fails, LVM will automatically switch to the alternate I/O channel represented by /dev/dsk/c1t3d0. To create logical volumes, use the procedure described in the previous section, “Creating Logical Volumes.” After creating volume groups for cluster data, you must make them available to any cluster node that will need to activate the volume group. The cluster lock volume group must be made available to all nodes. At the time you create the volume group, it is active on the configuration node (ftsys9, for example). Before setting up the volume group for use on other nodes, you must first unmount any filesystems that reside on the volume group, then deactivate it. At run time, volume group activation and filesystem mounting are done through the package control script. Continuing with the example presented in earlier sections, do the following on ftsys9:
Use the following commands to set up the same volume group on another cluster node. In this example, the commands set up a new volume group on ftsys10 which will hold the same physical volume that was available on ftsys9. You must carry out the same procedure separately for each node on which the volume group's package can run. To set up the volume group on ftsys10, use the following steps:
Skip ahead to the next section if you do not use physical volume groups for mirrored individual disks in your disk configuration. Different volume groups may be activated by different subsets of nodes within a Serviceguard cluster. In addition, the physical volume name for any given disk may be different on one node than it is on another. For these reasons, you must carefully merge the /etc/lvmpvg files on all nodes so that each node has a complete and consistent view of all cluster-aware disks as well as of its own private (non-cluster-aware) disks. To make merging the files easier, be sure to keep a careful record of the physical volume group names on the volume group planning worksheet (described in the “Planning” chapter). Use the following procedure to merge files between the configuration node (ftsys9) and a new node (ftsys10) to which you are importing volume groups:
The foregoing sections show in general how to create volume groups and logical volumes for use with Serviceguard. Repeat the procedure for as many volume groups as you need to create, substituting other volume group names, logical volume names, and physical volume names. Pay close attention to the disk device names. For example, /dev/dsk/c0t2d0 on one node may not be /dev/dsk/c0t2d0 on another node. In addition to configuring the cluster, you create the appropriate logical volume infrastructure to provide access to data from different nodes. This is done with Logical Volume Manager (LVM), VERITAS Volume Manager (VxVM), or VERITAS Cluster Volume Manager (CVM). You can also use a mixture of volume types, depending on your needs. LVM and VxVM configuration are done before cluster configuration, and CVM configuration is done after cluster configuration. For a discussion of migration from LVM to VxVM storage, refer to Appendix G. This section shows how to configure new storage using the command set of the VERITAS Volume Manager (VxVM). Once you have created the root disk group (described next), you can use VxVM commands or the Storage Administrator GUI, VEA, to carry out configuration tasks. Details are given in the VERITAS Volume Manager for HP-UX Release Notes. For more information, refer to the VERITAS Enterprise Administrator (VEA 500 Series) Getting Started. If you are using commands, refer to the VxVM man pages. With CVM 3.5, if you are about to create disk groups for the first time, you need to initialize the Volume Manager. This is done by creating a disk group known as rootdg that contains at least one disk. Use the following command once only, immediately after installing VxVM on each node: # vxinstall This displays a menu-driven program that steps you through the VxVM initialization sequence. From the main menu, choose the “Custom” option, and specify the disk you wish to include in rootdg.
You can use the vxvmconvert(1m) utility to convert LVM volume groups into VxVM disk groups. Before you can do this, the volume group must be deactivated, which means that any package that uses the volume group must be halted. Follow the conversion procedures outlined in the VERITAS Volume Manager Migration Guide. Before you start, be sure to create a backup of each volume group’s configuration with the vgcfgbackup command, and make a backup of the data in the volume group. Appendix G “Migrating from LVM to VxVM Data Storage ” for additional details about conversion. You need to initialize the physical disks that will be employed in VxVM disk groups. To initialize a disk, log on to one node in the cluster, then use the vxdiskadm program to initialize multiple disks, or use the vxdisksetup command to initialize one disk at a time, as in the following example: # /usr/lib/vxvm/bin/vxdisksetup -i c0t3d2 If a physical disk has been previously used with LVM, you should use the pvremove command to delete the LVM header data from all the disks in the volume group. In addition, if the LVM disk was previously used in a cluster, you have to re-initialize the disk with the pvcreate -f command to remove the cluster ID from the disk.
You can remove LVM header data from the disk as in the following example (note that all data on the disk will be erased):# pvremove /dev/rdsk/c0t3d2 Then, use the vxdiskadm program to initialize multiple disks for VxVM, or use the vxdisksetup command to initialize one disk at a time, as in the following example: # /usr/lib/vxvm/bin/vxdisksetup -i c0t3d2 Use vxdiskadm, or use the vxdg command, to create disk groups, as in the following example: # vxdg init logdata c0t3d2 Verify the configuration with the following command: # vxdg list
Use the vxassist command to create logical volumes. The following is an example: # vxassist -g logdata make log_files 1024m This command creates a 1024 MB volume named log_files in a disk group named logdata. The volume can be referenced with the block device file /dev/vx/dsk/logdata/log_files or the raw (character) device file /dev/vx/rdsk/logdata/log_files. Verify the configuration with the following command: # vxprint -g logdata The output of this command is shown in the following example:
If your installation uses filesystems, create them next. Use the following commands to create a filesystem for mounting on the logical volume just created:
After creating the disk groups that are to be used by Serviceguard packages, use the following command with each disk group to allow the disk group to be deported by the package control script on other cluster nodes: # vxdg deport <DiskGroupName> where <DiskGroupName> is the name of the disk group that will be activated by the control script. When all disk groups have been deported, you must issue the following command on all cluster nodes to allow them to access the disk groups: # vxdctl enable After deporting disk groups, they are not available for use on the node until they are imported again either by a package control script or with a vxdg import command. If you need to import a disk group manually for maintenance or other purposes, you import it, start up all its logical volumes, and mount filesystems as in the following example: # vxdg import dg_01 # vxvol -g dg_01 startall # mount /dev/vx/dsk/dg_01/myvol /mountpoint
At system reboot time, the cmcluster RC script does a vxdisk clearimport on all disks formerly imported by the system, provided they have the noautoimport flag set, and provided they are not currently imported by another running node. The clearimport clears the host ID on the disk group, to allow any node that is connected to the disk group to import it when the package moves from one node to another. Using the clearimport at reboot time allows Serviceguard to clean up following a node failure, for example, a system crash during a power failure. Disks that were imported at the time of the failure still have the node’s ID written on them, and this ID must be cleared before the rebooting node or any other node can import them with a package control script. Note that the clearimport is done for disks previously imported with noautoimport set on any system that has Serviceguard installed, whether it is configured in a cluster or not. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||