Open lastb0isct opened 1 year ago
Looks like fallout from https://github.com/openzfs/zfs/commit/979fd5a434ebc422c02dec5deddd485ce6127fc5 if I had to guess.
@gregory-lee-bartholomew I would guess your change was incorrect, as it was "ExecStart=-..." before 8213ddff4a1b58ee8c5aa292401dbbe23a73a1c9 and your change made it "-ExecStart=...".
It wasn't my doing. Someone else mangled the commit.
The issue is that zfs-snapshot-bootfs.service doesn't even exist! It is removed so the service itself can't start...because there is not .service file.
systemctl cat zfs-snapshot-bootfs.service
No files found for zfs-snapshot-bootfs.service.
It won't be in the systemd libraries of the running system. Dracut injects it into the initramfs from /usr/lib/dracut/modules.d/90zfs.
As a quick fix until you can upgrade to a newer version of zfs-dracut that is fixed, you can edit the /usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service
file directly and regenerate your initramfs.
This is what mine currently looks like.
# rpm -qf /usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service
zfs-dracut-2.1.7-1.fc36.noarch
# cat /usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service
[Unit]
Description=Snapshot bootfs just before it is mounted
Requisite=zfs-import.target
After=zfs-import.target dracut-pre-mount.service
Before=dracut-mount.service
DefaultDependencies=no
ConditionKernelCommandLine=bootfs.snapshot
[Service]
Type=oneshot
ExecStart=-/bin/sh -c '. /lib/dracut-zfs-lib.sh; decode_root_args || exit; [ "$root" = "zfs:AUTO" ] && root="$BOOTFS"; SNAPNAME="$(getarg bootfs.snapshot)"; exec /sbin/zfs snapshot "$root@${SNAPNAME:-%v}"'
RemainAfterExit=yes
Interesting. Mismerge, then? Surprising nobody got burned by it sooner...
I'll try to remember to open a trivial fix PR for 2.1.10 later if nobody beats me to it.
Yeah, for the record: https://github.com/openzfs/zfs/pull/13769#issuecomment-1267396763
I'll try to remember to open a trivial fix PR for 2.1.10 later if nobody beats me to it.
I think it is already fixed in more recent versions.
Huh, I was looking at 2.1-release and saw it look like that I thought...nope, you're right, it's fixed in 2.1.7.
Thanks! I hadn't seen that kerfuffle with 2.1.6.
Interesting that rpm -qf /usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service
outputs this:
file /usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service is not owned by any package
I will try and reboot the system tomorrow when i'm back in front of it. Thank you for the guidance!
Sounds like a corrupt rpm database. Maybe rpmdb --rebuilddb
would fix it?
Doesn't resolve it. Shouldn't matter though, should it?
rpmdb --rebuilddb
rpm -qf /usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service
file /usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service is not owned by any package
If the files under /var/lib/rpm
are missing or corrupt, then rpm -qf may not work. Does rpm -ql zfs-dracut
show anything?
# rpm -ql zfs-dracut
/usr/lib/dracut/modules.d/02zfsexpandknowledge
/usr/lib/dracut/modules.d/02zfsexpandknowledge/module-setup.sh
/usr/lib/dracut/modules.d/90zfs
/usr/lib/dracut/modules.d/90zfs/export-zfs.sh
/usr/lib/dracut/modules.d/90zfs/import-opts-generator.sh
/usr/lib/dracut/modules.d/90zfs/module-setup.sh
/usr/lib/dracut/modules.d/90zfs/mount-zfs.sh
/usr/lib/dracut/modules.d/90zfs/parse-zfs.sh
/usr/lib/dracut/modules.d/90zfs/zfs-env-bootfs.service
/usr/lib/dracut/modules.d/90zfs/zfs-generator.sh
/usr/lib/dracut/modules.d/90zfs/zfs-lib.sh
/usr/lib/dracut/modules.d/90zfs/zfs-load-key.sh
/usr/lib/dracut/modules.d/90zfs/zfs-needshutdown.sh
/usr/lib/dracut/modules.d/90zfs/zfs-rollback-bootfs.service
/usr/lib/dracut/modules.d/90zfs/zfs-snapshot-bootfs.service
/usr/share/doc/zfs-dracut
/usr/share/doc/zfs-dracut/README.dracut.markdown
Yep, but not everything it seems.
rpm -ql zfs-dracut
/usr/lib/dracut/modules.d/02zfsexpandknowledge
/usr/lib/dracut/modules.d/02zfsexpandknowledge/module-setup.sh
/usr/lib/dracut/modules.d/90zfs
/usr/lib/dracut/modules.d/90zfs/export-zfs.sh
/usr/lib/dracut/modules.d/90zfs/module-setup.sh
/usr/lib/dracut/modules.d/90zfs/mount-zfs.sh
/usr/lib/dracut/modules.d/90zfs/parse-zfs.sh
/usr/lib/dracut/modules.d/90zfs/zfs-env-bootfs.service
/usr/lib/dracut/modules.d/90zfs/zfs-generator.sh
/usr/lib/dracut/modules.d/90zfs/zfs-lib.sh
/usr/lib/dracut/modules.d/90zfs/zfs-load-key.sh
/usr/lib/dracut/modules.d/90zfs/zfs-needshutdown.sh
/usr/share/doc/zfs-dracut
/usr/share/doc/zfs-dracut/README.dracut.markdown
Very odd. Sorry, I don't know what is going on there.
If Plex is modifying the packages, maybe it's a question for them?
It seems kind of academic, but that would be what I'd do - go compare their specfile with the stock one.
Plex is not doing anything...that is the hostname of my server, lol
Oh, I see. In your original paste, it had rpm -ql zfs-dracutPLEX
, which confused me. I see you've edited it.
Going to open a new ticket, but trying to update zfs it seems I have both dkms & kmod on my system...will ask what the best way forward is for that in a separate ticket.
Updated today -- will restart when time permits.
Describe the problem you're observing
ZFS Volumes do not mount on boot. I think that there is an issue with zfs-snapshot-bootfs.service. It does not exist on my system after upgrading to 2.1.6. My dmesg shows this:
I have to then run
systemctl restart zfs-import-scan.service
&systemctl restart zfs-mount.service
to mount the pools.Describe how to reproduce the problem
Just reboot and voila nothing is mounted.
Include any warning/errors/backtraces from the system logs
This is the
/var/log/messages | grep zfs
: