misc/128529: root filesystem on GEOM Journal is unable to boot when
the journal isn't marked clean/consistent
glavoie at mutehq.net
Sat Nov 1 18:20:03 PDT 2008
>Synopsis: root filesystem on GEOM Journal is unable to boot when the journal isn't marked clean/consistent
>Arrival-Date: Sun Nov 02 01:20:02 UTC 2008
>Originator: Gabriel Lavoie
>Release: 7.0 and 7.1beta2
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
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>
? List valid disk boot devices
<empty line> Abort manual input
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.
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.
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.
More information about the freebsd-bugs