From nobody@FreeBSD.org  Mon Mar 12 10:08:11 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 867C316A59D
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Mar 2007 10:08:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 7864413C458
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Mar 2007 10:08:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l2CA8As8090096
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 12 Mar 2007 10:08:10 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l2CA8Ajp090094;
	Mon, 12 Mar 2007 10:08:10 GMT
	(envelope-from nobody)
Message-Id: <200703121008.l2CA8Ajp090094@www.freebsd.org>
Date: Mon, 12 Mar 2007 10:08:10 GMT
From: Gergely Czuczy<czuczy@publishing.hu>
To: freebsd-gnats-submit@FreeBSD.org
Subject: umount doesn't deallocate the md device after an mfs filesystem
X-Send-Pr-Version: www-3.0

>Number:         110213
>Category:       misc
>Synopsis:       umount doesn't deallocate the md device after an mfs filesystem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 12 10:10:01 GMT 2007
>Closed-Date:    Mon Mar 12 10:29:44 GMT 2007
>Last-Modified:  Mon Mar 12 10:30:05 GMT 2007
>Originator:     Gergely Czuczy
>Release:        6.2-RELEASE-p2
>Organization:
Publishing Factory
>Environment:
FreeBSD luggage.in.publishing.hu 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #0: Fri Mar  9 17:22:07 UTC 2007     toor@blinky:/usr/obj/usr/src/sys/LUGGAGE  i386

>Description:
i've played around with mount_mfs to have a pre-prepared mfs filesystem at startup, and i mounted/umounted it several times after modifying my fstab.
at the end, the result was:
# ls -lh /dev/md*
crw-r-----  1 root  operator    0, 103 Mar 12 09:55 /dev/md0
crw-r-----  1 root  operator    0, 104 Mar 12 09:55 /dev/md1
crw-r-----  1 root  operator    0, 105 Mar 12 09:55 /dev/md2
crw-r-----  1 root  operator    0, 106 Mar 12 09:55 /dev/md3
crw-r-----  1 root  operator    0, 107 Mar 12 09:58 /dev/md4
crw-------  1 root  wheel       0,  56 Mar 12 09:20 /dev/mdctl
# mount
/dev/md4 on /mnt/keys (ufs, local, soft-updates)

seems like after umounting an mfs filesystem the system leaves some dirt behind.
>How-To-Repeat:
1) make an mfs entry in fstab
2) mount it and umount it
3) repeat 2) a few times
4) check the allocated md devices by ls /dev/md*

>Fix:
i don't have.
but umount should handle it automaticly :)
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Mon Mar 12 10:29:43 UTC 2007 
State-Changed-Why:  
This is not a PR. Close the PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=110213 

From: Remko Lodder <remko@elvandar.org>
To: Gergely Czuczy <czuczy@publishing.hu>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/110213: umount doesn't deallocate the md device after an mfs filesystem
Date: Mon, 12 Mar 2007 11:27:53 +0100

 On Mon, Mar 12, 2007 at 10:08:10AM +0000, Gergely Czuczy wrote:
 > 
 > FreeBSD luggage.in.publishing.hu 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #0: Fri Mar  9 17:22:07 UTC 2007     toor@blinky:/usr/obj/usr/src/sys/LUGGAGE  i386
 > 
 > >Description:
 > i've played around with mount_mfs to have a pre-prepared mfs filesystem at startup, and i mounted/umounted it several times after modifying my fstab.
 > at the end, the result was:
 > # ls -lh /dev/md*
 > crw-r-----  1 root  operator    0, 103 Mar 12 09:55 /dev/md0
 > crw-r-----  1 root  operator    0, 104 Mar 12 09:55 /dev/md1
 > crw-r-----  1 root  operator    0, 105 Mar 12 09:55 /dev/md2
 > crw-r-----  1 root  operator    0, 106 Mar 12 09:55 /dev/md3
 > crw-r-----  1 root  operator    0, 107 Mar 12 09:58 /dev/md4
 > crw-------  1 root  wheel       0,  56 Mar 12 09:20 /dev/mdctl
 > # mount
 > /dev/md4 on /mnt/keys (ufs, local, soft-updates)
 > 
 > seems like after umounting an mfs filesystem the system leaves some dirt behind.
 > >How-To-Repeat:
 > 1) make an mfs entry in fstab
 > 2) mount it and umount it
 > 3) repeat 2) a few times
 > 4) check the allocated md devices by ls /dev/md*
 > 
 > >Fix:
 > i don't have.
 > but umount should handle it automaticly :)
 > >Release-Note:
 
 This has nothing to do with mount/umount actually. This only makes the connection between
 some filesystem and the operating system. The md devices you are seeing are symbolic
 references to either a file (in your case) or real disks. if you want to get rid of them
 you should use mdconfig(8) (mdconfig -d -u md1 (substitute this with the number the device
 you are currently using)).
 
 Regards,
 Remko
 -- 
 Kind regards,
 
      Remko Lodder               ** remko@elvandar.org
      FreeBSD                    ** remko@FreeBSD.org
 
      /* Quis custodiet ipsos custodes */
>Unformatted:
