Example of recovering from a failed disk drive
To recover from a failed disk drive, back out the way you came in; that is, list the steps you went through to create the volume group, and then go backwards.
The following example is an illustration of this technique. It shows
how a mirrored logical volume was created and then how it was altered, backing
out one step at a time, when a disk failed.
Note: The following example illustrates
a specific instance. It is not intended as a general prototype on which to
base any general recovery procedures.
After Jane created the mirrored workvg volume group, hdisk2 failed.
Therefore, she took the following steps to recover:
- She removed the logical volume copy from hdisk2 by typing:
rmlvcopy testlv 2 hdisk2
- She detached hdisk2 from the system so that the ODM and VGDA are updated,
by typing:
reducevg workvg hdisk2
- She removed hdisk2 from the system configuration to
prepare for replacement by typing:
rmdev -l hdisk2 -d
- She chose to shut down the system, by typing:
shutdown -F
- She replaced the disk. The new disk did not have the same SCSI ID as the former hdisk2.
- She rebooted the system.
Because you have a new disk (the system sees that there is a new PVID on this disk), the system chooses the first open hdisk name. Because the -d flag was used in step 3, the name hdisk2 was released, so the system chose hdisk2 as the name of the new disk. If the -d flag had not been used, hdisk4 would have been chosen as the new name.
- Jane added this disk into the workvg volume group by typing:
extendvg workvg hdisk2
- She created two mirrored copies of the logical volume by typing:
mklvcopy testlv 3
The Logical Volume Manager automatically placed the third logical volume copy on the new hdisk2.