Subject: Re: 'raidctl -s' false report component 'Clean: No' !?
To: None <kilbi@rad.rwth-aachen.de>
From: Greg Oster <oster@cs.usask.ca>
List: current-users
Date: 09/10/2000 15:31:49
Markus Kilbinger writes:
> system:
>     NetBSD mach 1.5_ALPHA2 NetBSD 1.5_ALPHA2 Sat Sep ... 9 19:31:23 MEST
> 
[snip]
> Though everything seems to work fine 'raidctl -s raid0' reports:
> 
> > Components:
> > 	     /dev/sd0e: optimal
> > 	     /dev/sd1e: optimal
> > No spares.
> > Component label for /dev/sd0e:
> >    Row: 0 Column: 0 Num Rows: 1 Num Columns: 2
> >    Version: 2 Serial Number: 9125342 Mod Counter: 1237272228
> >    Clean: No Status: 0
> >    sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1
> >    RAID Level: 1  blocksize: 512 numBlocks: 15818944
> >    Autoconfig: No
> >    Root partition: No
> >    Last configured as: raid0
> > Component label for /dev/sd1e:
> >    Row: 0 Column: 1 Num Rows: 1 Num Columns: 2
> >    Version: 2 Serial Number: 9125342 Mod Counter: 1237272228
> >    Clean: No Status: 0
> >    sectPerSU: 32 SUsPerPU: 1 SUsPerRU: 1
> >    RAID Level: 1  blocksize: 512 numBlocks: 15818944
> >    Autoconfig: No
> >    Root partition: No
> >    Last configured as: raid0
> > Parity status: clean
> > Reconstruction is 100% complete.
> > Parity Re-write is 100% complete.
> > Copyback is 100% complete.
> 
> Now 'Clean: No'! Why? Who is wrong?

They are actually both correct. 

As long as there is one (or more) open partitions on a RAID set, 
the 'clean' flag for each component will be set to "No".  When there is only 
one partition open, and that partition is closed, then the 'clean' flag will 
be set to correspond to the "Parity status".  ("Yes" if it's clean, "No" 
otherwise.)

In the first printout, the component labels are printed as the RAID set
is configured.  At that point, even though the raw partition of the RAID set 
is open, none of the component labels will have been have been updated
to say they are not clean (configuration is a special case). 

The 'raidctl -s raid0' always shows what the label is currently set to
as well, but will always say "Clean: No", given that it has to open the raw
RAID device in order to read the component labels.

So the 'problem' here is that the information is being obtained at different 
times, and while accurate, is somewhat confusing/contradictory :(

> Is anything wrong with the raid?

No.  "Parity status:" says 'clean', so things are fine.

Later...

Greg Oster