NetBSD Problem Report #8882

Received: (qmail 865 invoked from network); 26 Nov 1999 17:14:41 -0000
Message-Id: <199911261313.IAA00383@duality.gratuitous.org>
Date: Fri, 26 Nov 1999 08:13:55 -0500 (EST)
From: nemo@red-bean.com
Reply-To: nemo@red-bean.com
To: gnats-bugs@gnats.netbsd.org
Cc: nemo@red-bean.com
Subject: various raidframe suckage
X-Send-Pr-Version: 3.95

>Number:         8882
>Category:       kern
>Synopsis:       various raidframe suckage
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    oster
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 26 09:18:01 +0000 1999
>Closed-Date:    Sat Oct 07 19:58:28 +0000 2006
>Last-Modified:  Sat Oct 07 19:58:28 +0000 2006
>Originator:     Joel N. Weber II
>Release:        1.4 branch, checked out from CVS a week ago
>Organization:
Red Bean Software/Gratuitous Organization for Gratuitous Software Enhancement
>Environment:
Note that this is really a post 1.4.1 version in the 1.4 branch
System: NetBSD duality 1.4.1 NetBSD 1.4.1 (XANTHINE) #0: Thu Nov 25 14:00:04 EST 1999 nemo@duality:/usr/src/syssrc/sys/arch/i386/compile/XANTHINE i386


>Description:
So I did raidctl -C, and then raidctl -i, without doing raidctl -I first,
and noticed a number of things that sucked:

1) If you're running raidctl remotely, you won't see any diagnostics unless
you run dmesg every now and then.  It would be really nice if raidctl could
print errors on the tty raidctl is running on.

2) When you do raidctl -i without doing raidctl -I, you get a cryptic error
about the second of the two devices in your mirror being hosed.  More explicit
diagnostics would be good.  So would a manpage which made sure that the casual
reader became aware of the right sequence for initializing the RAID.

The raidctl manpage is also a bit confusing and overwhelming when you first
read it.  It would be nice if it discussed how to initialize a raid device, and
then went over the various recovery options.

3) Apparently when you haven't done raidctl -I to either partition, NetBSD
chooses one as random as being the unhosed partition.  I suspect that the code
that checks for `all but one' partition having the same label should be changed
to make sure that at least two partitions have the same label.  It also seems
to me that having some signature which is present on all partitions with raid
labels that actually gets checked would be very useful here, so that when you
have two partitions with no raid label, rather than saying `oh, gee, they have
different raid labels', you know that they actually don't have raid labels.

>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:

From: Michael Graff <explorer@flame.org>
To: nemo@red-bean.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: kern/8882: various raidframe suckage
Date: 26 Nov 1999 12:39:16 -0800

 nemo@red-bean.com writes:

 Add to that:

 	(4)  raidctl -i should do nothing if the collection doesn't
              need it.  raidctl -i -f should _always_ check the parity.

 That way I can have

 	raidctl -i

 in my rc script, but only rebuild when it is reasonably needed to do
 so.

 Also, add:

 	(5)  There is a shutdown race condition that occurs when the
              raid set is still active with a mounted file system on
              it, and the system is halted.  Basically, it goes like
              this:

 	     raid system is asked to shut down.  It won't, since it
 	     has open file systems on it.

 	     file system is unmounted.

 	     raid system doesn't get a second chance, and won't update
 	     its clean bits.

 I think this is more of a general NetBSD problem, however.  What
 should perhaps happen is something like this:

 	shutdown time has arrived.

 	/etc/rc.shutdown is run.

 	all non-local file systems are unmounted, and re-mounted
 	read-only.  Or at least /.  But at this time, all file systems
 	need to be either unmounted or read-only.

 	if the raid system is asked to shut down and has no _writable_
 	clients, it can safely sync its state to disk.

 	/etc/rc.shutdown-final is run.  This can do things like tell
 	the UPS to power off, etc.  It cannot write anywhere,
 	however.

 	system reboots/halts.

Responsible-Changed-From-To: kern-bug-people->oster 
Responsible-Changed-By: oster 
Responsible-Changed-When: Thu Feb 10 18:55:06 PST 2000 
Responsible-Changed-Why:  
I'm responsible for (some of the :) ) raidframe suckage. :) 
State-Changed-From-To: open->closed
State-Changed-By: oster@netbsd.org
State-Changed-When: Sat, 07 Oct 2006 19:58:28 +0000
State-Changed-Why:
The "-v" and "-P" and "-p" options to raidctl should address most of
the issues here.  The man-page for raidctl has also changed a lot
since NetBSD 1.4 days.



>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.