LVM Online Disk Replacement (LVM OLR)

3
safely without interference or complaints from LVM. Detached devices remain that
way until they are attached again using pvchange(1M), or until the volume group is re-
activated using vgchange(1M). Detached devices are automatically attached the next
time the volume group is activated or when the system is rebooted.
Data Availability Considerations
Clearly, detaching a failed disk has no effect on data availability, since the data on the
disk was lost earlier when the disk failed. Detaching a failed disk and replacing it can
only improve the availability of the user data.
However, when considering detaching a partially functional disk or one that is
performing poorly, it is important to keep in mind that the disk likely contains some
available user data and that detaching the disk will make any available copies of the
user data on the disk unavailable. If the disk contained the only available copy of any
user data, user applications will no longer be able to access the data.
Application/Filesystem Considerations
When replacing a disk using the new LVM OLR procedure, it is not necessary to stop
the applications or remove the file system using the logical volume residing on the disk
if the data in logical volumes on the disk is mirrored and available on other disks in the
volume group. After the disk is replaced and reattached, LVM will automatically
synchronize the data from the other copies in the volume group.
However, if the data on the disk that is being replaced is not mirrored, or if the mirrored
data has been compromised due to simultaneous mirror failures, then the user data is
already lost, or will be lost when the disk is replaced. Any applications using these
logical volumes must be halted, and any file systems residing on them must be
unmounted. The user data must then be restored manually from a backup after replacing
the disk.
Be prepared with a comprehensive backup strategy that includes recent LVM
configuration backups
Although disk failures are rare, it is important to be prepared with recent backup copies
of the LVM configuration, and the data in the volume groups. Refer to the LVM
whitepaper When Good Disks Go Bad: Dealing with Disk Failures under LVM for
more information about disk replacement strategies and methods.