# What should I do with this metastat result? metareplace everything?

**URL:** <https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934>\
**Category:** Filesystems, Disks and Memory\
**Created:** [December 10, 2008, 11:10pm UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934 "2008-12-10T23:10:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nickychung](https://community.unix.com/letter_avatar/nickychung/32/5_5575768a8748004e209b776fc1b2916d.png) [@nickychung](https://community.unix.com/u/nickychung)\
**Post date:** [December 10, 2008, 11:10pm UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934/1 "2008-12-10T23:10:03Z")

</div>

I have to rescue the volumes in a soloris 7 machine. The metastat returns the following result:

> [@](#):
>
> d0: Mirror  
> Submirror 0: d10  
> State: Needs maintenance  
> Submirror 1: d20  
> State: Okay  
> Pass: 1  
> Read option: roundrobin (default)  
> Write option: parallel (default)  
> Size: 4198392 blocks
> 
> d10: Submirror of d0  
> State: Needs maintenance  
> Invoke: metareplace d0 c0t0d0s0 \<new device\>  
> Size: 4198392 blocks  
> Stripe 0:  
> Device Start Block Dbase State Hot Spare  
> c0t0d0s0 0 No Maintenance
> 
> d20: Submirror of d0  
> State: Okay  
> Size: 4198392 blocks  
> Stripe 0:  
> Device Start Block Dbase State Hot Spare  
> c0t1d0s0 0 No Okay
> 
> d1: Mirror  
> Submirror 0: d11  
> State: Needs maintenance  
> Submirror 1: d21  
> State: Okay  
> Pass: 1  
> Read option: roundrobin (default)  
> Write option: parallel (default)  
> Size: 2101552 blocks
> 
> d11: Submirror of d1  
> State: Needs maintenance  
> Invoke: metareplace d1 c0t0d0s1 \<new device\>  
> Size: 2101552 blocks  
> Stripe 0:  
> Device Start Block Dbase State Hot Spare  
> c0t0d0s1 0 No Maintenance
> 
> d21: Submirror of d1  
> State: Okay  
> Size: 2101552 blocks  
> Stripe 0:  
> Device Start Block Dbase State Hot Spare  
> c0t1d0s1 0 No Okay
> 
> d6: Mirror  
> Submirror 0: d16  
> State: Needs maintenance  
> Pass: 1  
> Read option: roundrobin (default)  
> Write option: parallel (default)  
> Size: 12288896 blocks
> 
> d16: Submirror of d6  
> State: Needs maintenance  
> Invoke: after replacing "Maintenance" components:  
> metareplace d6 c0t0d0s6 \<new device\>  
> Size: 12288896 blocks  
> Stripe 0:  
> Device Start Block Dbase State Hot Spare  
> c0t0d0s6 0 No Last Erred
> 
> d7: Mirror  
> Submirror 0: d17  
> State: Needs maintenance  
> Submirror 1: d27  
> State: Okay  
> Pass: 1  
> Read option: roundrobin (default)  
> Write option: parallel (default)  
> Size: 16765296 blocks
> 
> d17: Submirror of d7  
> State: Needs maintenance  
> Invoke: metareplace d7 c0t0d0s7 \<new device\>  
> Size: 16765296 blocks  
> Stripe 0:  
> Device Start Block Dbase State Hot Spare  
> c0t0d0s7 0 No Maintenance
> 
> d27: Submirror of d7  
> State: Okay  
> Size: 16765296 blocks  
> Stripe 0:  
> Device Start Block Dbase State Hot Spare  
> c0t1d0s7 0 No Okay
> 
> d26: Concat/Stripe  
> Size: 12288896 blocks  
> Stripe 0:  
> Device Start Block Dbase  
> c0t1d0s6 0 No

d6 is dying with iostat -nE returns Harderror 3, Transports error 9

Can some offer me some help? Thank you very much.

---

<div class="post-metadata">

**Author:** ![Annihilannic](https://community.unix.com/user_avatar/community.unix.com/annihilannic/32/4183_2.png) [@Annihilannic](https://community.unix.com/u/Annihilannic)\
**Post date:** [December 11, 2008, 8:37pm UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934/2 "2008-12-11T20:37:24Z")

</div>

Do you know what triggered these problems in the first place? It looks like c0t0d0 had some kind of failure... is it working again now?

Try using the non-destructive read tests in format to see if you can read the entire c0t0d0 device.

If it seems to be working okay again, you should be able to use metareplace -e d0 c0t0d0s0, for example, to replace the disk with itself (and repeat for the other mirrors of course). Otherwise you may need to replace that disk first... probably a good idea to have a spare disk handy anyway if it is indeed beginning to fail.

---

<div class="post-metadata">

**Author:** ![melias](https://community.unix.com/letter_avatar/melias/32/5_5575768a8748004e209b776fc1b2916d.png) [@melias](https://community.unix.com/u/melias)\
**Post date:** [December 16, 2008, 6:48pm UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934/3 "2008-12-16T18:48:14Z")

</div>

Keep an eye on the hard errors. If these increase, you'll most probably need to replace the disk.

Check out the format command and see if you can write a label to your disk (you won't lose any data). If this fails, it's a good indicator that you've got a disk which is failing.

If hard errors are not increasing, you could just run the metareplace command, using the existing slice and see if this brings the mirrors back online (I have run into this issue before) e.g. metareplace d0 c0t0d0s0.

---

<div class="post-metadata">

**Author:** ![nickychung](https://community.unix.com/letter_avatar/nickychung/32/5_5575768a8748004e209b776fc1b2916d.png) [@nickychung](https://community.unix.com/u/nickychung)\
**Post date:** [December 16, 2008, 9:06pm UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934/4 "2008-12-16T21:06:16Z")

</div>

There is no increase of hard error.  
Format can not recognize c0t0d0.

And, metareplace -e d0 c0t0d0s0 returns I/O errors.

Is it possible to bring mirror d0 back online with c0t1d0s0?

metastat -p returns

> [@](#):
>
> d0 -m d10 d20 1  
> d10 1 1 c0t0d0s0  
> d20 1 1 c0t1d0s0  
> d1 -m d11 d21 1  
> d11 1 1 c0t0d0s1  
> d21 1 1 c0t1d0s1  
> d6 -m d16 1  
> d16 1 1 c0t0d0s6  
> d7 -m d17 d27 1  
> d17 1 1 c0t0d0s7  
> d27 1 1 c0t1d0s7  
> d26 1 1 c0t1d0s6

---

<div class="post-metadata">

**Author:** ![Annihilannic](https://community.unix.com/user_avatar/community.unix.com/annihilannic/32/4183_2.png) [@Annihilannic](https://community.unix.com/u/Annihilannic)\
**Post date:** [December 16, 2008, 9:24pm UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934/5 "2008-12-16T21:24:13Z")

</div>

Just because it "needs maintenance" doesn't mean it is offline. If c0t1d0s0 is still working fine, then you should be able to access d0 fine... is it not working?

---

<div class="post-metadata">

**Author:** ![nickychung](https://community.unix.com/letter_avatar/nickychung/32/5_5575768a8748004e209b776fc1b2916d.png) [@nickychung](https://community.unix.com/u/nickychung)\
**Post date:** [December 17, 2008, 12:38am UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934/6 "2008-12-17T00:38:12Z")

</div>

Yes, I am still able to access d0 but not d6. d0 is online. d6 is dead.

But metareplace just can't help me to fix the "needs maintenance" problem.

iostat -nE returns:

> [@](#):
>
> c0t0d0 Soft Errors: 0 Hard Errors: 3 Transport Errors: 9  
> Vendor: SEAGATE Product: ST318203LSUN18G Revision: 034A Serial No: LRD9164600001037  
> Size: 18.11GB \<18110967808 bytes\>  
> Media Error: 0 Device Not Ready: 0 No Device: 3 Recoverable: 0  
> Illegal Request: 0 Predictive Failure Analysis: 0  
> c0t1d0 Soft Errors: 0 Hard Errors: 4 Transport Errors: 2  
> Vendor: FUJITSU Product: MAG3182L SUN18G Revision: 1111 Serial No: 02542399  
> Size: 18.11GB \<18110967808 bytes\>  
> Media Error: 0 Device Not Ready: 0 No Device: 4 Recoverable: 0  
> Illegal Request: 0 Predictive Failure Analysis: 0  
> c0t6d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0  
> Vendor: TOSHIBA Product: XM6201TASUN32XCD Revision: 1103 Serial No: 12/12/97  
> Size: 18446744073.71GB \<-1 bytes\>  
> Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0  
> Illegal Request: 0 Predictive Failure Analysis: 0

---

<div class="post-metadata">

**Author:** ![Annihilannic](https://community.unix.com/user_avatar/community.unix.com/annihilannic/32/4183_2.png) [@Annihilannic](https://community.unix.com/u/Annihilannic)\
**Post date:** [December 17, 2008, 12:45am UTC](https://community.unix.com/t/what-should-i-do-with-this-metastat-result-metareplace-everything/223934/7 "2008-12-17T00:45:41Z")

</div>

That makes sense because for some reason d26 is no longer associated with d6. I can't advise you a safe method to reattach it to d6 because I don't have access to a Solaris system using SVM/DiskSuite any more.

If the disk is genuinely faulty (which it appears to be judging by the number of hard errors and the fact that metareplace fails) then you should physically replace it before attempting to rejoin it to the mirrors.

If you need to recover the data from d26 one option would be to simply mount that device instead of d6.
