Veritas Volume Manager 5.1 SP1 Administrator"s Guide (5900-1506, April 2011)

# vxdg [-g diskgroup] spare
The following is example output:
GROUP DISK DEVICE TAG OFFSET LENGTH FLAGS
mydg mydg02 c0t2d0 c0t2d0 0 658007 s
Here mydg02 is the only disk designated as a spare in the mydg disk group. The
LENGTH field indicates how much spare space is currently available on mydg02 for
relocation.
The following commands can also be used to display information about disks that
are currently designated as spares:
vxdisk list lists disk information and displays spare disks with a spare flag.
vxprint lists disk and other information and displays spare disks with a SPARE
flag.
The list menu item on the vxdiskadm main menu lists all disks including
spare disks.
Marking a disk as a hot-relocation spare
Hot-relocation allows the system to react automatically to I/O failure by relocating
redundant subdisks to other disks. Hot-relocation then restores the affected VxVM
objects and data. If a disk has already been designated as a spare in the disk group,
the subdisks from the failed disk are relocated to the spare disk. Otherwise, any
suitable free space in the disk group is used.
To designate a disk as a hot-relocation spare, enter the following command:
# vxedit [-g diskgroup] set spare=on diskname
where diskname is the disk media name.
For example, to designate mydg01 as a spare in the disk group, mydg, enter the
following command:
# vxedit -g mydg set spare=on mydg01
You can use the vxdisk list command to confirm that this disk is now a spare;
mydg01 should be listed with a spare flag.
Any VM disk in this disk group can now use this disk as a spare in the event of a
failure. If a disk fails, hot-relocation automatically occurs (if possible). You are
notified of the failure and relocation through electronic mail. After successful
relocation, you may want to replace the failed disk.
413Administering hot-relocation
Marking a disk as a hot-relocation spare