Subject: Re: Raidframe and raidset initialization
To: Jason White <jdwhite@menelos.com>
From: Greg Oster <oster@cs.usask.ca>
List: netbsd-users
Date: 03/10/2007 00:48:55
Jason White writes:
> I'm looking for a definitive answer and/or clarification to the following.
> The raidctl manpage for the '-i' option says:
>
> "In particular, (re-)write the parity on the selected device. This MUST be
>
> done for all RAID sets before the RAID device is labeled and before file
> systems are created on the RAID device."
>
> I realize it may be a fine point, but does the initialization have to
> *finish* before the raid device can be used or is it sufficient to have
> merely started initialization? I'm aware that I can manipulate the raid
> device, but is it safe to do so before initialization is complete?
What you can get away with (and what you shouldn't try to get away
with) depends on the RAID level being used, and on how valuable your
data is. If you don't particularly care too much about the data you
can start using the RAID set even before it is initialized. For a
RAID level 1 set, you're probably OK, even if a component fails. For
a RAID level 5 set, you're likely going to end up with scrambled data
(depending on what was on the drives before -- if it was all zeros,
you might be OK there too).
The manpage talks about the safest course of action... if you're in a
hurry to get real data "back on-line" you might build a RAID 5 set,
restore the data, and *then* do the initialization -- with the
knowledge that if a component fails, you might have to do the
whole operation all over again... But I wouldn't recommend doing that
unless, for example, you know that the components contain all zeros
before the RAID set is constructed (i.e. that the parity was actually
all correct before the check!! :) ).
Later...
Greg Oster