Sunday, July 1, 2012

Procedure required to replace failed mirror disk

Dear All, 

Please tell me the procedure and commands to replace failed mirrorred in 
sparc machine. 
Using Solaris Disk Suite/Solaris Volume Manager or VERITAS?

Here is a procedure to replace a failed root disk when the system continues to run on its root mirror disk, which you may see that more care needs to be taken of than replacing a non-root disk. In the example, c0t0d0 is the failed root disk; c0t1d0 is the surviving root mirror. 

Replacing failed Disk Suite root disk 

1. df -k ( check the mounted file system associated with the disk) 
2. format (check the status of the failed drive - showing unavailable) 
3. metastat (check the meta disk sets/mirrors that the failed drive participated in) 
4. metadb (check the metadb copies and their slice location of the failed drive) 
5. metadb -d c0t0d0s7 (remove the metadb copies of the drive) 
6. metadb (verify if the copies are gone) 
7. metadetach d6 d16 (break mirror for disk set d6 mirror 16 on the failed drive) 
8. metastat d6 (verify d6 status after breaking the mirror) 
9. metadetach -f d6 d16 (break mirror by force) 
10.metastat d5 
11.metadetach -f d5 d15 (break mirror in d5) 
12.metastat d1 
13.metadetach -f d1 d11 (break mirror in d1) 
14.metastat d0 
15.metadetach -f d0 d10 (break mirror in d0) 
17.metaclear d10 (clear removed mirror in d0) 
18.metaclear d11 d15 d16 (clear removed mirror in d1, d5, and d6) 
19.dumpadm (check dump device) 
20.cfgadm -a (check device configuration status and obtain the failed drive device path) 
21.cfgadm -c unconfigure c0::dsk/c0t0d0 (remove failed drive from device configuration database) 
22.the failed drive shows a blue light indicating ready to be swapped) 
23.swap the failed drive with a good one 
24.cfgadm -c configure c0::dsk/c0t0d0 (configure the replacement drive) 
25.format (check if it shows up in format) 
26.prtvtoc /dev/rdsk/c0t1d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2 (writes disk partition table/mapping table from the mirror disk to the replaced root disk) 
27.format (check the partition table in the replaced drive - it needs to be the same or larger than the mirror partner disk) 
28.metadb (check metadb status - it shows no copies on the replaced drive) 
29.metadb -a -c 2 c0t0d0s7 (add two copies as what other disks have on the replaced drive) 
30.metadb (check metadb status again) 
31.metainit d10 1 1 c0t0d0s0 (rebuild the disk mirror using the replaced drive for mirror set d0) 
32.metainit d16 1 1 c0t0d0s6 (for d6) 
33.metainit d15 1 1 c0t0d0s5 (for d5) 
34.metainit d11 1 1 c0t0d0s1 (for d1) 
35.metastat (check the restored mirror set status) 
36.metattach d0 d10 (attach the mirror to d0 and thereby starting resynchronization process for the mirror set) 
37.metastat d0 (check status for d0 - it shows resync in progress) 
38.metattach d6 d16 (to d6) 
39.metattach d5 d15 (to d5) 
40.metattach d1 d11 (to d1) 
41.metastat (check the overall status) 
42.metastat | grep done (check resyn in progress) 
43.metadevadm -u c0t0d0 (update meta devices configuration for the replaced drive) 
44.Done when resync completes for all mirrors.


Post a Comment

Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM