Notes on the LVMVG agent

LVMVG Agent Supports JFS or JFS2

The LVMVG Agents supports these file systems: JFS or JFS2. It does not support VxFS.

Volume group needs to be imported

The LVMVG agent relies on the ODM to find out the names of the disk devices that a volume group is created on. Unless a volume group is imported on the system, the ODM on that system does not contain any information about that volume group. Therefore, you must import the volume group on all the systems in the group's SystemList for the LVMVG agent to function properly.

For example, in the Sample configuration, the volume groups (vg1 and vg2) must be imported on the specified systems (sysA and sysB).

Varyonvg options

By default, the agent checks the state of the disk devices underneath the volume group. If the disk device is in a defined state, the agent resets it to an available state. You can change this by using the VaryonvgOpt attribute.

You can have the agent not check for the state of the disk devices by setting VaryonvgOpt attribute in the main.cf file to a value of "u". This option to the varyonvg command ensures that the disks underneath the volume group are not reserved when the volume group is activated.

Note   When you activate a volume group with the "u" option, ghost disks are not created. Therefore, you do not have to reset disks for these volume groups.

SyncODM Attribute

This sync happens only if this attribute is set to 1.

The LVMVG agent ensures the ODM is in sync with any changes to the volume group since it was last imported on the system. The agent maintains a timestamp file, /var/VRTSvcs/log/tmp/volume_group_name.ts, which records the time when the volume group was last imported on the system. When the agent initially brings a volume group online, the agent exports and reimports the group while initializing the timestamp file for that group. During the export and reimport processes, the agent preserves the ownership and mode information for the volume group and all its logical volumes.

The sync operation occurs when the timestamp value in the volume group's timestamp file is older than the timestamp value in the volume group's descriptor area. The timestamp value in the VGDA area of a volume group is updated after creating or deleting logical volumes, and adding or removing physical volumes.

Major Numbers

If a file system on a volume group is shared for NFS, make sure the volume group is imported with the same major number on all systems in the cluster.

To view a list of available major numbers on the system, enter the lvlstmajor command. For example:

# lvlstmajor

49, 60 ...

To import volume group vg00 with major number 60, enter:

# importvg -V 60 -y vg00 hdisk3

To view the major number assigned to a volume group, use the ls command with the -l option. For example:

# ls -l /dev/vg00

crw-r----- 1 root system 60, 0 Apr 2 16:05 /dev/vg00

Assign the same major number to the volume group on each system in the cluster. Specify this major number in the MajorNumber attribute of the LVMVG configuration.

Note   Do not specify the V option in the ImportvgOpt attribute string, the agent automatically does this.

Autoactivate Options

The "Concurrent Capable" options for importvg and mkvg used with HACMP are not required for VCS. If an LVM volume group is placed under VCS control, the autoactivate options should be turned off. Do this using SMIT or through the command line.

From SMIT, set the following field values when creating or altering the volume group:

Activate volume group AUTOMATICALLY no

at system restart?

Create VG Concurrent Capable? no

Auto-varyon in Concurrent Mode? no

From the command line, to view the current value for these fields, use the lsattr command.

For example:

# lsattr -El vg00

vgserial_id 0001632f00004c00000000ee092b3bd8 N/A False

auto_on y N/A True

conc_capable n N/A True

conc_auto_on n N/A True

timestamp 3ceff3390a8b1379 N/A True

From the command line, to change the value for these fields, use the chvg command. For example, to change the value of auto_on to "n":

1. Activate the volume group vg00 (if the volume group is not already activated):

# varyonvg vg00

2. Run the chvg command:

# chvg -a 'n' vg00

3. Verify the changes:

# lsattr -El vg00

vgserial_id 0001632f00004c00000000ee092b3bd8 N/A False

auto_on n N/A True

conc_capable n N/A True

conc_auto_on n N/A True

timestamp 3ceff3390a8b1379 N/A True

LVMVG agent support for the Subsystem Device Driver (SDD)

The LVMVG agent supports the IBM Multipathing SDD version 1.4.0.0 and later. If disks are under SDD control, create a volume group with vpath devices. Refer to the SDD Documentation for configuration and migration of volume groups.

SDD support requires the /usr/sbin/lquerypr command, which provides a set of persistent reserve functions. The lquerypr command tool comes with the SDD installation package.

The hadevice utility

The LVMVG agent provides the hadevice utility to check the status of a disk device, reset a disk device to an available state, and break any SCSI reservations on a disk device. Its syntax is:

hadevice -c | -r | -b -p device_name

The five possible states of a disk device are: available, defined and reserved, defined and unreserved, persistent reservation, and available and open.

To check the state of a disk device, enter:

# hadevice -c device_name

The following commands locate and remove ghost disks for a disk device and break any SCSI reservation on the disk device. When the -p flag follows the -b flag, it breaks any previous SCSI reservation on the device. It then obtains and retains a new reservation on the device. For SDD (vpath) disks, ghost disks are not created and both the -b and -r flags remove any persistent reservation and clear all reservation key registration on the device. The -p flag (retain reservation) is not applicable for SDD disks.

To locate and remove ghost disks and break any SCSI reservations on the disk device, enter:

# hadevice -b device_name

To locate and remove ghost disks, break any SCSI reservations on the disk device, and obtain and retain a new reservation on the device, enter:

# hadevice -b -p device_name

To reset a disk device that is in a defined state and put it into an available state, enter:

# hadevice -r device_name