Page MenuHomeFreeBSD

zfs stand: plumb primary vdev out through zfs_probe_dev as needed
AcceptedPublic

Authored by kevans on Jan 29 2019, 3:32 PM.

Details

Reviewers
imp
avg
allanjude
tsoome
rgrimes
Group Reviewers
bhyve
Summary

This is a precursor to eventually allowing zfsbootcfg(8) to work in !i386 loaders.

efiloader has been updated to setup vfs.zfs.boot.primary_pool and vfs.zfs.boot.primary_pool as a test for correctness, that change can easily be separated out. The pool/vdev guids in efiloader are now cleared if we fail to probe that pool as a boot pool, then later setup if we find another ZFS pool to /boot from and the vfs.zfs.boot.* vars are setup only once we've finished our currdev probe and determined a sane ZFS pool to boot from.

The efiloader changes will likely be committed separate, or they could wait until efiloader actually learns how to honor pad2 configuration. I lean towards committing them now and working zfsbootcfg over a little bit to not operate if machdep.bootmethod != BIOS.

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 22251

Event Timeline

kevans created this revision.Jan 29 2019, 3:32 PM
allanjude accepted this revision.Mar 25 2019, 7:56 AM
This revision is now accepted and ready to land.Mar 25 2019, 7:56 AM
rgrimes resigned from this revision.Mar 25 2019, 9:21 AM

um, I am sorry to jump in late. but ... there is something similar I did too:

https://www.illumos.org/issues/9423

The idea is simple - record the boot device and provide it in illumos case for kernel, but while the information is there... maybe it can be useful...

imp added inline comments.Mar 31 2019, 5:14 PM
stand/efi/libefi/efizfs.c
78

formatting?

stand/efi/loader/main.c
277

I'm curious why probe_zfs_currdev isn't setting these...