To initialize a disk for CVM, log on to the master node, 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 c4t3d4

Creating Disk Groups

Use the following steps to create disk groups.

1.Use the vxdg command to create disk groups. Use the -soption to specify shared mode, as in the following example:

vxdg -s init logdata c0t3d2

2.Verify the configuration with the following command:

vxdg list

NAME

STATE

ID

logdata enabled,shared 972078742.1084.node2

3.Activate the disk group, as follows, before creating volumes: vxdg -g logdata set activation=sw

Mirror Detachment Policies with CVM

The default CVM disk mirror detachment policy is global, which means that as soon as one node cannot see a specific mirror copy (plex), all nodes cannot see it as well. The alternate policy is local, which means that if one node cannot see a specific mirror copy, then CVM will deactivate access to the volume for that node only.

The global policy is recommended, because it ensures all nodes are accessing the same current data. If you use local, it can cause problems if one node cannot update one of the mirror copies and the data on that copy goes stale. If any of the other nodes read from that mirror copy, they will read stale data. This can be avoided with the global option, because all nodes will only use the current mirror copy, so they will all read consistent data.

This policy can be reset on a disk group basis by using the vxedit command, as follows:

vxedit set diskdetpolicy=[globallocal] <DiskGroupName>

NOTE: The specific commands for creating mirrored and multipath storage using CVM are described in the HP-UX documentation for the Veritas Volume Manager, posted at http:// www.hp.com/go/hpux-core-docs.

Creating Volumes

Use the vxassist command to create volumes, as in the following 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:

vxdg list

Now deport the disk groups:

vxdg deport <disk group name>

Adding Disk Groups to the Package Configuration

Next you need to specify the CVM disk groups for each package that uses them. You do this in the package configuration file for modular packages and in the package control script for legacy

Configuring the Cluster 221

Page 221
Image 221
HP Serviceguard manual Adding Disk Groups to the Package Configuration, Usr/lib/vxvm/bin/vxdisksetup -i c4t3d4