存储 频道

SDS换坏盘步骤

1.# metadb
   flags       first blk        block count
  a m     u        16               1034            /dev/dsk/c0t0d0s4
  a       u        1050             1034            /dev/dsk/c0t0d0s4
  a       u        2084             1034            /dev/dsk/c0t0d0s4
  W   pc luo       16               1034            /dev/dsk/c0t1d0s4
  W   pc luo       1050             1034            /dev/dsk/c0t1d0s4
  W   pc luo       2084             1034            /dev/dsk/c0t1d0s4

The W in the flags field of the c0t1d0s4 slice indicates that the device has write errors. Three replicas on the c0t0d0s4 slice are still good

2.# metadb -d c0t1d0s4

the three state database replicas that exist on c0t1d0s4 are deleted.


3.# metahs -d hsp000 c0t1d0s6
hsp000: Hotspare is deleted


hot spare pool hsp000 included c0t1d0s6, which is then deleted from the pool.

4.Replace the failed disk.

v440 cfgadm -x unconfigure /dev/rdskc0t1d0
ok-to-move led light

5.Use the format command or the fmthard command to partition the disk with the same slice information as the failed disk. If you have the prtvtoc output from the failed disk, you can format the replacement disk with the fmthard -s /tmp/failed-disk-prtvtoc-output command.

6.If you deleted state database replicas, add the same number back to the appropriate slice.

# metadb -a -c 3 c0t1d0s4



7.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, run the metareplace -e command for each slice.

In this example, /dev/dsk/c0t1d0s4 and mirror d10 are used.



# metareplace -e d10 c0t1d0s4


8.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. This command regenerates the extent headers on disk.

In this example, /dev/dsk/c0t1d0s4 needs to have the soft partition markings on disk regenerated. The slice is scanned and the markings are reapplied, based on the information in the state database replicas.



# metarecover c0t1d0s4 -m -p

9.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, run the metareplace -e command for each slice.

In this example, /dev/dsk/c0t1d0s4 and mirror d10 are used.



# metareplace -e d10 c0t1d0s4


10.If any RAID-0 volumes have soft partitions built on them, run the metarecover command for each RAID-0 volume.

In this example, RAID-0 volume, d17, has soft partitions built on it.



# metarecover d17 -m -p


11.Replace hot spares that were deleted, and add them to the appropriate hot spare pool or pools.

In this example, hot spare pool, hsp000 included c0t1d0s6. This slice is added to the hot spare pool.



# metahs -a hsp000 c0t1d0s6
hsp000: Hotspare is added

0
相关文章