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 changes the value of the VxVM noautoimport flag from off to on. This action allows VCS to maintain control of importing the disk group. The monitor function uses following command to set the noautoimport flag to on.

# 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 DiskGroup info agent function gets information from the Volume Manager and displays the type and free size for the DiskGroup resource.

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

In the following example, the info agent function executes every 60 seconds:

# haconf -makerw
# hatype -modify DiskGroup InfoInterval 60

The command to retrieve information about the DiskType and FreeSize of the DiskGroup resource is:

# hares -value diskgroupres ResourceInfo

Output includes:

DiskType sliced
FreeSize 35354136

The value specified is in kilo bytes.

Action

Different action agent functions 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 UDIDs (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.