Date: Sat, 13 May 2023 02:53:47 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 271384] zpool not imported if zfs isn't enabled in loader.conf Message-ID: <bug-271384-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D271384 Bug ID: 271384 Summary: zpool not imported if zfs isn't enabled in loader.conf Product: Base System Version: 13.1-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: phryk-ports@wzff.de Without `zfs_load=3D"YES"` and `zpool_cache_*` (presumably both, but haven't tested in isolation) in `loader.conf`, zpools don't get imported during init =E2=80=93 even if `/etc/rc.conf` contains `zfs_enable=3D"YES"`. This means that on setups with zfs-independent boot, at least automatic mounting doesn't work =E2=80=93 but probably also that mounting zfs datasets via fstab becomes impossible. There is an `/etc/rc.d/zpool` that does the import, but it only seems to be invoked by `/etc/rc.d/zfskeys` which seems to be for a completely different use-case. I fixed this on my system by adding this to `/etc/rc.d/zfs`: ``` start_precmd=3D"zfs_prestart" zfs_prestart(){ if checkyesno zpool_enable; then /etc/rc.d/zpool start fi } ``` And then `zpool_enable=3D"YES"` to my rc.conf. There might be a more elegant way of checking whether the `zpool start` should be invoked than introducing a new variable to `rc.conf` and there probably should also be a poststop command to do `zpool stop` but I'm migrating away from zfs, it's already over 10 hours after I wanted to be done with the initial migration and I'm definitely not pouring more time into this =E2=80=93 just wanted to hand this over on my way out the door. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-271384-227>