From nobody@FreeBSD.org  Thu Jan 15 15:16:14 2004
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id F1E2C16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Jan 2004 15:16:14 -0800 (PST)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 2786F43D45
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Jan 2004 15:16:14 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.12.10/8.12.10) with ESMTP id i0FNGEdL015234
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Jan 2004 15:16:14 -0800 (PST)
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.12.10/8.12.10/Submit) id i0FNGDsf015233;
	Thu, 15 Jan 2004 15:16:14 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200401152316.i0FNGDsf015233@www.freebsd.org>
Date: Thu, 15 Jan 2004 15:16:14 -0800 (PST)
From: Peter Schmiedeskamp <pschmied@mac.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Unmount md from CD fails.
X-Send-Pr-Version: www-2.0

>Number:         61400
>Category:       misc
>Synopsis:       Unmount md from CD fails.
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 15 15:20:14 PST 2004
>Closed-Date:    Tue Aug 24 04:44:08 GMT 2004
>Last-Modified:  Tue Aug 24 04:44:08 GMT 2004
>Originator:     Peter Schmiedeskamp
>Release:        5.2-RELEASE
>Organization:
n/a
>Environment:
FreeBSD bsdbuilder.XXXXXXXXXXX 5.2-RELEASE FreeBSD 5.2-RELEASE #0: Sun Jan 11 04:21:45 GMT 2004     root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
When I mdconfig and mount a file that resides on a CD, I am unable to unconfigure that file or unmount the /dev/mdX device.  When these files reside elsewhere (not on a CD device), unmounting and unconfiguring an md device works as expected.
>How-To-Repeat:
bsdbuilder}~# umount /cdrom

bsdbuilder}~# mount /cdrom

bsdbuilder}~# cd /cdrom/floppies 

bsdbuilder}/cdrom/floppies# ls
CHECKSUM.MD5    README.TXT      drivers.flp     kern.flp
DRIVERS.TXT     boot.flp        fixit.flp       mfsroot.flp

bsdbuilder}/cdrom/floppies# mdconfig -a -t vnode -u 0 -f mfsroot.flp 

bsdbuilder}/cdrom/floppies# mount /dev/md0 /mnt/floppy

bsdbuilder}/cdrom/floppies# ls /mnt/floppy
.snap           mfsroot.gz

bsdbuilder}/cdrom/floppies# umount /mnt/floppy
umount: unmount of /mnt/floppy failed: Resource temporarily unavailable

bsdbuilder}/cdrom/floppies# mdconfig -d -u 0
mdconfig: ioctl(/dev/mdctl): Device busy

bsdbuilder}/cdrom/floppies# 

>Fix:
No fix is known.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: tjr 
State-Changed-When: Tue Aug 24 04:42:01 GMT 2004 
State-Changed-Why:  
You should mount the md filesystem readonly. The incorrect handling of 
read/write mounts on write-protected media (CD-ROM in your case, floppy 
disks in other cases) is well known. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=61400 
>Unformatted:
