conf/118035: /etc/rc.d/mdconfig always fails with: ERROR: mdX already exists

Dmitry Rybin dimanenator at gmail.com
Wed Nov 14 00:00:08 PST 2007


>Number:         118035
>Category:       conf
>Synopsis:       /etc/rc.d/mdconfig always fails with: ERROR: mdX already exists
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 14 08:00:07 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Rybin
>Release:        FreeBSD 7.0BETA2
>Organization:
Corbina Telectom
>Environment:
FreeBSD diameter3.corbina.net 7.0-BETA2 FreeBSD 7.0-BETA2 #0: Wed Nov 14 10:04:40 MSK 2007     root at diameter3.corbina.net:/usr/obj/usr/src/sys/DIAM3  amd64
>Description:
/etc/rc.d/mdconfig always fails with: ERROR: mdX already exists.
>How-To-Repeat:
=== /etc/rc.conf ===
mdconfig_md0="-t malloc -s 256m"
mdconfig_md0_owner="root:wheel"
mdconfig_md0_perms="700"
mdconfig_md1="-t malloc -s 256m"
mdconfig_md1_owner="root:wheel"
mdconfig_md1_perms="700"
====================

=== /etc/fstab ===
/dev/md0                /tmp/md0    ufs     rw      0       0
/dev/md1                /tmp/md1    ufs     rw      0       0
==================
$ mkdir /tmp/md0 /tmp/md1

$ /etc/rc.d/mdconfig start
>Fix:
--- mdconfig.orig       2007-11-14 10:48:51.000000000 +0300
+++ mdconfig    2007-11-14 10:49:11.000000000 +0300
@@ -119,7 +119,7 @@
                                        sleep 2
                                fi
                        fi
-                       if mdconfig -l -u ${_md} >/dev/null 2>&1; then
+                       if [ -e /dev/${_md} ]; then
                                err 3 "${_md} already exists"
                        fi
                        echo "Creating ${_md} device (${_type})."


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list