misc/128529: root filesystem on GEOM Journal is unable to boot when the journal isn't marked clean/consistent

Gabriel Lavoie glavoie at mutehq.net
Sat Nov 1 18:20:03 PDT 2008


>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 at 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:
  <fstype>:<device>  Mount <device> using filesystem <fstype>
                       eg. ufs:da0s1a
  ?                  List valid disk boot devices
  <empty line>       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:


More information about the freebsd-bugs mailing list