From owner-freebsd-bugs@FreeBSD.ORG Thu Jan 31 22:40:02 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 012A816A420 for ; Thu, 31 Jan 2008 22:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id E51D513C45B for ; Thu, 31 Jan 2008 22:40:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m0VMe1lu019397 for ; Thu, 31 Jan 2008 22:40:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m0VMe1gR019396; Thu, 31 Jan 2008 22:40:01 GMT (envelope-from gnats) Resent-Date: Thu, 31 Jan 2008 22:40:01 GMT Resent-Message-Id: <200801312240.m0VMe1gR019396@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, James Snow Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D740616A421 for ; Thu, 31 Jan 2008 22:34:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id D635113C457 for ; Thu, 31 Jan 2008 22:34:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m0VMWegt057382 for ; Thu, 31 Jan 2008 22:32:40 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m0VMWef1057381; Thu, 31 Jan 2008 22:32:40 GMT (envelope-from nobody) Message-Id: <200801312232.m0VMWef1057381@www.freebsd.org> Date: Thu, 31 Jan 2008 22:32:40 GMT From: James Snow To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: conf/120194: [patch] UFS volumes on ZVOLs cannot be fsck'd at boot X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2008 22:40:02 -0000 >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@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@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: