Disk Replacement with SDS

1. Identify the failed disk to be replaced by examining the /var/adm/messages file and the metastat command output. 2. Locate any state database replicas that might have been placed on the failed disk. Use the metadb command to find the replicas. The metadb command might report errors for the state database replicas that are located on the failed disk. In this example, c0t1d0 is the problem device.

# metadb flags a m u a u a u W pc luo W pc luo W pc luo

first blk 16 1050 2084 16 1050 2084

block count 1034 1034 1034 1034 1034 1034

/dev/dsk/c0t0d0s4 /dev/dsk/c0t0d0s4 /dev/dsk/c0t0d0s4 /dev/dsk/c0t1d0s4 /dev/dsk/c0t1d0s4 /dev/dsk/c0t1d0s4

3. Locate any state database replicas that might have been placed on the failed disk. Use the metadb command to find the replicas. The metadb command might report errors for the state database replicas that are located on the failed disk. In this example, c0t1d0 is the problem device.

# metadb flags a m u a u a u W pc luo W pc luo W pc luo

first blk 16 1050 2084 16 1050 2084

block count 1034 1034 1034 1034 1034 1034

/dev/dsk/c0t0d0s4 /dev/dsk/c0t0d0s4 /dev/dsk/c0t0d0s4 /dev/dsk/c0t1d0s4 /dev/dsk/c0t1d0s4 /dev/dsk/c0t1d0s4

4. Locate and delete any hot spares on the failed disk. Use the metastat command to find hot spares. In this example, hot spare pool hsp000 included c0t1d0s6, which is then deleted from the pool.

# metahs -d hsp000 c0t1d0s6 hsp000: Hotspare is deleted

5. Replace the failed disk. This step might entail using the cfgadm command, the luxadm command, or other commands as

/dev/dsk/c0t1d0s4 needs to have the soft partition markings on disk regenerated. # metareplace -e d10 c0t1d0s4 9. make sure to follow your hardware's documented procedures to properly manipulate the Solaris state of this disk. If any slices on the disk are components of RAID-5 volumes or are components of RAID-0 volumes that are in turn submirrors of RAID-1 volumes. . This command regenerates the extent headers on disk. # metarecover c0t1d0s4 -m -p 10. based on the information in the state database replicas. /dev/dsk/c0t1d0s4 is used. In this example. /dev/dsk/c0t1d0s4 and mirror d10 are used. # metadb -a -c 3 c0t1d0s4 8. When performing this step. 6. add the same number back to the appropriate slice. If any soft partitions on the disk are components of RAID-5 volumes or are components of RAID-0 volumes that are submirrors of RAID-1 volumes. In this example. If any soft partitions are built directly on slices on the replaced disk. run the metarecover -m -p command on each slice that contains soft partitions. run the metareplace -e command for each slice. Repartition the new disk. 7. If you deleted state database replicas. run the metareplace -e command for each slice. In this example. The slice is scanned and the markings are reapplied. you can format the replacement disk with the fmthard -s /tmp/failed-disk-prtvtoc-output command. Use the format command or the fmthard command to partition the disk with the same slice information as the failed disk.appropriate for your hardware and environment. If you have the prtvtoc output from the failed disk.

'Needs Maintenance' and "Last Erred" states. You might have to run an application-level consistency checker. If soft partitions or nonredundant volumes were affected by the failure. If any RAID-0 volumes have soft partitions built on them. # metareplace -e d10 c0t1d0s4 11. has soft partitions built on it. If only redundant volumes were affected. Replace hot spares that were deleted.In this example. # metahs -a hsp000 c0t1d0s6 hsp000: Hotspare is added 13.com/app/docs/doc/816-4520 2) EIS DVD Installation Checklists 3) Info Doc 28196 Solstice DiskSuite[TM] .How to mirror the root disk 4) Info Doc 17665 Solstice DiskSuite[TM] .sun. RAID-0 volume. and add them to the appropriate hot spare pool or pools. /dev/dsk/c0t1d0s4 and mirror d10 are used. restore data from backups.X Software and Solaris[TM] Volume Manager Software . Additional References: 1) Solaris Volume Manager Admin Guide http://docs.Mirrored Boot Disk Recovery . d17. then validate your data. hsp000 included c0t1d0s6. 5) Info Doc 22755 Solstice DiskSuite[TM] 4. Check the user and application data on all volumes. hot spare pool. run the metarecover command for each RAID-0 volume. In this example. This slice is added to the hot spare pool. # metarecover d17 -m -p 12. In this example. or use some other method to check the data.