How to break a mirror?
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > How to break a mirror?




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to break a mirror?  
kaka.hui@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-24-05 08:49 PM

I have some bad disks on (d20: Submirror of d30).  How do I detach that
mirror?   Thanks!

[root@beta-norm01:/etc]# metastat
d30: Mirror
Submirror 0: d10
State: Needs maintenance
Submirror 1: d20
State: Needs maintenance
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 573315840 blocks

d10: Submirror of d30
State: Needs maintenance
Invoke: metareplace d30 c1t34d0s6 <new device>
Size: 573315840 blocks
Stripe 0: (interlace: 32 blocks)
Device              Start Block  Dbase State        Hot Spare
c1t32d0s6                  0     No    Maintenance
c1t33d0s6              10176     No    Maintenance
c1t34d0s6              10176     No    Maintenance
c1t35d0s6              10176     No    Maintenance


d20: Submirror of d30
State: Needs maintenance
Invoke: after replacing "Maintenance" components:
metareplace d30 c1t38d0s6 <new device>
Size: 573315840 blocks
Stripe 0: (interlace: 32 blocks)
Device              Start Block  Dbase State        Hot Spare
c1t36d0s6                  0     No    Last Erred
c1t37d0s6              10176     No    Okay
c1t38d0s6              10176     No    Last Erred
c1t39d0s6              10176     No    Last Erred






[ Post a follow-up to this message ]



    Re: How to break a mirror?  
pbeckhelm@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-24-05 08:49 PM

Here's how I would do it:

metaoffline -f d30 d20
metadetach -f d30 d20
-verify with metastat that the mirror has been broken.  You should no
longer see d20 as a submirror.
metaclear d20
- delete the state db replica for the failed drive
metadb -d c#t#d#s# (for the location of the slice with your db
replicas)

-- Replace the disk

Then, to replace it, I do this:

prtvtoc /dev/rdsk/c1t33d0s2 | fmthard -s - /dev/rdsk/c1t36d0s2
- Create your state db replicas
metadb -a -f -c 3 /dev/dsk/c#t#d# (of the slice on the new disk where
you'll keep your state db replicas)
metainit d20 1 1 c#t#d#s# (of the new disk)
metattach d30 d20

Patrick






[ Post a follow-up to this message ]



    Re: How to break a mirror?  
kaka.hui@gmail.com


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-24-05 08:49 PM

I just tried, but got the "operation would result in no readable
submirrors".  I googled a little more,  I guess the not just the d20 is
bad.  I am thinking if the d10 is bad also, since it's in the
"maintenence" status.  What does the "maintenence" status mean?  What
should I do to fix the problem.

#  metadetach -f d30 d20
metadetach: beta-norm01: d30: operation would result in no readable
submirrors

# metaoffline  -f d30 d20
metaoffline: beta-norm01: d30: operation would result in no readable
submirrors






[ Post a follow-up to this message ]



    Re: How to break a mirror?  
Doug Freyburger


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-24-05 08:49 PM

kaka.hui@gmail.com wrote:
>
> I have some bad disks on (d20: Submirror of d30).  How do I detach that
> mirror?   Thanks!
>
> [root@beta-norm01:/etc]# metastat
> d30: Mirror
>     Submirror 0: d10
>       State: Needs maintenance
>     Submirror 1: d20
>       State: Needs maintenance
>     Pass: 1
>     Read option: roundrobin (default)
>     Write option: parallel (default)
>     Size: 573315840 blocks
>
> d10: Submirror of d30
>     State: Needs maintenance
>     Invoke: metareplace d30 c1t34d0s6 <new device>

Look: It tells you how to fix it.  Actually, you
need to add an extra switch to make it work (I
think -i, it's been several years).

>     Size: 573315840 blocks
>     Stripe 0: (interlace: 32 blocks)
>         Device              Start Block  Dbase State        Hot Spare
>         c1t32d0s6                  0     No    Maintenance
>         c1t33d0s6              10176     No    Maintenance
>         c1t34d0s6              10176     No    Maintenance

Note that this one is the one marked bad.

>         c1t35d0s6              10176     No    Maintenance
>
> d20: Submirror of d30
>     State: Needs maintenance
>     Invoke: after replacing "Maintenance" components:
>                 metareplace d30 c1t38d0s6 <new device>

Uh-oh.  Second bad one.  See how it tells you the order
to do the replacements, that this one is to be done
second.  It does indeed look like you have a bad drive
on each side of the mirror and it is using the
non-overlapping parts to keep running.

>     Size: 573315840 blocks
>     Stripe 0: (interlace: 32 blocks)
>         Device              Start Block  Dbase State        Hot Spare
>         c1t36d0s6                  0     No    Last Erred
>         c1t37d0s6              10176     No    Okay
>         c1t38d0s6              10176     No    Last Erred

That's the sick one per the above lines.

>         c1t39d0s6              10176     No    Last Erred

When you add replacement drives, definitely add one more and
make it a hot spare.  You're losing too many.






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:43 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register