You are not logged in.

#1 2017-09-19 01:28:30

marian
Member
Registered: 2017-09-19
Posts: 3

systemd-boot zfs hook error - timing issue?

Until now I used Grub with zfs on root which has its own funny errors but I decided I'd try a systemd-boot environment in a VM.
Setting everything up was pretty straight forward following exactly the appropiate Wiki entries and everything boots fine.
There's only this one error from systemd which catches my eye:

:: running early hook [udev]
starting version 234
:: running hook [udev]
:: Triggering uevents...
:: running hook [resume]
:: running hook [zfs]
ZFS: Importing pool zpool.
:: running late hook [zfs]
no pools available to import
^
:: running cleanup hook [udev]

Welcome to Arch Linux!

Weird. Because everything gets mounted fine and usable, even seperate home, tmp and var datasets. Absolutely no issues. Is this some systemd timing thing? I've read so many things already but every issue is very specific and unique.

The root dataset has been flagged with "zpool set bootfs=...".
The mkinitcpio hooks are ordered as suggested by the Wiki ( "... zfs filesystems").
Systemd has a kernel parameter set for root zfs as option "zfs=zpool/root/default ..." in /boot/loader/entries/arch.conf
The root pool zpool has been added to the zpool.cache file and the zfs services "zfs.target", "zfs-import-cache" and "zfs-mount" have been enabled with systemctl (I thought this might have been too much and disabled zfs-mount but it makes absolutely no difference).
I do not have a fstab entry for the root dataset as it is managed by systemd already.

Is there any way to debug this?

Last edited by marian (2017-09-19 03:03:34)

Offline

#2 2017-10-03 15:37:14

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Re: systemd-boot zfs hook error - timing issue?

I had a similar issue when I set up my desktop in May, and believe it was this same race condition problem when using systemd-boot.

What did seem to work to avoid this was switching from the standard zfs hook to sd-zfs which allowed me to add the systemd hook before ZFS and the race condition seemed to go away.

However, after installing kernel 4.13 and latest zfs a couple days ago, now my boot halts when systemd tries to start the zfs-import-cache service because the zfs module is no longer automatically loading.  I can drop into maintenance mode and 'modprobe zfs' then restart the service and exit, and the boot continues fine.

Haven't figured this one out yet, but the sd-zfs PKGBUILD on aur is one version behind upstream, and I have not yet tried updating.

Last edited by blahhumbug (2017-10-03 15:41:05)

Offline

Board footer

Powered by FluxBB