LVM Online Disk Replacement (LVM OLR)

4
Commands
Pvchange(1M)
Detaching a path
pvchange –a n dev
The pvchange(1M) command provides a new a n option that allows detaching the
device associated with a specific path to a disk. Detaching the active path to a
multiported device causes LVM to begin using an alternate path to the disk, if one is
available and configured. If there are alternate paths to the disk that are still attached,
the disk may still be in use by LVM even when the specified path is not.
Detaching a physical volume
pvchange a N dev
The pvchange(1M) command provides a new a N option to allow detaching all the
paths to a physical volume. Detaching the last path to a physical volume detaches the
associated physical volume from the volume group. Detaching the paths using
pvchange(1M) a N is equivalent to using pvchange(1M) a n repeatedly to detach all
the paths to a PV. When a PV is detached it is unavailable to the volume group. The
administrator may then run any diagnostic command on the disk or alternate paths to it
without any concern that it will affect the volume group.
Attaching a path
pvchange a y dev
The pvchange(1M) command provides a new a y option to attach the device associated
with a specific path to a disk. Attaching a path to a physical volume informs LVM to
examine the disk and resume using it if possible. If a disk has multiple paths each path
must be individually attached to make them all available.
Vgcfgrestore(1M)
Initializing a replaced disk
vgcfgrestore n vg dev
Executing vgcfgrestore(1M) is necessary after a disk is replaced, prior to reattaching it
to the volume group, so that LVM recognizes that the disk is a replacement for the disk
that was there before. The disk must be detached prior to running vgcfgrestore(1M).