Platform Notes: Sun Enterprise 250 Server

Solstice DiskSuite

The following procedure describes how to replace a disk in use by Solstice DiskSuite. Refer to the Solstice DiskSuite documentation for more information.


Caution - Caution -

These procedures should be performed only by a qualified system administrator. Performing hot-plug operations on an active disk drive can result in data loss if performed incorrectly.


  1. Back up your system.

  2. Type su and your superuser password.

  3. If possible, save the partition table for the disk you intend to replace.

    If the disk label can still be read, save the disk partitioning at this time.


    Note -

    Save all the disk partitioning information immediately after configuring metadevices or file systems for use when recovering from device failure later.


    Use the prtvtoc command to save the partition information.


    # prtvtoc /dev/rdsk/cwtxdys0
     > saved_partition_table_file
    

    For example:


    # prtvtoc /dev/rdsk/c0t11d0s0 > /etc/c0t11d0s0.vtoc
    

  4. Identify metadevices or applications using the device you plan to remove.

    For example:


    # metadb | grep c0t11d0
    # metastat | grep c0t11d0
    # mount | grep c0t11d0
    

    Save the output of the commands to reconstruct the metadevice configuration after you replace the disk.

  5. Delete database replicas.

    If there are database replicas on the disk, these must be deleted. First record the size and number of database replicas on each slice; then delete them.


    # metadb -d cwtxdysz
    

    For example:


    # metadb -d c0t11d0s0

  6. Detach submirrors.

    If any slices of the disk are used by submirrors, the submirrors should be detached. For example:


    # metadetach d20 d21
    

  7. Delete hotspares.

    If any slices are used by hotspare pools, remove them. Record the hotspare pools containing the slices; then delete them. For example:


    # metahs -d all c0t11d0s1
    

  8. Terminate all other metadevice activity on the disk.

    Check metastat output for other slices of the disk used by metadevices that cannot be detached (stripes not in mirrors, etc.). These metadevices must be unmounted if they contain file systems, or they must otherwise be taken off line.

    Refer to the prtvtoc(1M) man page for more information.

  9. Unmount any file systems on the disk.


    Note -

    If the file system(s) are on a disk that is failing or has failed, the umount operation may not complete. A large number of error messages may be displayed in the system console and in the /var directory during the umount operation. If the umount operation does not complete, you may have to restart the system.


    For each file system returned, type:


     # umount file_system
    

    where file_system is the first field for each line returned in Step 4.

    For example:


    # umount /export/home
    # umount /export/home1
    

  10. Use the ssaadm replace_device command to take the device offline:


    # ssaadm replace_device logical_device_name
    ssaadm: warning: can't quiesce "/dev/rdsk/c0t11d0s2": I/O error
    Bus is ready for the replacement of device
    Replace device and reconfigure bus as needed
    Press RETURN when ready to continue

    Here, logical_device_name is the full logical device name of the drive to be removed (/dev/rdsk/c0t11d0s2). You must specify slice 2, which represents the entire disk. Note that this command also accepts a physical device name as an alternative.

    You can safely ignore the warning message since the Enterprise 250 SCSI bus does not require quiescing.

  11. Remove the faulty disk drive and insert the replacement drive in its place.

    Refer to the Sun Enterprise 250 Server Owner's Guide for drive removal and replacement instructions.

  12. Press Return to complete the hot-plug operation.

    The ssaadm command brings the replacement drive back online.

  13. Restore the disk partitioning.

    If you have saved the disk partitioning to a file, you may restore it with fmthard. For example:


    # fmthard -s /etc/c0t11d0s0.vtoc  /dev/rdsk/c0t11d0s0
    

    If you have not saved the disk partitioning, use the format (1M) or fmthard(1M) command to repartition the disk.

  14. Replace any database replicas.

    For example:


    # metadb -a -l 2000 -c 2 c0t11d0s0
    

  15. Reattach any submirrors.

    For example:


    # metattach d20 d21
    

  16. Re-create hot spares for each hot spare pool that contained a slice on the new disk.

    For example:


    # metahs -a hsp001 c0t11d0s1
    

  17. Fix any broken metadevices, using slices from the new disk.

    If the disk to be replaced had caused any metadevices to go into the maintenance state, these metadevices can be repaired by re-enabling the slices.


    # metareplace -e mirror_or_RAID5_metadeice cwtxdysz
    

  18. Remount any file systems and restart any applications that were using metadevices that could not be taken off line.


    # mount file_system
    

Refer to the Solstice DiskSuite documentation for more information.