Unix administration - How to break a mirror?

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > October 2005 > How to break a mirror?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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

2005-10-24, 3: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

pbeckhelm@gmail.com

2005-10-24, 3: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

kaka.hui@gmail.com

2005-10-24, 3: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

Doug Freyburger

2005-10-24, 3: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.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com