Split raidframe parity checking/rebuild out into raidframeparity, which is
called after quota so we don't end up with fsck and raidframe parity rebuild taking forever after a crash/reboot. While we are here check for raid[0-9].conf & raid[1-9][0-9].conf not raid[0-9].conf & raid[0-9][0-9].conf
This commit is contained in:
parent
26ebf5f371
commit
df86ef5a9f
@ -1,4 +1,4 @@
|
||||
# $NetBSD: mi,v 1.105 2002/09/03 00:56:10 wiz Exp $
|
||||
# $NetBSD: mi,v 1.106 2002/09/03 15:35:54 abs Exp $
|
||||
./.cshrc etc-util-etc
|
||||
./.profile etc-util-etc
|
||||
./dev/MAKEDEV.local etc-sys-etc
|
||||
@ -127,6 +127,7 @@
|
||||
./etc/rc.d/quota etc-sys-rc
|
||||
./etc/rc.d/racoon etc-net-rc
|
||||
./etc/rc.d/raidframe etc-sys-rc
|
||||
./etc/rc.d/raidframeparity etc-sys-rc
|
||||
./etc/rc.d/rarpd etc-bootserver-rc
|
||||
./etc/rc.d/rbootd etc-bootserver-rc
|
||||
./etc/rc.d/root etc-sys-rc
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: special,v 1.63 2002/09/03 00:56:09 wiz Exp $
|
||||
# $NetBSD: special,v 1.64 2002/09/03 15:35:51 abs Exp $
|
||||
# @(#)special 8.2 (Berkeley) 1/23/94
|
||||
#
|
||||
# Hand-crafted mtree specification for the dangerous files.
|
||||
@ -180,6 +180,7 @@
|
||||
./etc/rc.d/quota type=file mode=0555
|
||||
./etc/rc.d/racoon type=file mode=0555
|
||||
./etc/rc.d/raidframe type=file mode=0555
|
||||
./etc/rc.d/raidframeparity type=file mode=0555
|
||||
./etc/rc.d/rarpd type=file mode=0555
|
||||
./etc/rc.d/rbootd type=file mode=0555
|
||||
./etc/rc.d/root type=file mode=0555
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: postinstall,v 1.26 2002/07/30 09:11:27 lukem Exp $
|
||||
# $NetBSD: postinstall,v 1.27 2002/09/03 15:35:53 abs Exp $
|
||||
#
|
||||
# Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
@ -352,8 +352,8 @@ do_rc()
|
||||
mountall mountcritlocal mountcritremote mountd moused \
|
||||
mrouted mixerctl named ndbootd network newsyslog nfsd \
|
||||
nfslocking ntpd ntpdate poffd postfix ppp pwcheck \
|
||||
quota racoon rpcbind raidframe rarpd rbootd root \
|
||||
route6d routed rtadvd rtsold rwho savecore \
|
||||
quota racoon rpcbind raidframe raidframeparity rarpd rbootd \
|
||||
root route6d routed rtadvd rtsold rwho savecore \
|
||||
screenblank sendmail securelevel sshd swap1 swap2 \
|
||||
sysdb sysctl syslogd timed ttys virecover \
|
||||
wdogctl wscons wsmoused \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.33 2002/08/27 14:12:14 takemura Exp $
|
||||
# $NetBSD: Makefile,v 1.34 2002/09/03 15:35:54 abs Exp $
|
||||
|
||||
.include <bsd.own.mk>
|
||||
|
||||
@ -15,7 +15,7 @@ FILES= DAEMON LOGIN NETWORKING SERVERS \
|
||||
moused mrouted \
|
||||
named ndbootd network newsyslog nfsd nfslocking ntpd ntpdate \
|
||||
poffd postfix ppp pwcheck quota \
|
||||
racoon rpcbind raidframe rarpd rbootd root \
|
||||
racoon rpcbind raidframe raidframeparity rarpd rbootd root \
|
||||
route6d routed rtadvd rtsold rwho \
|
||||
savecore screenblank sendmail securelevel sshd \
|
||||
swap1 swap2 sysdb sysctl syslogd \
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: raidframe,v 1.6 2002/01/27 14:16:33 lukem Exp $
|
||||
# $NetBSD: raidframe,v 1.7 2002/09/03 15:35:55 abs Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: disks
|
||||
@ -14,26 +14,14 @@ stop_cmd=":"
|
||||
raidframe_start()
|
||||
{
|
||||
# Configure non-auto-configured raid devices.
|
||||
# Ensure order by globbing raid[0-9].conf before raid[0-9][0-9].conf.
|
||||
# Ensure order by globbing raid[0-9].conf before raid[1-9][0-9].conf.
|
||||
#
|
||||
for cfg in /etc/raid[0-9].conf /etc/raid[0-9][0-9].conf ; do
|
||||
for cfg in /etc/raid[0-9].conf /etc/raid[1-9][0-9].conf ; do
|
||||
[ ! -f $cfg ] && continue
|
||||
dev=${cfg##*/}
|
||||
dev=${dev%%.conf}
|
||||
raidctl -c $cfg $dev
|
||||
done
|
||||
|
||||
# Initiate parity/mirror reconstruction as needed, in the background.
|
||||
#
|
||||
(
|
||||
for dev in `sysctl -n hw.disknames`; do
|
||||
case $dev in
|
||||
raid[0-9]*)
|
||||
raidctl -P $dev
|
||||
;;
|
||||
esac
|
||||
done
|
||||
) &
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
|
30
etc/rc.d/raidframeparity
Executable file
30
etc/rc.d/raidframeparity
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: raidframeparity,v 1.1 2002/09/03 15:35:55 abs Exp $
|
||||
#
|
||||
|
||||
# REQUIRE: quota
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="raidframeparity"
|
||||
start_cmd="raidframeparity_start"
|
||||
stop_cmd=":"
|
||||
|
||||
raidframeparity_start()
|
||||
{
|
||||
# Initiate parity/mirror reconstruction as needed, in the background.
|
||||
#
|
||||
(
|
||||
for dev in `sysctl -n hw.disknames`; do
|
||||
case $dev in
|
||||
raid[0-9]*)
|
||||
raidctl -P $dev
|
||||
;;
|
||||
esac
|
||||
done
|
||||
) &
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
Loading…
Reference in New Issue
Block a user