-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
systemd zfs.target service doesn't start on Debian Stretch with custom kmod packages #6435
Comments
@jwittlincohen This makes it sound like that |
@Conan-Kudo Thanks for the suggestion. On my Debian Stretch system with the Debian-packaged ZFS binaries, /lib/systemd/system contains several zfs unit files including |
@jwittlincohen Can you check to see if they may be in |
Nope, I see nothing relevant in |
@jwittlincohen Huh, I think I know what's happened here. I bet it's installing the sysvinit scripts for Debian/Ubuntu targets. |
@Conan-Kudo Your suspicion appears to be correct. I see init scripts for |
@jwittlincohen I've proposed a patch in #6548 to try and do the right thing with systemd when building packages. If you have a chance can you try it out and see if it does resolve your issue. |
@behlendorf I built new SPL and ZFS kmod packages on Debian Stretch (9.1) from git using the proposed patch. I am still seeing the same behavior - init scripts are being installed rather than systemd unit files. Happy to test again with a new patch. |
ubuntu zfsutils-linux constains /sbin/zfs /sbin/zpool as well as /lib/systemd/system/zfs*service . |
I worked around this issue by simply using the Debian systemd unit and config files. The ZoL systemd files are not packaged correctly, and in any case contain incorrect locations for the zfs and zpool binaries as well as the zpool.cache file (on Debian - presumably they are correct on RHEL/CentOS). The Debian systemd files work without issue. See #6606. |
I'm having the same issue on Ubuntu 17.04 with kernel 4.13.2. What would be the next step to fixing this? |
I am having the same issue on Debian Stretch. Checked out the latest git master, did the same as the OP, "Follow the instructions from the wiki to build custom SPL and ZFS 0.7.0 packages. Install resulting packages" Now I am seeing "zfs.target: Cannot add dependency job, ignoring: Unit zfs.target is masked." as well. systemctl enable zfs-import-cache.service I also see symlinks to /dev/null: ls -lha /etc/systemd/system/zfs* /etc/systemd/system/zfs-mount.service.wants: /etc/systemd/system/zfs-share.service.wants: /etc/systemd/system/zfs.target.wants: From the timestamps, I'm guessing the *.wants directories are leftovers from the now-uninstalled Debian zfs packages. |
Looks like a duplicate of #6591, closing. |
Distribution Name | Debian
Distribution Version | Stretch (9.1)
Linux Kernel | 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux
Architecture | AMD64
ZFS Version | 0.7.0-1
SPL Version | 0.7.0-1
Describe the problem you're observing
I followed the instructions on the ZFS Custom Packages Wiki to build custom kmod packages of ZFS/SPL 0.7.0 for Debian Stretch. I am using ZFS for my root pool and was able to get a working initramfs by following the Debian on Root ZFS guide which instructs the creation of a file at /usr/share/initramfs-tools/conf.d/zfs (this file and its content is included in Debian's binary packages). While the system mounts my / partition, systemd fails to start the "zfs.target" service, which prevents the automatic mounting of other partitions, such as /home. I see the following error messages from dmesg and systemctl:
In contrast, here is the systemctl output on a Debian Stretch system with Debian's packaged DKMS binaries:
Describe how to reproduce the problem
Install Debian Stretch on a VM or on physical hardware (I have tested with both) using the Debian Jessie ZFS on Root Guide. Instructions must be altered slightly for Debian Stretch. This guide will setup a working Debian Stretch system with a ZFS root pool using Debian's packages for ZFS/SPL 0.6.5.9.
Uninstall all Debian SPL and ZFS packages
Follow the instructions from the wiki to build custom SPL and ZFS 0.7.0 packages. Install resulting packages
To ensure a working initramfs create the following file. This step is not required for the binaries included with Stretch, but is for the custom kmod packages. Update the initramfs:
The text was updated successfully, but these errors were encountered: