LVM Online Disk Replacement (LVM OLR)

6
LVM Online Disk Replacement Procedure
Devices that are hot-replaceable can be replaced online using the LVM OLR feature
without deactivating the volume group or changing the volume group configuration.
1. Prepare to replace a failed disk:
Determine if there are unmirrored logical volumes on the disk or any mirrored logical
volumes that may have been compromised due to simultaneous failures. Halt any
applications and unmount any file systems using these logical volumes. See the section
entitled: When replacing a disk requires halting applications and restoring data from a
backup for more information.
Halting applications and unmounting file systems is only necessary when the data is not
mirrored or the mirrors have been compromised. In these circumstances, the data must be
restored from backup (at a later step). Halting any activity first, prevents the applications or
file systems from writing inconsistent data over the newly restored replacement disk.
2. Detach the device using a new pvchange(1M) command option:
pvchange -a n path
or
pvchange -a N path (to detach all paths to the physical volume)
Pvchange(1M) returns once the path or physical volume 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
indicated to be detached, the PV will not be available to the volume group.
3. Manually replace or repair the disk or path, and/or run site specific diagnostics as
necessary to determine any problems with the device.
4. When replacing a boot disk on an IPF system, setup the disk partitions (otherwise skip to
step 5):
idisk -wf partitionfile disk
(Note the disk refers to the disk device and partitionfile is a text Partition
Description File, see the idisk(1M) manpage for the details)
5. When replacing boot or non-boot disks on any system, initialize the LVM information
on the disk so it is identified as a replacement disk when it is later attached:
vgcfgrestore n vg path
(Note that for IPF boot disks the path refers to partition 2 of the disk)