metadb -a gets error<node>: has bad master block on device

Hello - Our V880 recently had a mirrored disk fail. I had to do

metadb -d /dev/dsk/c1t11d0s7

to delete a state database to be able to boot the machine.

Now the disk has been replace and resynced with metareplace. However, when I try to recreate a state database with

metadb -a /dev/dsk/c1t11d0s7

I get the error "metadb: <node>: has bad master block on device"

I can not find any info anywhere on this error. Has anyone seen this before or can anyone point at some useful info?Thanks.

[534 byte] By [bgone6666a] at [2007-11-27 6:38:47]
# 1

A web search found some others who had the same error after replacing a failed mirror disk. However, didn't find any information on the cause.

Found the error text in the OpenSolaris source file meta_error.c, which is for the error number MDE_DB_MASTER:

http://src.opensolaris.org/source/search?q=&defs=&refs=MDE_DB_MASTER 8;path=&hist=&project=%2Fonnv

Sun-worshipera at 2007-7-12 18:07:36 > top of Java-index,Storage Forums,Storage General Discussion...
# 2

OK - after talking with a very knowledgable/helpful guy in Sun's storage group, the problem is solved. It turned out that since the new disk had a different DevID, the mirror did not get correctly restored. The solution was to do the following (note: d23 is the slice where I was trying to create the state db):

# metaclear d23

# metadb -a -c 2 c1t11d0s7

# metattach d3 d23

He also referred me to doc 73132

Thanks Dan!

bgone6666a at 2007-7-12 18:07:36 > top of Java-index,Storage Forums,Storage General Discussion...
# 3
oops - I left out one step. It should be# metaclear d23# metadb -a -c 2 c1t11d0s7# metainit d23 1 1 c1t11d0s7# metattach d3 d23
bgone6666a at 2007-7-12 18:07:36 > top of Java-index,Storage Forums,Storage General Discussion...
# 4
out of interest, why are you putting metadb replicas on a metadevice?
Rob_BWa at 2007-7-12 18:07:36 > top of Java-index,Storage Forums,Storage General Discussion...