Well here are the responses... Thanks to all those that answered
- David Evans <DJEVANS@au.oracle.com>
- Richard Smith <rc.smith@ibm.net>
- Ron Spillane <spillar@dent.agric.nsw.gov.au>
- Roy S. Rapoport <rsr@macromedia.com>
- Rajeev Kumar <rxk@fluent.com>
The quick answer is that it is not irrecoverable... and you probably won't
lose data. Check out the man pages for "metainit" :-) Answers are at the
bottom in the order received. This list is quick!
At 8:56 PM -0500 3/27/99, I anxiously wrote:
>Well it looks like I've done it...
>
>I've accidentally (no I didn't do this on purpose) deleted/formatted over
>the slices holding the metadb info.
>
>Does any one know how I can re-create this db? Needless to say I can't
>really use the system--though I am still able to get into single-user mode.
>Any help would be GREATLY appreciated...
Some of you may want to know how I did this... I had at least three copies
on three different controllers on three different drives...BUT... I
formatted the device name before deleting the a couple of the drives from
the MetaDB. Some were mirrored :-O and wham, bam, thank you ma'am the
metaDb was wiped. The system crashed and I had a nice little read-only
filesyatem :-( But the list pulls through for me. Thanks again to the
responders!
-- Bhaba
=============== The replies =============
>From David Evans:
~~~~~~~~~~~~~~~~~
>This happened to me when I lost a root disk during a power spike. To get
>the disks back just use metainit on your md.tab. In my case I had to
>recreate md.tab but thats another story. Metainit will rebuild the
>database and all other details are kept on disk. The disks need to be
>declared in the same order as the were originally is the only trick.
>From Richard Smith:
~~~~~~~~~~~~~~~~~~~
>All the metaxxxx utilities are in /usr/opt/SUNWmd/sbin.
>As root, add this dir to your path to simplify things.
>
>I believe you'll need a 2mb slice minimum for each db copy
>and multiple dbs are recommended.
>
>Create three copies of the db on three separate disks as follows:
> metadb -f -c 3 -a /dev/rdsk/cxtxdxsx /dev/rdsk/cytydysy /dev/rdsk/cztzdzsz
> (obviously you'll supply values for x,y,z)
>
>You'll now need to re-initialize the metadevices. Read the man pages on
>metainit first and proceed with caution! Suggest you read docs.sun.com for
>background and the Solaris FAQ. Sorry, I don't want to mis-inform you about
>the process, nor be responsible for destroying data.
>
>If you do it correctly, you won't lose any data.
>From Ron Spillane:
~~~~~~~~~~~~~~~~~~
>Firstly if you don't have a backup metadb or better still a second metadb
>( I always create two metadb's on separate disks just in case of a disk
>failure ) all you can do is create a new metadb space.
>
>Secondly any mirrors, concatenations or stripes can be recreated without
>loss of data on the disks provided you haven't used the disks for anything
>else.
>
>Thirdly if you had a raid 5 setup you can recover this but you must use
>the -k option with metainit or you will lose your data on the disk.
>
>Hope this helps you.
>From Roy S. Rapport:
~~~~~~~~~~~~~~~~~~~~
>...That depends. Are you trying to recreate the db with the information in
>it originally? If so, you're probably SOL. If you're just trying to start
>fresh, delete the db entry with metadb -d -f, and recreate it
>From Rajeev Kumar:
~~~~~~~~~~~~~~~~~~
>I assume you have deleted only the very small partition containing metadb
>information. But not the actual metadevice data(or log partition), If they are
>intact and you haven't re-partitioned/reformatted those then you are
>prettu safe and all you have to do re-create metadb database. Here is
>nfor.
>
>I assume you have saved the metadevices information in
>/etc/opt/SUNWmd/md.tab file (or if not actually you know the command you have
>used to create metadevices.
>
>So you have simple metadevice(concatenated/stripped) just run command
>metadb -a -f mddb01
>
>(Where mddb01 is defined in md.tab file like
>mddb01 -c 4 /dev/dsk/c0t0d0s3 /dev/dsk/c0t1d0s3 .... and so on) i.e all metadb
>partition.
>
>and then re-create other meta-device (you are SAFE HERE) Since you haven't
>actually touched other partitions.
>
>NOTE: IF YOU SETTING UP RAID, YOU MUST USE -k option, with metainit
>command to
>create metadevice for LOG and DATA RAID partition. THe -k option will assume
>data already present on the slices and only setup RAID info. and doesn't
>re-initialize slices. If you don't use the whole metadevice will be
>re-initialized and all data on slices would be wiped off. So be carefull
>use -k
>option. If you had setup simple metadevice for concat./stripped device ot
>mirrors, just re-setup those again by ./metainit (etc..) command like you
>did earlier you are safe in that case.
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:17 CDT