From owner-freebsd-bugs@FreeBSD.ORG Sun Nov 2 01:20:03 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 4BEBC1065677 for ; Sun, 2 Nov 2008 01:20:03 +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 26A4E8FC24 for ; Sun, 2 Nov 2008 01:20:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mA21K3Bc018900 for ; Sun, 2 Nov 2008 01:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mA21K3ES018899; Sun, 2 Nov 2008 01:20:03 GMT (envelope-from gnats) Resent-Date: Sun, 2 Nov 2008 01:20:03 GMT Resent-Message-Id: <200811020120.mA21K3ES018899@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, Gabriel Lavoie Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52C3A106564A for ; Sun, 2 Nov 2008 01:18:19 +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 3FCAF8FC16 for ; Sun, 2 Nov 2008 01:18:19 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mA21IJLa084999 for ; Sun, 2 Nov 2008 01:18:19 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mA21IJrg084998; Sun, 2 Nov 2008 01:18:19 GMT (envelope-from nobody) Message-Id: <200811020118.mA21IJrg084998@www.freebsd.org> Date: Sun, 2 Nov 2008 01:18:19 GMT From: Gabriel Lavoie To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/128529: root filesystem on GEOM Journal is unable to boot when the journal isn't marked clean/consistent 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: Sun, 02 Nov 2008 01:20:03 -0000 >Number: 128529 >Category: misc >Synopsis: root filesystem on GEOM Journal is unable to boot when the journal isn't marked clean/consistent >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 02 01:20:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Gabriel Lavoie >Release: 7.0 and 7.1beta2 >Organization: >Environment: FreeBSD headless.mutehq.net 7.1-BETA2 FreeBSD 7.1-BETA2 #0: Sun Oct 12 20:59:28 UTC 2008 root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: When a GEOM Journal, journalised root (/) filesystem is not marked as clean, after a power failure or a reset of the computer when some data were written to it, the kernel won't be able to mount the root filesystem and it will ask for manual root filesystem specification. It seems it caused by GEOM Journal not creating the device node before the kernel tries to mount the root filesystem. If I specify another slice containing a copy of the root filesystem, to boot on it, after I hit Enter, GEOM Journal will then mark the journalised root filesystem as consistent and the device node is probably created at this point. Once the filesystem is marked as consistent, a subsequent reboot will go through normally. Here is the "dmesg" sequence of what happens: GEOM_JOURNAL: Journal 2926131929: ad8s2a contains data. GEOM_JOURNAL: Journal 2926131929: ad8s2a contains journal. Trying to mount root from ufs:/dev/ad8s2a.journal Manual root filesystem specification: : Mount using filesystem eg. ufs:da0s1a ? List valid disk boot devices Abort manual input mountroot> ufs:ad8s1a Trying to mount root from ufs:ad8s1a GEOM_JOURNAL: Journal ad8s2a consistent. Here, ad8s2a.journal is the main system and ad8s1a is the backup system. >How-To-Repeat: 1 - Install FreeBSD on a GEOM Journal journalised root (/) filesystem. 2 - Once the system is installed, write some data on the root filesystem (dd if=/dev/random of=/TEST_FILE). 3 - While the data is being written on disk, push on the RESET button of the computer. 4 - See the kernel not finding the device when trying to mount the root filesystem. >Fix: Make sure GEOM Journal marks the journalised devices consistent and creates the necessary device nodes before the kernel tries to mount the root filesystem. Or do not use GEOM Journal on the root filesystem. The first option would be preferable. >Release-Note: >Audit-Trail: >Unformatted: