Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
Configuring OPS Clusters with ServiceGuard OPS Edition > Chapter 5 Building an OPS Cluster Configuration

Creating a Non-OPS Storage Infrastructure with VxVM

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

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.

This section shows how to configure non-OPS storage using the VERITAS Volume Manager (VxVM). Before starting, make sure the directory in which VxVM commands are stored (/usr/lib/vxvm/bin) is in your path. Once you have created the root disk group (described next), you can use VxVM commands or the Storage Administrator GUI, vmsa, to carry out configuration tasks. If you are using vmsa, be sure the Storage Administrator server is running before you launch the GUI. Details are given in the VERITAS Volume Manager for HP-UX Release Notes. For more information, refer to the VERITAS Volume Manager Storage Administrator Administrator's Guide. If you are using commands, refer to the VxVM man pages.

Initializing the VERITAS Volume Manager

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, after installing VxVM on each node:

# vxinstall

This displays a menu-driven program that steps you through the VxVM/CVM initialization sequence. From the main menu, choose the "Custom" option, and specify the disk you wish to include in rootdg.

IMPORTANT: The rootdg in the VERITAS Volume Manager is not the same as the HP-UX root disk, and cannot be used for the HP-UX root file system (/). Note also that rootdg cannot be used for shared storage. However, rootdg can be used for other local filesystems (e.g., /export/home), so it need not be wasted.

Note that you should create a root disk group only once on each node.

Converting Disks from LVM to VxVM

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. Refer also to Appendix E, "Migrating from LVM to VxVM Data Storage" for additional details about conversion.

Initializing Disks for VxVM

You need to initialize the physical disks that will be employed in VxVM disk groups. 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. This command makes the disk and its data unusable by LVM, and allows it to be initialized by VxVM. (The command should only be used if you have previously used the disk with LVM and do not want to save the data on it. If you wish to save the data, then use the conversion process described in the previous section.

To initialize a disk for VxVM, 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 /dev/dsk/c0t3d2

Creating Disk Groups

The following steps should be used to create disk groups.

  1. Use the vxdg command to create disk groups, as in the following example:

    # vxdg init logdata c0t3d2

  2. Verify the configuration with the following command:

    # vxdg list

    NAME         STATE                  ID

    rootdg enabled 971995699.1025.node1
    logdata enabled 972078742.1084.node1

Creating Volumes

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:

TY  NAME       ASSOC        KSTATE   LENGTH   PLOFFS   STATE   TUTILO  PUTILO

v logdata fsgen ENABLED 1024000 ACTIVE
pl logdata-01 system ENABLED 1024000 ACTIVE
NOTE: The specific commands for creating mirrored and multi-path storage using VxVM are described in the HP-UX documentation for the VERITAS Volume Manager.

Creating File Systems

If your installation uses file systems, create them next. 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 volume:

    # newfs -F vxfs /dev/vx/rdsk/logdata/log_files

  2. Create a directory to mount the volume:

    # mkdir /logs

  3. Mount the volume:

    # mount /dev/vx/dsk/logdata/log_files /logs

  4. Check to make sure the file system is present, then unmount the file system:

    # umount /logs

Deporting Disk Groups

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 imported by the package control script on several 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

Re-Importing Disk Groups

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

NOTE: Unlike LVM volume groups, VxVM disk groups are not entered in the cluster ASCII configuration file, and they are not entered in the package ASCII configuration file.

Clearimport at System Reboot Time

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.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.