conf/120194: [patch] UFS volumes on ZVOLs cannot be fsck'd at boot
James Snow
snow at teardrop.org
Thu Jan 31 22:40:02 UTC 2008
>Number: 120194
>Category: conf
>Synopsis: [patch] UFS volumes on ZVOLs cannot be fsck'd at boot
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jan 31 22:40:01 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: James Snow
>Release: 7.0-RC1
>Organization:
>Environment:
FreeBSD zfs0 7.0-RC1 FreeBSD 7.0-RC1 #0: Thu Jan 31 15:42:56 EST 2008 snow at zfs0:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
UFS volumes created on ZVOLs (as demonstrated in the FreeBSD ZFS Wiki: http://wiki.freebsd.org/ZFSQuickStartGuide) cannot be fsck'd by the current boot process.
In the current boot process, fsck runs before zfs, which runs before mountlate. If a UFS/ZVOL mount point is in /etc/fstab with pass# set to a non-zero value, even in 'late' is set, the boot process will abort.
>How-To-Repeat:
(Assuming ZFS is enabled and a zpool called 'tank' exists...)
zfs create -V1g tank/ufs
newfs /dev/zvol/tank/ufs
echo "/dev/zvol/tank/ufs /mnt ufs rw,late 2 2" >> /etc/fstab
shutdown -r now
>Fix:
Patches provided by swell.k at gmail.com:
--- /usr/src/etc/rc.d/hostid
+++ /etc/rc.d/hostid
@@ -28,7 +28,7 @@
#
# PROVIDE: hostid
-# REQUIRE: root
+# REQUIRE: early
# BEFORE: mountcritlocal
# KEYWORD: nojail
--- /usr/src/etc/rc.d/zfs
+++ /etc/rc.d/zfs
@@ -4,7 +4,7 @@
#
# PROVIDE: zfs
-# REQUIRE: mountcritlocal
+# REQUIRE: hostid
This puts /etc/rc.d/zfs before /etc/rc.d/fsck, which solves the problem.
Patch attached with submission follows:
--- /usr/src/etc/rc.d/hostid
+++ /etc/rc.d/hostid
@@ -28,7 +28,7 @@
#
# PROVIDE: hostid
-# REQUIRE: root
+# REQUIRE: early
# BEFORE: mountcritlocal
# KEYWORD: nojail
--- /usr/src/etc/rc.d/zfs
+++ /etc/rc.d/zfs
@@ -4,7 +4,7 @@
#
# PROVIDE: zfs
-# REQUIRE: mountcritlocal
+# REQUIRE: hostid
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list