Bug 242189 - ZFS filesystems are not mounted from ATA on startup due to rc <-> kernel race if root is on NVMe
Summary: ZFS filesystems are not mounted from ATA on startup due to rc <-> kernel race...
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Chuck Tuffli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-24 13:41 UTC by Oleg Sidorkin
Modified: 2021-01-17 14:51 UTC (History)
1 user (show)

See Also:


Attachments
Add root_hold_wait to zpool, zfs, zfsbe, dumpon (1.44 KB, patch)
2020-12-01 20:39 UTC, Oleg Sidorkin
no flags Details | Diff
mount output (4.73 KB, text/plain)
2021-01-17 14:48 UTC, Oleg Sidorkin
no flags Details
zfs list output (4.85 KB, text/plain)
2021-01-17 14:48 UTC, Oleg Sidorkin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Sidorkin 2019-11-24 13:41:04 UTC
Looks like root_hold_wait should be added to /etc/rc.d/zfs script after r355010.

If root is on NVMe and e.g. /var/db is on ZFS on top of ATA then root gets mounted and /etc/rc.d/zfs get started before ata bus scan completed.  System boots with ZFS filesystems unmounted. There is root_hold_wait calls in /etc/rc.d/mountcritlocal, but zfs filesystems are not mentioned in fstab.
Comment 1 Oleg Sidorkin 2020-12-01 20:39:35 UTC
Created attachment 220145 [details]
Add root_hold_wait to zpool, zfs, zfsbe, dumpon

Attached patch solves the problem for me
Comment 2 Chuck Tuffli freebsd_committer 2021-01-16 23:34:47 UTC
Would it be possible to add the output from the commands 'mount' and 'zfs list' to ensure I'm reproducing this correctly?
Comment 3 Oleg Sidorkin 2021-01-17 14:48:06 UTC
Created attachment 221677 [details]
mount output
Comment 4 Oleg Sidorkin 2021-01-17 14:48:25 UTC
Created attachment 221678 [details]
zfs list output
Comment 5 Oleg Sidorkin 2021-01-17 14:51:37 UTC
(In reply to Chuck Tuffli from comment #2)
Here they are. Without patch all zfs systems are not mounted