VxVM hot-relocation allows the system to automatically react to I/O failures on a redundant VxVM object at the subdisk level and then take necessary action to make the object available again. This mechanism detects I/O failures in a subdisk, relocates the subdisk, and recovers the plex associated with the subdisk. After the disk has been replaced,
vxunreloc allows you to restore the system back to the configuration that existed before the disk failure.
vxunreloc allows you to move the hot-relocated subdisks back onto a disk that was replaced due to a failure.
vxunreloc is invoked, you must specify the disk media name where the hot-relocated subdisks originally resided. When
vxunreloc moves the subdisks, it moves them to the original offsets. If you try to unrelocate to a disk that is smaller than the original disk that failed,
vxunreloc does nothing except return an error.
vxunreloc provides an option to move the subdisks to a different disk from where they were originally relocated. It also provides an option to unrelocate subdisks to a different offset as long as the destination disk is large enough to accommodate all the subdisks.
vxunreloc cannot replace the subdisks back to the same original offsets, a force option is available that allows you to move the subdisks to a specified disk without using the original offsets.
vxunreloc(1M) manual page.
The examples in the following sections demonstrate the use of
mydg01 failed and all the subdisks were relocated. After
mydg01 is replaced,
vxunreloc can be used to move all the hot-relocated subdisks back to
vxunreloc -g mydg mydg01
vxunreloc utility provides the
-n option to move the subdisks to a different disk from where they were originally relocated.
mydg01 failed, and that all of the subdisks that resided on it were hot-relocated to other disks.
vxunreloc provides an option to move the subdisks to a different disk from where they were originally relocated. After the disk is repaired, it is added back to the disk group using a different name, for example,
mydg05. If you want to move all the hot-relocated subdisks back to the new disk, the following command can be used:
vxunreloc -g mydg -n mydg05 mydg01
The destination disk should have at least as much storage capacity as was in use on the original disk. If there is not enough space, the unrelocate operation will fail and none of the subdisks will be moved.
vxunreloc attempts to move hot-relocated subdisks to their original offsets. However,
vxunreloc fails if any subdisks already occupy part or all of the area on the destination disk. In such a case, you have two choices:
-foption provided by
vxunrelocto move the subdisks to the destination disk, but leave it to
vxunrelocto find the space on the disk. As long as the destination disk is large enough so that the region of the disk for storing subdisks can accommodate all subdisks, all the hot-relocated subdisks will be unrelocated without using the original offsets.
mydg01 failed and the subdisks were relocated and that you want to move the hot-relocated subdisks to
mydg05 where some subdisks already reside. You can use the force option to move the hot-relocated subdisks to
mydg05, but not to the exact offsets:
vxunreloc -g mydg -f -n mydg05 mydg01
If a subdisk was hot relocated more than once due to multiple disk failures, it can still be unrelocated back to its original location. For instance, if
mydg01 failed and a subdisk named
mydg01-01 was moved to
mydg02, and then
mydg02 experienced disk failure, all of the subdisks residing on it, including the one which was hot-relocated to it, will be moved again. When
mydg02 was replaced, a
vxunreloc operation for
mydg02 will do nothing to the hot-relocated subdisk
mydg01-01. However, a replacement of
mydg01 followed by a
vxunreloc operation, moves
mydg01-01 back to
vxunreloc is run immediately after the replacement.
After the disk that experienced the failure is fixed or replaced,
vxunreloc can be used to move all the hot-relocated subdisks back to the disk. When a subdisk is hot-relocated, its original disk-media name and the offset into the disk are saved in the configuration database. When a subdisk is moved back to the original disk or to a new disk using
vxunreloc, the information is erased. The original disk-media name and the original offset are saved in the subdisk records. To print all of the subdisks that were hot-relocated from
mydg01 in the
mydg disk group, use the following command:
vxprint -g mydg -se 'sd_orig_dmname="mydg01"'