Subject: Re: parity check with root on raid
To: None <netbsd-help@netbsd.org>
From: Greg Oster <oster@cs.usask.ca>
List: netbsd-help
Date: 04/23/2005 21:08:15
=3D?ISO-8859-1?Q?Ari_Sovij=3DE4rvi?=3D writes:
> > One fsck doesn't always find all the problems.  If you have a really
> > nasty crash, multiple "fsck -f"'s might be needed before fsck doesn't=

> > find any further errors.  Just because you did one fsck doesn't mean
> > it fixed all the problem!  (I wouldn't go blaming RAIDframe if you
> > just did a single fsck after a nasty crash.)
> =

> Okay, maybe I was just a bit too paranoid about this. I've been experie=
ncing =

> rather annoying problems with RAIDframe the whole time I've been using =

> 2.0-series NetBSD. :-/

I'm interested in hearing about RAIDframe problems.  (email me =

privately, if you'd like.)

> > If the parity is not known to be correct, then in a redundant
> > configuration RAIDframe will *never* use the parity bits to construct=

> > data.  In a RAID 1 configuration, this means that the mirror will
> > never be read -- only the master will be read.  Writes will continue
> > to go to both.  Reads from the mirror will only occur once it is
> > known that the data for that sector is consistent across both
> > components.
> =

> In that case, why is RAIDframe still reading both in the mirror during =

> FSCK even if the array is dirty? =


It shouldn't be. =


> I keep my disks in mobile HDD racks which have =

> their own activity LEDs, so I see how they're accessed. During boot-FSC=
K, I =

> see =

> both disks being active for 10 seconds, then first for 10 seconds, then=
 the =

> second for another 10 seconds. It goes on alternating between them unti=
l the =

> FSCK is complete. But since parity is known being dirty, why are they b=
oth =

> being accessed for reading?

That sounds weird... in rf_SelectMirrorDiskIdle() (which should be =

the one used if you trace things all the way) you'll see code in =

there to check if "parity_good" is RF_RAID_DIRTY, and, if so, to only =

use the primary component and not the mirror.  I'm not sure at all =

why you are seeing the behaviour you describe, since if fsck has to =

write something, the write must go to both disks.  I'm not sure what =

you can run to make sure that the only thing you see is really =

reads... (except maybe "fsck -n"?)

> Another question comes in mind; is there any way to change the behavior=
 how =

> the disks are read? For example, in FreeBSD's gmirror, the user can sel=
ect =

> between "lowest load", "preferred drive", "round-robin" and "split requ=
ests" =

> modes.

No.  In RAIDframe, the only behavior is "shortest queue"... =


Later...

Greg Oster