conf/63169: Booting crashes on CURRENT with NFS mounts in fstab

James E. Housley jeh at thehousleys.net
Sat Feb 21 05:30:22 PST 2004


>Number:         63169
>Category:       conf
>Synopsis:       Booting crashes on CURRENT with NFS mounts in fstab
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 21 05:30:21 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     James E. Housley
>Release:        FreeBSD 4.9-RELEASE-p2 i386
>Organization:
>Environment:
System: FreeBSD vaio.int.thehousleys.net 5.2.1-RC2 FreeBSD 5.2.1-RC2 #1: Mon Feb 16 18:17:43 EST 2004     root at vaio2.int.thehousleys.net:/usr/obj/usr/src/sys/GENERIC  i386


	
>Description:
	Using RELENG_5_2, but the HEAD files have the same problem.  On
	booting fsck seems to want to be scheduled for all file systems
	listed in fstab, including nfs.  This produces an error about
	fsck_nfs ... or similar.

	The below patch takes the code frmo mountcritlocal to remove the
	network file systems from the list.
>How-To-Repeat:
	
>Fix:

--- /usr/src/etc/rc.d/bgfsck	Wed Apr 23 11:38:02 2003
+++ bgfsck	Sat Feb 21 08:03:54 2004
@@ -22,7 +22,25 @@
 	fi
 	echo "${bgfsck_msg}."
 
-	(sleep ${background_fsck_delay}; nice -4 fsck -B -p) 2>&1 | \
+	# Set up the list of network filesystem types for which mounting
+	# should be delayed until after network initialization.
+	case ${extra_netfs_types} in
+	[Nn][Oo])
+		;;
+	*)
+		netfs_types="${netfs_types} ${extra_netfs_types}"
+		;;
+	esac
+
+	# Mount everything except nfs filesystems.
+	mount_excludes='no'
+	for i in ${netfs_types}; do
+		fstype=${i%:*}
+		mount_excludes="${mount_excludes}${fstype},"
+	done
+	mount_excludes=${mount_excludes%,}
+
+	(sleep ${background_fsck_delay}; nice -4 fsck -B -p -t ${mount_excludes}) 2>&1 | \
 	    logger -p daemon.notice -t fsck &
 }
 
--- /usr/src/etc/rc.d/fsck	Sat Oct 12 06:31:31 2002
+++ fsck	Sat Feb 21 03:08:18 2004
@@ -36,10 +36,28 @@
 		echo "Starting file system checks:"
 		case ${OSTYPE} in
 		FreeBSD)
+			# Set up the list of network filesystem types for which mounting
+			# should be delayed until after network initialization.
+			case ${extra_netfs_types} in
+			[Nn][Oo])
+				;;
+			*)
+				netfs_types="${netfs_types} ${extra_netfs_types}"
+				;;
+			esac
+
+			# Mount everything except nfs filesystems.
+			mount_excludes='no'
+			for i in ${netfs_types}; do
+				fstype=${i%:*}
+				mount_excludes="${mount_excludes}${fstype},"
+			done
+			mount_excludes=${mount_excludes%,}
+
 			if checkyesno background_fsck; then
-				fsck -F -p
+				fsck -F -p -t {mount_excludes}
 			else
-				fsck -p
+				fsck -p -t {mount_excludes}
 			fi
 			;;
 		NetBSD)


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


More information about the freebsd-bugs mailing list