Bug 193237

Summary: Boot attempts to execute `fsck_zfs`, fails and goes single-user.
Product: Base System Reporter: zyxabacab
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed Not A Bug    
Severity: Affects Only Me CC: kpneal
Priority: ---    
Version: 10.0-RELEASE   
Hardware: amd64   
OS: Any   

Description zyxabacab 2014-09-02 02:07:19 UTC
After a system crash, the boot process stops while trying to execute `fsck_zfs`.

The crash occurred when trying to mount UnionFS from a directory in a storage filesystem to a path in the root FS.

The ZFS filesystems are in legacy mode, with mountpoints defined in '/etc/fstab'.  If set to non-legacy, or manually mounted in single-user mode, everything mounts okay and the system boots.  `zpool scrub` finds no errors and does not solve the problem.

Relevant bootup messages (after running `fsck` once and rebooting):

Starting filesystem checks:
/dev/ada0p3: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ada0p3: clean, 31540463 free (1663 frags, 3942350 blocks, 0.0% fragmentation)
fsck: exec fsck_zfs for storage/data1 in /sbin:/usr/sbin: No such file or directory
fsck: exec fsck_zfs for storage/data2 in /sbin:/usr/sbin: No such file or directory
fsck: exec fsck_zfs for storage/data1 in /sbin:/usr/sbin: No such file or directory
fsck: exec fsck_zfs for storage/data2 in /sbin:/usr/sbin: No such file or directory
/dev/ada0p4: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ada0p4: clean, 64996259 free (35 frags, 8124528 blocks, 0.0% fragmentation)
THE FOLLOWING FILE SYSTEMS HAD AN UNEXPECTED INCONSISTENCY:
  zfs: storage/data2 (/mnt/storage/data2), zfs: storage/data1 (/mnt/storage/data1)
Unknown error; help!
ERROR: ABORTING BOOT (sending SIGTERM to parent)!
Sep 1 18:34:58 init: /bin/sh on /etc/rc terminated abnormally, going to single user mode
Comment 1 Kevin P. Neal 2014-09-02 05:26:34 UTC
From man fstab:

     If the sixth field is not present or is zero, a value of zero is returned
     and fsck(8) and quotacheck(8) will assume that the file system does not
     need to be checked.

The sixth field is the "pass" field, which says in what order fsck should be run. Does setting it to zero solve the problem for you?
Comment 2 zyxabacab 2014-09-02 18:29:16 UTC
Problem resolved, 'fs_passno' was set and non-zero.  Derp.  My mistake.

I'm closing the bug.  Thanks for the pointer!