Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Nov 2007 07:54:14 GMT
From:      Dmitry Rybin <dimanenator@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   conf/118035: /etc/rc.d/mdconfig always fails with: ERROR: mdX already exists
Message-ID:  <200711140754.lAE7sEBD015841@www.freebsd.org>
Resent-Message-ID: <200711140800.lAE807lF031786@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711140754.lAE7sEBD015841>