Sun Cluster 2.2 System Administration Guide

12.1.2 How to Recover From Power Loss (SSVM or CVM)

Power failures can detach disk drives and cause plexes to become detached, and thus, unavailable. The volume remains active, however, because the remaining plexes in a mirrored volume are still available. It is possible to reattach the disk drives and recover from this condition without halting nodes in the cluster.

These are the high-level steps to recover from power loss to a disk enclosure in an SSVM configuration:

These are the detailed steps to recover from power loss to a disk enclosure in an SSVM configuration.

  1. Use the vxprint command to view the errored plexes.

    Optionally, specify a diskgroup with the -g diskgroup option.

  2. Use the vxdisk command to identify the errored disks.

    # vxdisk list
    DEVICE       TYPE      DISK         GROUP        STATUS
     ..
     -            -         c1t5d0       toi          failed was:c1t5d0s2
     ...
  3. Fix the condition that resulted in the problem so that power is restored to all failed disks.

    Be sure that the disks are spun up before proceeding.

  4. Enter the following commands on all nodes in the cluster.

    In some cases, the drive(s) must be rediscovered by the node(s).

    # drvconfig
    # disks
    
  5. Enter the following commands on all nodes in the cluster.

    The volume manager must scan the current disk configuration again.

    # vxdctl enable
    # vxdisk -a online
    
  6. Enter the following command on all nodes in the cluster.


    Note -

    For CVM, enter the command on the master node first, then on the remaining nodes.


    This will reattach and initiate recovery on disks that had transitory failure.

    # vxreattach -r
    
  7. Verify the output of the vxdisk command to see if there are any more errors.

    # vxdisk list
    
  8. If media was replaced, enter the following command from the master node for each disk that has been disconnected.

    The physical disk and the volume manager access name for that disk must be reconnected.

    # vxdg -g diskgroup -k adddisk medianame=accessname
    

    The values for medianame and accessname appear at the end of the vxdisk list command output.

    For example:

    # vxdg -g toi -k adddisk c1t5d0=c1t5d0s2
    # vxdg -g toi -k adddisk c1t5d1=c1t5d1s2
    # vxdg -g toi -k adddisk c1t5d2=c1t5d2s2
    # vxdg -g toi -k adddisk c1t5d3=c1t5d3s2
    # vxdg -g toi -k adddisk c1t5d4=c1t5d4s2
    

    You can also use the vxdiskadm command, or the graphical user interface, to reattach the disks.

  9. From the node, start volume recovery.

    # vxrecover -bv [-g diskgroup]

    If you have shared disk groups, use the -svc options to the vxrecover command.

  10. (Optional) Use the vxprint -g command to view the changes.