Subject: RAIDframe "Headsup"
To: None <current-users@netbsd.org>
From: Greg Oster <oster@cs.usask.ca>
List: current-users
Date: 03/01/1999 21:41:44
Hi Folks

I've just committed a number of changes (available in tomorrow's SUP)
which should benefit everyone using the RAIDframe RAID driver in NetBSD.  
These changes include:

 1) Support for component labels:  Each component in the RAID set now
has a label that identifies the component.  If a component label for a
particular component not exist, or is otherwise inconsistent with
other component labels in the set, that component will be marked as
failed.  If this happens for too many components, the entire
configuration will fail.

 2) Support for a 'clean bit' for each component:  Unsafe shutdowns
are now detected and noted, and clean shutdowns (even without
unconfiguring the RAID set) should now set the clean bits as
appropriate.

 3) Support for rebuilding a component in-place:  Just hot-swap in 
a new disk, and rebuild directly to it.  (e.g. the disk
housing /dev/sd2e dies, and you have no hot-spares available.  Assuming
you can hot-swap in a new disk for /dev/sd2e, you can now simply
rebuild back to /dev/sd2e, and continue normal operation without
rebooting.)

 4) First kick at hot-adding hot spares:  This means hot spares can be
added at any time after the RAID set is configured, even when it is in
operation.  Hot-removal of spares is also in the works.

 5) Re-arranging of option letters for raidctl.  I've shuffled around
the option letters for raidctl a bit.  Hopefully the new letters will
be more "obvious".  Please see raidctl(8) for details.


To upgrade existing RAIDframe configurations:
 1) rebuild raidctl (don't overwrite your old one just yet, especially
if you intend on using it to unconfigure a RAID set before you
reboot... you'll need your old one for that, as the structures passed 
through the interface have changed a little in certain cases.)

 2) build a new kernel.  reboot using the new kernel.  From now on you
can use the new raidctl program.

 3) Since none of the existing components will have component labels,
you'll need to force the configuration with:

  raidctl -C rfconfig raid0

where 'rfconfig' is the name of your RAID config file, and 'raid0' is the 
device you're wanting to configure.  If you don't use '-C', the driver
will now refuse to configure the RAID set, as it won't find
appropriate values where the component labels should be.

Once the set has been configured you'll then need to do a:

  raidctl -I 12345 raid0

to put the initial component labels on the disk ('12345' is a serial
number that you supply).  To ensure that the clean bits will do their
jobs, you are then encouraged to initialize the parity on the set:

  raidctl -i raid0

(note that "-i" used to be "-r" -- this was one of the option letters
that changed).  You should now be ready to use the system normally.

 4) The next time you configure the system, 

  raidctl -c rfconfig raid0

should be sufficient.

(For those of you wondering: the component labels are written *outside* 
of the area where the real data/parity is written, but still exist 
within the component (much like disklabels).  The space was reserved 
for the labels *before* RAIDframe was added to the NetBSD source tree,
and already exists in any RAID sets you might have configured.  Thus
there is no need to change any component sizes in order to safely upgrade. )

I encourage everyone using RAIDframe to have a look at the raidctl(8)
man-page, as it's content has been revised a great deal.  If you have
any questions about any of this, feel free to send me an email.

Enjoy..

Later...

Greg Oster