** Credit IBM web
Replacing a failed physical volume in a mirrored volume group
The following procedures replace a failed physical volume (PV) within a mirrored volume group. The
replacepv command provides a method for replacing a failed PV in most configurations. An alternative procedure is also provided for configurations where the
replacepv command cannot be used.
| The information in this how-to was tested using AIX® 5.3. If you are using a different version or level of AIX, the results you obtain might vary significantly. |
Prerequisites

· All logical volumes using the failed PV have valid copies on other available PVs (with the possible exception of a dedicated dump logical volume).
Replacing a failed PV using the replacepv command
Prerequisites
If any of the prerequisites listed below cannot be met, see the alternate procedure.
· The volume group containing the failed PV is not rootvg.
· The replacement PV can be added to the volume group containing the failed PV (this might not be possible depending on the PV size and volume group characteristics, such as MAX PPs per PV).
· The replacement PV must be able to be configured into the system at the same time as the failing PV.
· The replacement PV's name can differ from the failed PV's name.
· The size of the replacement PV must be at least the size of the failed PV.
· The volume group containing the failed PV must not be a snapshot volume group or have a snapshot volume group.
Complete the following steps, assuming that the failed PV is hdisk2 and the replacement PV is hdisk10:
1. If the replacement PV is not yet installed on the system, perform the steps necessary to install it. To use the configuration manager to define a new PV, run the following command:
cfgmgr
Use the
lspv command to determine the name assigned to the PV. For this example, assume that the new PV is named hdisk10.
2. To replace the failed PV with the one defined in Step 1, run the following command:
replacepv hdisk2 hdisk10
When the command runs, hdisk2 is replaced by hdisk10, and hdisk2 is no longer assigned to a volume group.
3. To undefine the failed PV, run the following command:
rmdev -dl hdisk2
4. Physically remove the failed disk from the system.
5. Verify that the procedure was successful by completing the following steps:
· To check that all logical volumes are mirrored to the new PV as desired, run the following