conf/122477: /etc/rc.d/mdconfig and mdconfig2 are ignoring
additional parameter in some cases
Jürgen Unger
j.unger at jpru.de
Sat Apr 5 23:30:01 UTC 2008
>Number: 122477
>Category: conf
>Synopsis: /etc/rc.d/mdconfig and mdconfig2 are ignoring additional parameter in some cases
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat Apr 05 23:30:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Jürgen Unger
>Release: 7.0-RELEASE and CURRENT
>Organization:
>Environment:
FreeBSD test3.lab.jpru.de 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sat Apr 5 07:09:37 CEST 2008 root at test3.lab.jpru.de:/usr/obj/usr/src/sys/GENERIC i386
same on machine with current.
>Description:
in the case _mdconfig_list or _mdconfig2_list is set
explicit in /etc/rc.conf because of non contingous
device-numbers of md-devices, then it is impossible to
activate a newly created and configured md-device
with the following command (sample):
/etc/rc.d/mdconfig2 start md4444
>How-To-Repeat:
given is a set of configured md-devices with an _mdconfig2_list
explicit set in /etc/rc.conf:
_mdconfig2_list="md1001 md1002 md1003"
create a new md-device with a file-backingstore:
dd if=/dev/zero of=/somwhere/out/there/5555.img bs=1M count=100
mdconfig -a -t vnode -f /somewhere/out/there/5555.img -u 5555
newfs /dev/md5555
mdconfig -d -u 5555
add it to rc.conf:
_mdconfig2_list="md1001 md1002 md1003 md5555"
mdconfig_md5555="-t vnode -f /somewhere/out/there/5555.img"
now try to use mdconfig2 to activate this configuration:
/etc/rc.d/mdconfig2 start md5555
then he complains about md1001 already there where it only should
process md5555.
the below patches are fixing this while preserving the known
behaviour in the common known cases.
>Fix:
test3# diff -u mdconfig.orig mdconfig
--- mdconfig.orig 2008-02-24 18:53:19.000000000 +0100
+++ mdconfig 2008-04-06 02:50:19.000000000 +0200
@@ -174,14 +174,14 @@
done
}
+load_rc_config $name
+
_mdconfig_cmd="$1"
if [ $# -gt 0 ]; then
shift
fi
[ -n "$*" ] && _mdconfig_list="$*"
-load_rc_config $name
-
_mdconfig_unit=0
if [ -z "${_mdconfig_list}" ]; then
while :; do
test3# diff -u mdconfig2.orig mdconfig2
--- mdconfig2.orig 2008-02-24 18:53:19.000000000 +0100
+++ mdconfig2 2008-04-06 02:48:50.000000000 +0200
@@ -203,14 +203,14 @@
done
}
+load_rc_config $name
+
_mdconfig2_cmd="$1"
if [ $# -gt 0 ]; then
shift
fi
[ -n "$*" ] && _mdconfig2_list="$*"
-load_rc_config $name
-
_mdconfig2_unit=0
if [ -z "${_mdconfig2_list}" ]; then
while :; do
#
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list