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.
  1. The system manager, Jane, created a volume group called workvg on hdisk1, by typing:
    mkvg -y workvg hdisk1
  2. She then created two more disks for this volume group, by typing:
    extendvg workvg hdisk2
    
    extendvg workvg hdisk3
  3. Jane created a logical volume of 40 MB that has three copies.
    Each copy is on one of each of the three disks that comprise the workvg volume group. She used the following commands:
    mklv -y testlv workvg 10
    
    mklvcopy testlv 3
After Jane created the mirrored workvg volume group, hdisk2 failed. Therefore, she took the following steps to recover:
  1. She removed the logical volume copy from hdisk2 by typing:
    rmlvcopy testlv 2 hdisk2
  2. She detached hdisk2 from the system so that the ODM and VGDA are updated, by typing:
    reducevg workvg hdisk2
  3. She removed hdisk2 from the system configuration to prepare for replacement by typing:
    rmdev -l hdisk2 -d
  4. She chose to shut down the system, by typing:
    shutdown -F
  5. She replaced the disk. The new disk did not have the same SCSI ID as the former hdisk2.
  6. 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.

  7. Jane added this disk into the workvg volume group by typing:
    extendvg workvg hdisk2
  8. 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.