
1. In this example, the boot disk mirror c1t1d0 failed. All submirrors on c1t1d0 were placed in “maintenance” state.
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w21000004cf222bde,0 1. c1t1d0 /pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037f3ce1d,0
# metastat d20: Submirror of d0 State: Needs maintenance Invoke: metareplace d0 c1t1d0s0 Size: 3073896 blocks Stripe 0: Device Start Block Dbase State Hot Spare c1t1d0s0 0 No Maintenance d21: Submirror of d1 State: Needs maintenance Size: metareplace d1 c1t1d0s1 Stripe 0: Device Start Block Dbase State Hot Spare c1t1d0s1 0 No Maintenance d23: Submirror of d3 State: Needs maintenance Invoke: metareplace d3 c1t1d0s3 Size: 525798 blocks Stripe 0: Device Start Block Dbase State Hot Spare c1t1d0s3 0 No Maintenance d24: Submirror of d4 State: Needs maintenance Invoke: metareplace d4 c1t1d0s4 Size: 59114718 blocks Stripe 0: Device Start Block Dbase State Hot Spare c1t1d0s4 0 No Maintenance
2. Detach the failed meta devices from the failed drive.
# metadetach -f d0 d20 # metadetach -f d1 d21 # metadetach -f d3 d23 # metadetach -f d4 d24
# metaclear d20 # metaclear d21 # metaclear d23 # metaclear d24
3. Delete the meta databases from the failed drive.
# metadb -i flags first blk block count a m p luo 16 8192 /dev/dsk/c1t0d0s7 a p luo 8208 8192 /dev/dsk/c1t0d0s7 W p luo 16 8192 /dev/dsk/c1t1d0s7 W p luo 8208 8192 /dev/dsk/c1t1d0s7 r - replica does not have device relocation information o - replica active prior to last mddb configuration change u - replica is up to date l - locator for this replica was read successfully c - replica's location was in /etc/lvm/mddb.cf p - replica's location was patched in kernel m - replica is master, this is replica selected as input W - replica has device write errors a - replica is active, commits are occurring to this replica M - replica had problem with master blocks D - replica had problem with data blocks F - replica had format problems S - replica is too small to hold current data base R - replica had device read errors
# metadb -d c1t1d0s7
# metadb -i flags first blk block count a m p luo 16 8192 /dev/dsk/c1t0d0s7 a p luo 8208 8192 /dev/dsk/c1t0d0s7
4. Unconfigure the failed drive
# cfgadm -al Ap_Id Type Receptacle Occupant Condition c0 scsi-bus connected configured unknown c0::dsk/c1t0d0 disk connected configured unknown c0::dsk/c1t1d0 disk connected configured unknown c1 scsi-bus connected configured unknown c1::dsk/c1t0d0 CD-ROM connected configured unknown usb0/1 unknown empty unconfigured ok usb0/2 unknown empty unconfigured ok usb1/1.1 unknown empty unconfigured ok usb1/1.2 unknown empty unconfigured ok usb1/2 unknown empty unconfigured ok
# cfgadm -c unconfigure c0::dsk/c1t1d0
5. Replace the failed drive & configure the new drive.
# cfgadm -c configure c0::dsk/c1t1d0
6. Copy the old drive partition table to the new drive.
# prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c1t1d0s2
7. Create the meta databases on the new drive
# metadb -a -c 2 c1t1d0s7
# metadb 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 16 8192 /dev/dsk/c1t1d0s7 a p luo 8208 8192 /dev/dsk/c1t1d0s7
8. Install the bootblocks onto the new drive (x86 server).
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c1t1d0s2
9. Create the meta devices.
# metainit -f d20 1 1 c1t1d0s0 # metainit -f d21 1 1 c1t1d0s1 # metainit -f d23 1 1 c1t1d0s3 # metainit -f d24 1 1 c1t1d0s4
10. Attach the meta devices.
# metattach d0 d20 # metattach d1 d21 # metattach d3 d23 # metattach d4 d24
11. Reboot the system & wait till resync process is done.
