NetBSD Problem Report #30074
From jukka+moray@salmi.ch Wed Apr 27 18:11:56 2005
Return-Path: <jukka+moray@salmi.ch>
Received: from mx1.salmi.ch (mx1.salmi.ch [212.254.26.68])
by narn.netbsd.org (Postfix) with ESMTP id AB89963B117
for <gnats-bugs@gnats.NetBSD.org>; Wed, 27 Apr 2005 18:11:55 +0000 (UTC)
Message-Id: <20050427181139.2C4EEFDC0@moray.salmi.ch>
Date: Wed, 27 Apr 2005 20:11:39 +0200 (CEST)
From: j+nbsd@2005.salmi.ch
Reply-To: j+nbsd@2005.salmi.ch
To: gnats-bugs@netbsd.org
Subject: proposed changes to RAIDframe related rc.d scripts
X-Send-Pr-Version: 3.95
>Number: 30074
>Category: misc
>Synopsis: proposed changes to RAIDframe related rc.d scripts
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: oster
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Apr 27 18:12:00 +0000 2005
>Last-Modified: Wed Jun 09 15:55:01 +0000 2010
>Originator: Jukka Salmi
>Release: NetBSD 3.99.3
>Organization:
>Environment:
$ ident /etc/rc.d/raidframe*
/etc/rc.d/raidframe:
$NetBSD: raidframe,v 1.9 2004/08/13 18:08:03 mycroft Exp $
/etc/rc.d/raidframeparity:
$NetBSD: raidframeparity,v 1.3 2004/10/11 15:00:51 christos Exp $
System: NetBSD moray.salmi.ch 3.99.3 NetBSD 3.99.3 (GENERIC.NOEHCI.APM) #0: Tue Apr 26 18:54:44 CEST 2005 build@moray.salmi.ch:/build/nbsd/i386/sys/arch/i386/compile/GENERIC.NOEHCI.APM i386
Architecture: i386
Machine: i386
>Description:
On a current NetBSD system using RAIDframe and default rc.d scripts,
parity checking the RAID set is done late in the boot process and in
the background: until it succeeds the data is not protected against a
component failure.
Although this may be desired behaviour for some people, I'd appreciate
the possibility to choose whether parity checking should be done as early
as possible (i.e. before fsck runs and filesystems are mounted) and in the
foreground, or as it is right now (late and in the background).
I proposed the changes needed to do this to current-users on 2005/04/22:
http://mail-index.netbsd.org/current-users/2005/04/22/0017.html - I interpret
the lack of replies as "no objections" ;-)
The patch (see Fix: below) adds this functionality: setting
raidframeparity_early to NO (the default) doesn't change any behaviour;
setting it to YES runs the parity check right after non-auto-configured
RAID sets are configured and in the foreground.
>How-To-Repeat:
n/a
>Fix:
I'll append the patch to this PR ASAP; additionally, it's available from
http://salmi.ch/~jukka/RAIDframe-parity_rc.d.patch
>Release-Note:
>Audit-Trail:
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
To: netbsd-bugs@netbsd.org
Cc:
Subject: Re: misc/30074: proposed changes to RAIDframe related rc.d scripts
Date: Wed, 27 Apr 2005 20:13:35 +0200
--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
j+nbsd@2005.salmi.ch --> netbsd-bugs (2005-04-27 18:12:00 +0000):
> >Fix:
> I'll append the patch to this PR ASAP
Here it is.
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
--UlVJffcvxoiEqYs2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="RAIDframe-parity_rc.d.patch"
--- src/etc/defaults/rc.conf.orig 2004-10-18 02:24:26.000000000 +0200
+++ src/etc/defaults/rc.conf 2005-04-22 01:33:19.000000000 +0200
@@ -89,6 +89,12 @@
#
raidframe=YES
+# RAIDframe parity check.
+#
+raidframeparity_early=NO # Set to YES to have parity check done as
+ # soon as possible and to pause the boot
+ # process until it completes.
+
# Crypto file system.
#
cgd=YES
--- src/etc/rc.d/raidframe.orig 2004-10-18 02:24:27.000000000 +0200
+++ src/etc/rc.d/raidframe 2005-04-22 01:09:12.000000000 +0200
@@ -4,6 +4,7 @@
#
# PROVIDE: disks
+# BEFORE: raidframeparity1
$_rc_subr_loaded . /etc/rc.subr
--- src/etc/rc.d/raidframeparity.orig 2004-10-18 02:24:27.000000000 +0200
+++ src/etc/rc.d/raidframeparity 2005-04-22 01:17:45.000000000 +0200
@@ -9,6 +9,7 @@
name="raidframeparity"
start_cmd="raidframeparity_start"
+start_precmd="! checkyesno raidframeparity_early"
stop_cmd=":"
raidframeparity_start()
--- /dev/null 2005-04-22 01:33:10.000000000 +0200
+++ src/etc/rc.d/raidframeparity1 2005-04-22 01:18:03.000000000 +0200
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# $NetBSD$
+#
+
+# PROVIDE: disks raidframeparity1
+
+$_rc_subr_loaded . /etc/rc.subr
+
+name="raidframeparity1"
+start_cmd="raidframeparity1_start"
+start_precmd="checkyesno raidframeparity_early"
+stop_cmd=":"
+
+raidframeparity1_start()
+{
+ # Initiate parity/mirror reconstruction as needed
+ #
+ for dev in $(sysctl -n hw.disknames); do
+ case $dev in
+ raid[0-9]*)
+ raidctl -v -P $dev
+ ;;
+ esac
+ done
+}
+
+load_rc_config $name
+run_rc_command "$1"
--UlVJffcvxoiEqYs2--
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: misc/30074: proposed changes to RAIDframe related rc.d scripts
Date: Tue, 3 Oct 2006 14:22:03 +0200
j+nbsd@2005.salmi.ch --> netbsd-bugs (2005-04-27 18:12:00 +0000):
> I'll append the patch to this PR ASAP; additionally, it's available from
> http://salmi.ch/~jukka/RAIDframe-parity_rc.d.patch
I moved a more up to date patch to
http://salmi.ch/~jukka/patches/nbsd/HEAD/raidframeparity_early.patch
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
From: Jukka Salmi <j+nbsd@2007.salmi.ch>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: misc/30074: proposed changes to RAIDframe related rc.d scripts
Date: Sat, 30 Jun 2007 15:23:25 +0200
I slightly changed the [1]patch as described on [2]current-users and
added documentation.
[1] http://salmi.ch/~jukka/patches/nbsd/HEAD/raidframeparity_early.patch
[2] http://mail-index.netbsd.org/current-users/2007/06/30/0004.html
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
Responsible-Changed-From-To: misc-bug-people->oster
Responsible-Changed-By: riz@NetBSD.org
Responsible-Changed-When: Tue, 08 Jun 2010 23:35:54 +0000
Responsible-Changed-Why:
raidframe related, i'd like greg to see if it's valid.
From: Greg Oster <oster@cs.usask.ca>
To: gnats-bugs@NetBSD.org
Cc: riz@NetBSD.org, oster@NetBSD.org, misc-bug-people@netbsd.org,
netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, j+nbsd@2005.salmi.ch
Subject: Re: misc/30074 (proposed changes to RAIDframe related rc.d scripts)
Date: Wed, 9 Jun 2010 08:37:24 -0600
On Tue, 8 Jun 2010 23:35:54 +0000 (UTC)
riz@NetBSD.org wrote:
> Synopsis: proposed changes to RAIDframe related rc.d scripts
>
> Responsible-Changed-From-To: misc-bug-people->oster
> Responsible-Changed-By: riz@NetBSD.org
> Responsible-Changed-When: Tue, 08 Jun 2010 23:35:54 +0000
> Responsible-Changed-Why:
> raidframe related, i'd like greg to see if it's valid.
Yes, the idea is definitely valid, and even more appropriate now that we
have the improved parity handling thanks to Jed Davis. With Jed's
changes, parity rebuilds are *much* faster, meaning that the admins are
likely to be more willing to wait for the rebuilds/checks rather than
needing to ge the system back in operation first.
Later...
Greg Oster
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.