The following scenario replaces a failed or failing disk associated with a physical volume within a mirrored volume group. In the instructions, you use the Configuration Manager to configure the new disk (named
hdisk10), and then use the
replacepv command to replace a physical volume in a mirrored volume group that resides, at least in part, on a failed disk drive (named
hdisk02) without losing the physical volume's contents. You do not need to reboot or schedule downtime to complete the following procedure.
- Select a new disk drive that has a capacity at least as large as the failed disk.
- With root authority, run the Configuration Manager to configure the new disk. Type the following on the command line:
cfgmgr -l hdisk10
The -l flag allows you to configure only the specified device and any "child" devices. Without this flag, the cfgmgr command runs Configuration Manager against the entire system.
- Replace the physical volume so it can begin using the new disk, using the following command:
Note:
If the mirror for the logical volume is stale, the replacepv command does not work correctly.
replacepv hdisk02 hdisk10
- When the associated mirrored volume group is the rootvg, you must also run the following commands to clear the failed disk from and add the new disk to the boot image:
chpv -c hdisk02
bootlist hdisk10
bosboot -a
The chpv -c command clears hdisk02 from the boot image. The bootlist command adds hdisk10 to the list of possible boot devices from which the system can be booted. The bosboot -a command creates a complete boot image on the default boot logical volume.
At this point, the physical volume
hdisk02 now maps to the newly configured
hdisk10.