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
# 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!