conf/85558: initdiskless should not generate memory disks with soft-updates enabled

Ralf Wenk RZ-FreeBSD0605 at hs-karlsruhe.de
Thu Sep 1 08:50:14 GMT 2005


>Number:         85558
>Category:       conf
>Synopsis:       initdiskless should not generate memory disks with soft-updates enabled
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 01 08:50:13 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Ralf Wenk
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
Hochschule Karlsruhe - Technik und Wirtschaft, University of Applied Sciences
>Environment:
System: FreeBSD RZ-Wenk1 5.4-STABLE FreeBSD 5.4-STABLE #2: Mon Aug 22 09:29:37 CEST 2005 wera0003 at RZ-FreeBSD1:/usr/obj/usr/src/sys/fsc-t-diskless-SMP i386


>Description:
When booting diskless initdiskless creates memory disks with soft-updates
enabeld. The delayed freeing of blocks occupied by removed files causes
suprious 'file system full' messages in our diskless environment while
initdiskless is running and building the final /etc directory. These
messages occured more often with a SMP kernel (9 times out of 10) than
with a non SMP kernel (5 times out of 10). The resulting memory disk
containing /etc is 84% used.

This behaviour was never seen as long as we used 5.3. It was discovered
almost immediately after upgrading to STABLE. I think it shows up because
of the finer locking in STABLE.

>How-To-Repeat:
Use a diskless environment and a not too big memory disk. Replace varoius
files in it with the different templates initdiskless uses.

>Fix:
Add the -S switch to the mdmfs call in mount_md() in initdiskless to disable
the use of soft-updates in memory disks.

--- initdiskless.udiff begins here ---
--- etc.old/rc.d/initdiskless   Tue Apr  5 14:06:37 2005
+++ etc/rc.d/initdiskless       Mon Aug 22 09:04:47 2005
@@ -151,7 +151,7 @@
 # Create a generic memory disk
 #
 mount_md() {
-    /sbin/mdmfs -i 4096 -s $1 -M md $2
+    /sbin/mdmfs -S -i 4096 -s $1 -M md $2
 }

 # Create the memory filesystem if it has not already been created
--- initdiskless.udiff ends here ---

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


More information about the freebsd-bugs mailing list