switchdiskl(1M) — Series 800 Only
Requires Optional SwitchOver/UX Software
NAME
switchdiskl − lock disks
SYNOPSIS
switchdiskl [-f infofile] [-c] hostname
Remarks:
This command requires installation of optional SwitchOver/UX software (not included in the standard HP-UX operating system) before it can be used.
DESCRIPTION
switchdiskl sets (or, with the -c option, clears) disk locks. These locks prevent two processors from trying to use the same disks during a SwitchOver/UX takeover, when a standby processor detects that a primary processor has failed, and reboots from the primary’s disks.
Arguments
-f infofile infofile Specify the switch-over information file. Default is /etc/switch/Switchinfo.
-c Clear locks owned by processor executing the switchdiskl command.
hostname Name of the host running the switchdiskl command.
switchdiskl reads the information file and finds the section describing the given host. In that section, it looks for the rootdisk, rootmir, and rootthird entries. The rootdisk entry gives the name of the root disk used by that host. The rootmir entry appears only when the root is mirrored. The rootmir entry names the secondary half of the mirror in the case of mirroring with DataPair, and the second boot device in the case of mirroring with the Logical Volume Manager. The rootthird entry appears only when there is a third copy of root, and names the third boot device. This entry is only used in the case of three-way mirroring with the Logical Volume Manager. All entries use the host’s name for these disks; this is in contrast to the rootdisk#, rootmir#, and rootthird# entries in the section describing the standby, which use the standby’s names.
switchdiskl (without -c option) is run at boot-up on both primary and standby hosts. Its function in this case is to claim the disks for the running processor.
The lock is a (binary) file named LABEL in section 6 of the disk containing the root file system. (SwitchOver/ UX requires that the root be on a disk with a boot section in section 6). The lock contains the software ID of the processor owning it. The lock is examined both when the disk is originally opened, and whenever the logical connection to the disk is broken (as a result of a reset or a power failure).
As part of the takeover procedure, the standby processor overwrites the primary’s lock with its own ID, then sends a reset to the disk. This causes the primary to re-read the lock and halt in case it has not actually failed. The standby then clears its own locks using switchdiskl -c.
switchdiskl -c should also appear in each host’s shutdown script, to minimize cases where a host’s disks are left locked when the host is not running.
Disks locked by a given processor normally cannot be booted by another processor. If this is unacceptable for a given application, ensure that the disks are not being used then use the hpuxboot command with its -F flag to force the processor to boot regardless of the contents of the lock (see hpuxboot(1M)).
Only users with appropriate privileges can run switchdiskl.
FILES
/etc/switch/disklock subprogram
/etc/switch/Switchinfo
default SwitchOver/UX information file
AUTHOR
switchdiskl was developed by HP.
SEE ALSO
switchheartb(1m), switchreadp(1m), switchsetlan(1m), switchsetflg(1m), switchinfo(4).
Hewlett-Packard Company — HP-UX Release 9.03: April 1994