NetBSD Problem Report #14770
Received: (qmail 21416 invoked from network); 29 Nov 2001 13:15:54 -0000
Message-Id: <200111291516.fATFG3100458@test-s4.nagler-software.com>
Date: Thu, 29 Nov 2001 16:16:03 +0100 (CET)
From: wgstuken@nagler-company.com
Reply-To: wgstuken@nagler-company.com
To: gnats-bugs@gnats.netbsd.org
Subject: raidframe startupscript doesn't handle autoconfigured devices correctly
X-Send-Pr-Version: 3.95
>Number: 14770
>Category: kern
>Synopsis: raidframe startupscript doesn't handle autoconfigured devices correctly
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: lukem
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Nov 29 13:16:04 +0000 2001
>Closed-Date: Sun Jan 27 14:17:10 +0000 2002
>Last-Modified: Fri Dec 21 18:25:47 +0000 2012
>Originator: Wolfgang Stukenbrock (wgstuken@nagler-compay.com)
>Release: NetBSD release 1.5.2
>Organization:
Dr. Nagler & Comapny GmbH
>Environment:
System: NetBSD test-s4 1.5.2 NetBSD 1.5.2 (NSW-Firewall) #2: Thu Nov 29 15:07:53 CET 2001 wgstuken@test-s4:/export/netbsd-1.5.2/usr/src/sys/arch/i386/compile/NSW-Firewall i386
>Description:
The raidframe startup script in /etc/rc.d will only configure raid devices, but does noch check parity on autoconfigured raid devices.
For autoconfigured raid-devices (e.g. the root device) there is no raidx.conf and this script just ignores suh devices.
A second bug in this script is, that it only looks for raid0 to raid3.
This can be done much better be examining the /dev/raid*d devices.
>How-To-Repeat:
seen on every boot ...
>Fix:
change the raidframe startupscript in a way like the following:
#!/bin/sh
#
# $NetBSD: raidframe,v 1.x 2000/05/16 16:54:33 oster Exp $
#
# PROVIDE: disks
. /etc/rc.subr
name="raidframe"
start_cmd="raidframe_start"
stop_cmd=":"
raidframe_start()
{
( for dev in `(cd /dev && echo raid*d) | sed -e 's/raid\([0-9]\)d/raid\1/g'`; do
if raidctl -s $dev > /dev/null 2>&1; then
# raid device already configured - just check parity in background ...
echo -n " $dev"
else
if [ -f /etc/$dev.conf ]; then
# raid device not configured - check for config file ...
raidctl -c /etc/$dev.conf $dev
echo -n " $dev"
fi
fi
done
) | read alldev;
if [ -n "$alldev" ]; then
( for dev in $alldev; do raidctl -P $dev; done ) &
fi
}
load_rc_config $name
run_rc_command "$1"
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: lukem
State-Changed-When: Sun Jan 27 06:16:54 PST 2002
State-Changed-Why:
this problem has been solved in netbsd-current
Responsible-Changed-From-To: kern-bug-people->lukem
Responsible-Changed-By: lukem
Responsible-Changed-When: Sun Jan 27 06:16:54 PST 2002
Responsible-Changed-Why:
>Unformatted:
(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.