NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: recovering a raid conf



On Sun, Aug 16, 2009 at 11:23:02AM -0400, Steven M. Bellovin wrote:
> I did a rather stupid thing when building a raid-based system: I did
> 
>       raidctl -A no raid0
> 
> then shut down.  Now, when I try to boot it, it tells me that it knows
> nothing of raid0.  I have a raid0.conf file -- but on the raid
> partition...
> 
> Is there any easy way to recover it?  A lot of work went into building
> that disk...

Fastest:
It's easier to just rebuild the raid0.conf from scratch.  Boot off an
install CD and take a S.W.A.G. at your prior configuration.  Use
'raidctl -c' (and NOT 'raidctl -C'!!!) with your replacement conf file.
If correct, it will pop straight up.  If it's not, no harm and no foul.

Correctest:
Alternatively, grep through each of the raw disks for '^START' and hope
for the best:

        for x in /dev/rwd0a /dev/rwd1a ... /dev/rwdxa
        do
                echo -n "$x ... "
                grep -a -40 '^START ' $x >> /tmp/crossed-fingers
                echo DONE
        done

-- 
. ___ ___  .   .  ___
.  \    /  |\  |\ \
.  _\_ /__ |-\ |-\ \__


Home | Main Index | Thread Index | Old Index