vxattachd - site monitoring daemon
The vxattachd daemon monitors Veritas Volume Manager (VxVM) for disks being attached. The vxattachd daemon reattaches the detached plexes or sites if the corresponding disks become accessible.
vxattachd analyzes the output of the vxnotify command, and waits for a failed disk to attach. When a disk is attached, vxattachd attempts to online the disk, and tries to reattach detached plexes or the failed site. If a site or plex is successfully reattached, vxattachd starts recovery using vxrecover, and sends mail to root (by default) or to other specified users.
By default, vxattachd sends mail to root with information about the disk status of any attempts to reattach the site. To send mail to other users, add the user login name to the line that starts vxattachd in the startup script, For example, if the line appears as:
nohup vxattachd root &
and you want mail also to be sent to user1 and user2, change the line to read:
nohup vxattachd root user1 user2 &
Alternatively, kill the vxattachd process, and restart it from the command line with the required mail addresses as arguments.
For site reattaches, the mail notification has a format that is similar to the following:
Subject: Volume Manager site reattach on host hostname
Reattached site sitename in disk-group diskgroup
For plex reattaches, the mail notification has a format that is similar to the following:
Subject: Volume Manager auto disk attach on host hostname
Reattached device(s) dmpnode. Recovery has started on plexes belonging to this device.
If a disk from a detached site becomes accessible again, vxattachd checks whether the relocation daemon, vxrelocd, is running. If vxrelocd is running, vxattachd attempts to reattach the site. The relocation daemon can then try to relocate the failed subdisks using space on the available disks in the disk group. If the failed objects are successfully relocated, vxrelocd changes the state of the site to RECOVER, and starts the recovery of volumes at the site. When all the plexes at a site have been recovered, the plexes are put into the ACTIVE state, and the state of the site is set to ACTIVE.
If vxrelocd is not running, vxattachd only reattaches a site when all the disks from that site become accessible. After successfully reattaching a site, vxattachd changes the site state to ACTIVE, and initiates recovery using vxrecover. When all the plexes from a site have been recovered, the plexes are put into the ACTIVE state, and the state of the site is set to ACTIVE.
vxattachd does not attempt to reattach a site that has been explicitly detached by an administrator. The state OFFLINE is set for sites that have been detached by using the following command:
vxdg -g dg_name detachsite sitename
If sites are not configured in the diskgroup, vxattachd attempts to reattach individual plexes when the storage becomes accessible again. The daemon listens for dmpnode online events from vxnotify and attempts to reattach those disks to the disk group. vxattachd waits for a period of 150 seconds to collect all dmpnode online events and starts the recovery of the corresponding plexes by calling vxrecover. The number of parallel plex resync processes that gets initiated by a single vxrecover instance is limited to 10. If more storage becomes accessible after the vxrecover instance is initiated, a new vxrecover is started, which can initiate a maximum of 10 parallel resync processes.
NOTE: The vxattachd daemon does not distinguish between manually detached plexes and failure-driven detached plexes. It attempts to reattach all detached plexes when the storage comes online.
To prevent automatic recovery for a plex or a site, kill the vxattachd daemon, and prevent it from restarting. To kill the daemon, run the following command from the command line, and locate the process table entry for vxattachd:
Execute the command:
kill -9 PID
Substitute the process ID of the vxattachd process for PID. To prevent vxattachd from being restarted, comment out the line that starts vxattachd in the startup script /etc/init.d/vxvm-recover.
In the following circumstances, vxattachd may fail to function: o The vxattachd relies on dmpnode online events that are generated when the DMP restore daemon is enabled. Therefore, disabling the DMP restore daemon also disables the vxattachd functionality. The time vxattachd takes to initiate depends on the DMP restore daemon interval. See the vxdmpadm man page for information on how to control the DMP restore daemon. o The dmpnode online events from vxnotify are generated only if vxconfigd is running at the time storage becomes accessible. If the storage is reconnected when the system is down or when the system is booting, vxattachd is not able to initiate the automatic reattach. o In Cluster Volume Manager (CVM), a plex may be globally detached if one node loses access to storage. In those case, the automatic reattach will succeed only the storage being reattached is accessible to all nodes. o The automatic reattach can fail for some unexpected reason that requires manual intervention. In this case, correct the problem, then manually run the vxreattach command.
/etc/init.d/vxvm-recover The startup file for vxattachd.
kill(1), mail(1), ps(1), vxdg(1M), vxrelocd(1M), vxintro(1M), vxnotify(1M), vxrecover(1M)