SUMMARY : Need Help on Mirroring

From: Gary Lopez <>
Date: Thu Jul 14 2005 - 16:15:03 EDT
Thanks to all who answered. Especially Barry Reese, Darren Dunham, Tom 
Grassia, Darryl Mitchell and others. I have chosen a couple of answers 
in response to my questions.

 >> Hello all,
 >> 	I need to know if there is a way to recover a mirror after
 >> accidentally deleting databases using the metadb command. I had a
 >> disk crash on me and in trying to get the machine back up I issued
 >>the command " metadb -d -f c0t0d0s7" although the disk that crashed
 >> was c0t1d0s7. This caused a panic during boot(I have read that there
 >> is NO WAY to recover fromdeleted metadatabases). I then had to force
 >> a new vfstab to boot to the single disk. My two questions are:
 >> 1. What file gets deleted when the metadb -d -f command is executed?

ANS. 1 - No file is deleted.  You're just telling the system that 
there's no database there any longer.  Unfortunately, there's no way 
(that I know of anyway) to tell the system to use that space again.

ANS. 2 - No file gets deleted.  The database replicas are not stored on 
the filesystem. They are stored on specified slices of the disks (I 
believe near the start of the slice), normally can see where with the 
metadb command (no args). But not on a file system.  It is possible to 
have a metadb device with a file system on the same slice as the metadb 
db replica (the metadevice knows to skip blocks at the beginning of the 
slice in such cases).

 >> 2. How to bring a system online with only one disk in a mirror?

ANS. 1 - Unless you have a very complex setup, it would probably be 
easiest to come up without mirroring or LVM, then recreate the mirrors.
Change /etc/system so the 'rootvol' line is commented out, and change
/etc/vfstab so the mounts are from the raw disk slices on one side of
the mirror, not from metadevices. That should get you booted.

ANS. 2 - You don't need to change the /etc/vfstab to make it boot from 
one side of the mirror.  Normally what will happen is that one drive 
will die and if you need to reboot the machine, it will come up in 
single user mode complaining about insufficient state database replicas. 
  If you just delete the bad databases (from the failed disk) and reboot 
again, the machine will come up normally, since all the state databases 
it knows about are on the good disk, it won't have any issues.  Now, 
recovery will be a bit more difficult because the sub-mirrors are going 
to be in an "Unavailable" state instead of a  "Needs Maint." state, so 
you'll have to do another reboot, OR metadetach the bad sub-mirrors and 
metaclear the metadevices and then recreate them. Normally SVM is pretty 
slick, simple, and reliable.  You just happened to hit the big snag with 
it -- metadbs are essential!
Gary D Lopez
Unix Systems Administrator
Catapult Communications
160 S Whisman Rd
Mountain View, CA 94041
Ph  (650) 314-1029
Fax (650) 960-1029
sunmanagers mailing list
Received on Thu Jul 14 16:15:37 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:49 EST