LVM Online Disk Replacement (LVM OLR)

2
Abstract
The LVM Online Disk Replacement (OLR) feature provides new methods for replacing
or isolating path components or LVM disks within an active volume group:
v Using new commands options, LVM OLR enables the system administrator to
follow a simpler procedure for replacing disks in an active volume group. The
procedure does not require deactivating the volume group, modifying the
volume group configuration or moving any user data.
v LVM OLR can also be easily employed to isolate troublesome paths or disks to
allow running diagnostics against them.
In the past, replacing a disk in an active volume group usually required moving any
logical volumes from the disk and then removing the disk from the volume group
configuration beforehand. Now with the introduction of LVM OLR this is unnecessary.
Replacing a disk typically only requires invoking a command to inform LVM to stop
using the disk, and then performing the steps necessary to replace it.
There was formerly no command to prevent LVM from accessing any device in an
active volume group. Now LVM OLR can be used to force LVM to relinquish control
of a path or all the paths to a device so that diagnostics can be run against them.
Overview
Attached Devices
An attached device is one that can be freely accessed by LVM at any time. LVM
typically attaches all the disks belonging to a volume group when the volume group is
activated or re-activated via the vgchange(1M) command. All the devices in an active
volume group should be presumed to be attached by LVM regardless of their status,
unless they have been explicitly detached.
Detached Devices
Since attached devices can potentially be accessed by LVM at any time, they must first
be detached before they can be safely replaced or before diagnostics can be run on
them. A detached device is still part of the volume group but it is not accessed by LVM.
Detaching a device directs LVM to conclude any LVM operations pending to the device
and prepare for the device to be replaced. Formerly, without LVM OLR, devices were
detached only when the volume group was deactivated, consequently a volume group
had to be deactivated before servicing a disk or path.
LVM OLR
LVM OLR provides new options to the pvchange(1M) command to allow detaching and
reattaching a specific device while the volume group remains active. Once a device has
been detached, site specific diagnostics can be run, and/or the device can be replaced