Subject: Re: raidframe recovery
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Greg Oster <oster@cs.usask.ca>
List: netbsd-users
Date: 10/04/2004 11:19:11
Patrick Welche writes:
> On Mon, Oct 04, 2004 at 10:16:08AM -0400, David Maxwell wrote:
> Yes:
> > b) You had a kernel with 'options RAID_AUTOCONFIG', and the volume set
> > to autoconfig (raidctl -A yes), and you're now booting a kernel that
> > doesn't.
> > 
> > So:
> > 
> > Do a 'raidctl -c raid0.conf raid0', where raid0.conf is the config file
> > you used to create the RF volume. If, due to your disk being removed,
> > your device names have changed, you'll need to update the conf file to
> > match their new names. Raidctl won't let you remap the volume with the
> > devices in the wrong order, it will give an error and stop the
> > operation.
> 
> I'm still stuck (NetBSD 2.0E/i386 5 May 2004):
> 
> # cat /etc/raid0.conf
> START array
> 1 2 0
> 
> START disks
> /dev/wd1a
> /dev/wd2a
> 
> START layout
> 128 1 1 1
> 
> START queue
> fifo 100
>
>
> and its wd1 that's dead. If I boot with or without wd1 plugged in:

If you boot without wd1 plugged in, then what shows up as the new wd1?
I.e. are the drive names not moving around if you unplug wd1??

And no autoconfig in use here, right?

> Hosed component: /dev/wd2a
> Hosed component: /dev/wd1a
> raid0: Component /dev/wd1a being configured at col: 0
>          Column: 0 Num Columns: 0
>          Version: 0 Serial Number: 0 Mod Counter: 0
>          Clean: No Status: 0
> /dev/wd1a has a different modfication count: 268 0
> Number of columns do not match for: /dev/wd1a
> /dev/wd1a is not clean!

The above doesn't look like a RAID component.

> raid0: Component /dev/wd2a being configured at col: 1
>          Column: 1 Num Columns: 2
>          Version: 2 Serial Number: 35710 Mod Counter: 268
>          Clean: No Status: 0
> /dev/wd2a has a different serial number: 0 35710
> /dev/wd2a is not clean!
> raid0: There were fatal errors
> RAIDFRAME: failed rf_ConfigureDisks with 22
> # raidctl -c /etc/raid0.conf raid0
> raidctl: ioctl (RAIDFRAME_CONFIGURE) failed: Invalid argument

The old config code is ugly... autoconfig would have Just Worked 
here. :(

Assuming that wd2 stays where it is, the following config:

START array
1 2 0

START disks
absent
/dev/wd2a

START layout
128 1 1 1

START queue
fifo 100

should get you going again.  I don't recall if '-c' works with this, 
or whether you'll have to use '-C' to force it to configure.  In 
either case, you'll want to make absolutely sure that the component 
wd2a above is in the 2nd component position, regardless of whether 
it's called 'wd2a' or something else.

Later...

Greg Oster