Agent functions for DiskGroup agent

Online

Imports the disk group using the vxdg command.

Offline

Deports the disk group using the vxdg command.

Monitor

Determines if the disk group is online or offline using the vxdg command. The Monitor function sets the VxVM noautoimport flag. This action allows VCS to maintain control of importing the disk group. The monitor function uses the following command to set the noautoimport flag:

# vxdg -g disk_group set autoimport=no

If IMF is enabled for the DiskGroup agent, the resource is monitored asynchronously and any change in the disk group state is immediately sent to the DiskGroup agent for appropriate action.

Clean

Terminates all ongoing resource actions and takes the resource offline - forcibly when necessary.

Info

The Info function gets information from the Volume Manager and displays the type and free size for the DiskGroup resource.

Initiate the Info function by setting the InfoInterval timing to a value greater than 0.

In the following example, the Info function executes every 60 seconds:

# haconf -makerw
# hatype -modify DiskGroup InfoInterval 60

Enter the following command to retrieve information about the DiskType and FreeSize of the DiskGroup resource:

# hares -value diskgroupres ResourceInfo

Output includes:

DiskType sliced
FreeSize 35354136

The value specified is in kilo bytes.

Action

Different actions follow:

  • license.vfd

    Checks for valid Veritas Volume manager license - if one is not found use the vxlicinst utility to install a valid license key.

  • disk.vfd

    Checks if all disks in diskgroup are visible on host - if it fails, check if the path to disks exists from the host and check if LUN masking and zoning are set properly.

  • udid.vfd

    Checks the UDID (unique disk identifiers) of disks on the cluster nodes - if it fails, ensure that the disks that are used for the disk group are the same on all cluster nodes.

  • verifyplex.vfd

    Checks if the number of plexes on each site for the Campus Cluster setup are set properly - if it fails, check that the sites, disks, and plexes are set properly for a Campus Cluster setup.

  • volinuse

    Checks if open volumes are in use or file systems on volumes that are mounted outside of VCS configuration.

See High availability fire drill.

imf_init

Initializes the agent to interface with Intelligent monitoring framework (IMF). The function runs when the agent starts up.

imf_getnotification

Waits for notification about disk group state changes. The function runs after the agent initializes with IMF. The function waits for notification. Upon receiving notification, the agent takes action on the resource.

imf_register

Registers the resource entities, which the agent must monitor using IMF. The function runs for each resource after the resource goes into a steady state, either online or offline.