Page MenuHomeFreeBSD

r364746 broke ZFS legacy mounts and zvol imports: fix

Authored by cy on Aug 25 2020, 11:19 PM.



r364746 broke ZFS legacy mounts and zvol imports. Systems with UFS root and a collection of ZFS legacy mounts, zvols and regular ZFS mounts fail to boot, a) not discovering zvols and failing to mount legacy zfs datasets and the nullfs mounts that rely on them.

I am open to the idea of separating the added function into a separate file to be executed prior to rc.d/zvol.

Test Plan

This is currently in use here.

Diff Detail

rS FreeBSD src repository
Lint Skipped
Unit Tests Skipped
Build Status
Buildable 33164

Event Timeline

cy requested review of this revision.Aug 25 2020, 11:19 PM
cy created this revision.

I should have done this properly in the first place.

Note to self: use git diff --cached instead of git diff, or a partial patch is the result.

Fix a typo and remove an extraneous line.

This revision is now accepted and ready to land.Aug 26 2020, 3:09 AM

Oh, do you need to add it to libexec/rc/rc.d/Makefile?

cy planned changes to this revision.Aug 26 2020, 3:33 AM

Yes. Thanks for catching that.

Proposed commit log message:

As of r364746 (OpenZFS import) existing ZPOOLs are not imported
prior to zvol and mountcritlocal resulting in ZVOLs (swap and
virtual machine UFS filesystems) being unavailable, leading to
boot failures.

We move the zpool import from zfs to a new zpool script, with the
-N option to avoid mounting datasets while making the ZPOOL's
datasets available for "legacy" mount (mountpoint=legacy) and ZVOLs
available for subsequent use for swap (in the zvol rc sript) or
for UFS or other filesystems in fstab(5), mounted by mountcritlocal.

This revision was not accepted when it landed; it landed in state Needs Review.Aug 26 2020, 1:14 PM
This revision was automatically updated to reflect the committed changes.