| This document describes the process to replace a | | | | 1. Remove the failed drive from the system |
| disk, which is controlled by Solaris Volume Manager | | | | configuration. Use cfgadm --al to identify the disk |
| (SVM) DiskSuite Metadevice, and is a part of a mirror | | | | controller and associated devices. |
| configuration. | | | | # cfgadm -al |
| 1. Run "metastat" to identify the failed metadevice. | | | | Ap_Id Type Receptacle Occupant Conditionc0 |
| 1. metastatd0: Mirror | | | | scsi-bus connected configured unknownc0::dsk |
| Submirror 0: d1 | | | | c0t0d0 CD-ROM connected configured unknownc1 |
| State: Okay | | | | scsi-bus connected configured unknownc1::dsk/c1t0d0 |
| Submirror 1: d2 | | | | disk connected configured unknownc1::dsk/c1t1d0 disk |
| State: Needs maintenance | | | | connected configured unknownc1::dsk/c1t2d0 disk |
| Pass: 1 | | | | connected configured unknownc1::dsk/c1t3d0 disk |
| Read option: roundrobin (default) | | | | connected configured unknownc2 scsi-bus connected |
| Write option: parallel (default) | | | | unconfigured unknown |
| Size: 2101552 blocksd1: Submirror of d0 | | | | Use cfgadm --c to unconfigure and remove the failed |
| State: Okay | | | | device from the system. |
| Size: 2101552 blocks | | | | 1. cfgadm -c unconfigure c1::dsk/c1t1d0 |
| Stripe 0: | | | | 2. Turn the server over to Open System Ops/SUN |
| Device Start Block Dbase State Hot Sparec1t0d0s0 0 | | | | to replace the failed drive. |
| No Okayd2: Submirror of d0 | | | | |
| State: Needs maintenance | | | | 1. Once the drive is replaced, run cfgadm --c to |
| Invoke: metareplace d0 c1t1d0s0 <new device> | | | | reconfigure the new disk |
| Size: 2101552 blocks | | | | 1. cfgadm -c configure c1::dsk/c1t1d0 |
| Stripe 0: | | | | 2. Use "prtvtoc/fmthard" to create partitions to |
| Device Start Block Dbase State Hot Sparec1t1d0s0 0 | | | | match the original drive. |
| No Maintenance | | | | 1. prtvtoc /dev/rdsk/c1t0d0s2 > /var/tmp/disk |
| 2. Run "metastat --p" to identify all the metadevices | | | | 2. fmthard -s /var/tmp/disk /dev/rdsk/c1t1d0s2 |
| that are associated with the failing device | | | | 3. Use "metainit" to recreate the submirrors |
| 1. metastat --pd0 -m d1 d2 1d1 1 1 c1t0d0s0d2 1 1 | | | | 1. metainit d2 1 1 c1t1d0s0d2: Concat/Stripe is setup |
| c1t1d0s0d10 -m d11 d12 1d11 1 1 c1t0d0s1d12 1 1 | | | | 2. metainit d12 1 1 c1t1d0s1d12: Concat/Stripe is setup |
| c1t1d0s1d3 1 1 c1t2d0s0d13 1 1 c1t2d0s1 | | | | 3. Use "metattach" to attach the submirrors to the |
| 2. metastat --p | grep c1t1d0d2 1 1 c1t1d0s0d12 1 1 | | | | mirrors and the synchronization process. |
| c1t1d0s1 | | | | 1. metattach d0 d2d0: submirror d2 is attached |
| 3. Run "metadetach" to remove the failing disk from | | | | 2. metattach d10 d12d10: submirror d12 is attached |
| all the submirrors | | | | 3. Run "metadb" to re-create the replicas that existed |
| 1. metadetach --f d0 d2d0: submirror d2 is detached | | | | previously, and verify that the replicas have been |
| 2. metadetach --f d10 d12d10: submirror d12 is | | | | created. |
| detached | | | | # metadb -a -c 2 c1t1d0s7 |
| NOTE: The "-f" option is not required if the | | | | # metadbflags first blk block counta m p luo 16 8192 |
| metadevice is in an "okay" state. | | | | dev/dsk/c1t0d0s7a p luo 8208 8192 /dev/dsk |
| 3. Run "metaclear" to remove the failed metadevice | | | | c1t0d0s7a p luo 16 8192 /dev/dsk/c1t1d0s7a p luo |
| from the SVM configuration. | | | | 8208 8192 /dev/dsk/c1t1d0s7a p luo 16 8192 /dev |
| | | | | dsk/c1t2d0s7a p luo 8208 8192 /dev/dsk/c1t2d0s7 |
| 1. metaclear d2d2: Concat/Stripe is cleared | | | | 1. Run "metadevadm" on the disk to update the new |
| 2. metaclear d12d12: Concat/Stripe is cleared | | | | DevID |
| 3. Run "metadb" to check if there are any replicas on | | | | # metadevadm -u c1t1d0 |
| the failed disk, and remove them: | | | | Updating Solaris Volume Manager device relocation |
| # metadbflags first blk block counta m p luo 16 8192 | | | | information for c1t1d0 |
| dev/dsk/c1t0d0s7a p luo 8208 8192 /dev/dsk | | | | Old device reloc |
| c1t0d0s7a p luo 16 8192 /dev/dsk/c1t1d0s7a p luo | | | | 0523B06W03____AAN0P5606W03 |
| 8208 8192 /dev/dsk/c1t1d0s7a p luo 16 8192 /dev | | | | New device reloc |
| dsk/c1t2d0s7a p luo 8208 8192 /dev/dsk/c1t2d0s7 | | | | 0523B06W03____AAN0P5606W03 |
| # metadb --d c1t1d0s7 | | | | Note: This command only work for Solaris 9 and 10. |
| # metadbflags first blk block counta m p luo 16 8192 | | | | 1. Run "metastat" to verify that the SVM |
| dev/dsk/c1t0d0s7a p luo 8208 8192 /dev/dsk | | | | configuration is in a healthy state |
| c1t0d0s7a p luo 16 8192 /dev/dsk/c1t2d0s7a p luo | | | | 1. |
| 8208 8192 /dev/dsk/c1t2d0s7 | | | | |