Replacing A Meta Disk (Solaris disk suite)

A note
Just a quick note to say that if you are replacing a failed disk with Sol9/10 and disk suite, you should detach and clear any submirrors on the disk that are not in 'needs maintenance state', otherwise disksuite will get in a mess wrt the serial numbers on the disks at some point in the future.

Replace A disk
If a disk has gone down and been replaced with a new one...

the broken disk status would like this:

d90: Mirror Submirror 0: d91 State: Needs maintenance Submirror 1: d92 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 430007232 blocks d91: Submirror of d90 State: Needs maintenance Invoke: metareplace d90 c3t10d0s0 Size: 430007232 blocks Stripe 0: (interlace: 2048 blocks) Device     Start Block  Dbase State        Hot Spare c3t8d0s0          0     No    Okay c3t9d0s0          0     No    Okay c3t10d0s0         0     No    Maintenance d92: Submirror of d90 State: Okay Size: 430007232 blocks Stripe 0: (interlace: 2048 blocks) Device     Start Block  Dbase State        Hot Spare c4t8d0s0          0     No    Okay c4t9d0s0          0     No    Okay c4t10d0s0         0     No    Okay
 * 1) metastat d90

You should also check the metadb placement, eg:

flags          first blk       block count a m p  luo        16              8192            /dev/dsk/c1t0d0s7 a   p  luo        8208            8192            /dev/dsk/c1t0d0s7 a   p  luo        16400           8192            /dev/dsk/c1t0d0s7 a   p  luo        16              8192            /dev/dsk/c1t1d0s7 a   p  luo        8208            8192            /dev/dsk/c1t1d0s7 a   p  luo        16400           8192            /dev/dsk/c1t1d0s7
 * 1) usr/sbin/metadb

There should be 3 copies of the metadb on each disk ideally, the flags will be different on a failing disk (if the disk is totally failing), use 'metadb -i' to see descriptions.

Remove metadb's on the faulty disk before removing the disk, eg.


 * 1) metadb -d /dev/dsk/c1t1d0s7

label the disk
use format to label the disk

partition the disk
this show the current partitions
 * 1) prtvtoc /dev/rdsk/c3t10d0s2

you can copy the structure form a similar disk ie:


 * 1) prtvtoc /dev/rdsk/c4t10d0s2 | fmthard -s - /dev/rdsk/c3t10d0s2

check the new structure

* /dev/rdsk/c3t10d0s2 partition map * * Dimensions: *    512 bytes/sector *    424 sectors/track *     24 tracks/cylinder *  10176 sectors/cylinder *  14089 cylinders *  14087 accessible cylinders * * Flags: *  1: unmountable * 10: read-only * *                          First     Sector    Last * Partition Tag  Flags    Sector     Count    Sector  Mount Directory 0     0    00      10176 143339136 143349311        2      5    01          0 143349312 143349311        7      0    00          0     10176     10175
 * 1) prtvtoc /dev/rdsk/c3t10d0s2

Enable the new disk
d90: device c3t10d0s0 is enabled
 * 1) metareplace -e d90 c3t10d0s0

If metadb replicas already existed on the disk then replace them eg.


 * 1) metadb -a -c 3 /dev/dsk/c1t1d0s0

check the status
the rebuild could take some time d90: Mirror Submirror 0: d91 State: Resyncing Submirror 1: d92 State: Okay Resync in progress: 0 % done Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 430007232 blocks d91: Submirror of d90 State: Resyncing Size: 430007232 blocks Stripe 0: (interlace: 2048 blocks) Device     Start Block  Dbase State        Hot Spare c3t8d0s0          0     No    Okay c3t9d0s0          0     No    Okay c3t10d0s0         0     No    Resyncing d92: Submirror of d90 State: Okay Size: 430007232 blocks Stripe 0: (interlace: 2048 blocks) Device     Start Block  Dbase State        Hot Spare c4t8d0s0          0     No    Okay c4t9d0s0          0     No    Okay c4t10d0s0         0     No    Okay
 * 1) metastat d90