Page MenuHomeFreeBSD

rc.d/mountcritlocal: Make sure zpools are imported for legacy ZFS
ClosedPublic

Authored by cy on Sat, Jun 14, 1:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jul 7, 9:39 PM
Unknown Object (File)
Sun, Jul 6, 5:25 PM
Unknown Object (File)
Fri, Jul 4, 8:53 AM
Unknown Object (File)
Wed, Jun 25, 12:33 PM
Unknown Object (File)
Tue, Jun 24, 5:12 PM
Unknown Object (File)
Fri, Jun 20, 7:15 AM
Unknown Object (File)
Tue, Jun 17, 6:24 AM
Unknown Object (File)
Sun, Jun 15, 8:08 PM
Subscribers
None

Details

Summary

Legacy ZFS uses fstab to mount its datasets. In an attempt to fix
another problem 900bc0206348 broke legacy ZFS in fstab(5). This
comit works around the problem by mountcritlocal scanning /etc/fstab
for zfs mountpoint and if any are found invoke /etc/rc.d/zpool start.

Test Plan

Running here.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

cy requested review of this revision.Sat, Jun 14, 1:34 PM
cy created this revision.

Just a quick Q, but I think this is for the best.

Though it still has the problem the other fix tried to fix i think. Do we want to put the loop after all the other filesystem? Or would that break ufs mounts on ZFS? Zfs doing its own thing is kinda a pain...

libexec/rc/rc.d/mountcritlocal
34

Do we call it directly or use service?

This revision is now accepted and ready to land.Sat, Jun 14, 1:45 PM
In D50844#1160585, @imp wrote:

Just a quick Q, but I think this is for the best.

Though it still has the problem the other fix tried to fix i think. Do we want to put the loop after all the other filesystem? Or would that break ufs mounts on ZFS? Zfs doing its own thing is kinda a pain...

No. Because the order of mounts in fstab is not preserved. It would be non-zfs first then zfs. Currently filesystems are mounted in sequence.

Agreed, this is a bit of a hack but IMO there is no other choice between the two options.

libexec/rc/rc.d/mountcritlocal
34

service(8) is not available until /usr is mounted. /usr could be (and is here) mounted by mountcritlocal.