LVM Online Disk Replacement (LVM OLR)
7
6. Attach each path to the device using a new pvchange(1M) command option:
pvchange -a y path
After processing the pvchange(1M) command, LVM will resume using the device if
possible. If it is desirable to attach all the paths in the entire volume group at once, this step
can be skipped, step 7 would suffice to bring all the replaced devices online again.
7. Attach all the VG devices using vgchange(1M) to resume automatically recovering any
other unattached disks in the volume group:
vgchange -a mode vg
(The mode is whatever mode that the vg is already activated in: i.e. y, s or e)
Re-activating the volume group using vgchange(1M) attaches all the paths for all the disks
in the volume group and resumes automatically recovering any unattached failed disks in
the volume group. Vgchange(1M) should only be done after all work has been completed
on all the disks and paths in the VG, and it is desirable to attach them all.
8. If replacing a boot disk on any system, initialize the boot data
mkboot –e –l disk (–e and –l options are for IPF boot disks only)
lvlnboot –v –R vg
Verify the lvlnboot(1M) output indicates the proper root, boot, swap and dump logical
volumes. If not, use the lvlnboot(1M) command to explicitly set them.
9. If there were unmirrored logical volumes or any compromised mirrored logical volumes
on the disk, restore the data from backup, mount the file systems, and restart any
applications that were interrupted during step 1. This step is not necessary when all the
logical volumes on the replaced disk are mirrored and none are compromised.
If there are mirrored logical volumes residing on the disk, LVM will automatically
synchronize the data on the disk with the available mirror copies on other disks in the
volume group.
Notes:
v Disks cannot be replaced in read-only volume groups since the volume group must
be activated in some writeable mode to allow LVM to synchronize the data on the
replaced disk.
v Disks that are detached are not spared. For instance, if there is a spare PV associated
with the VG LVM will not automatically replace the detached disk with the spare.
v Adding a new path to a detached disk using vgextend(1M) will cause the disk to be
attached and accessed by LVM again via the new path.
v There are special considerations for disks that are part of Serviceguard clusters,
see the section entitled Replacing an LVM disk in a Serviceguard Cluster volume group.