LVM Online Disk Replacement (LVM OLR)
5
Procedures
Before using LVM OLR: A Cautionary Note
Before resorting to disabling or replacing a disk or path, it is important to be certain of the
status of all the disks in the volume group, and to carefully consider the alternatives.
Detaching the wrong path or disk can have unintended consequences. Refer to the LVM
whitepaper When Good Disks Go Bad: Dealing with Disk Failures under LVM for a
description of different disk failure scenarios and how best to handle them.
Isolating a troublesome device in an active volume group
There are circumstances where it is desirable to have LVM simply stop using a given
device or path. For instance, if a disk containing mirrored data is performing badly and it is
not convenient (or possible) to hot-replace the device, it might make sense to isolate the
disk or path until the next maintenance interval when it can be serviced.
The pvchange(1M) command can be used to isolate the path or disk:
pvchange -a n path ( to detach the path only)
or
pvchange -a N path (to detach the disk referenced by the path. i.e. detach all
paths to the disk)
The command returns once the path or disk is detached.
Detaching a path or disk makes it unavailable to the volume group. If the last path to a PV
or the entire PV is detached, the PV will not be available to the volume group. Diagnostics
can be safely run on a detached device. The path or disk will remain unused by LVM until
it is re-attached or the volume group is reactivated.