[Pkg-zfsonlinux-devel] Bug#951549: systemd-fstab-generator: zfs entries in fstab should require zfs-import-scan or zfs-import-cache
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Feb 18 11:33:51 GMT 2020
On February 18, 2020 11:06 am, Michael Biebl wrote:
> Am 18.02.2020 um 01:21 schrieb Peter B:
>> Package: systemd
>> Version: 244-3
>> Severity: normal
>>
>>
>>
>> -- Package-specific info:
>>
>> ZFS filesystems can be mounted through fstab, the zpool needs to be
>> imported before the mount. Currently systemd does not enforce
>> imports before mounts.
>>
>> I demonstrably worked around this using this option in fstab:
>> 'x-systemd.requires=zfs-import-scan.service'
>>
>> I believe more generically all zfs filesystems in fstab should 'want' to
>> be 'after' the following services:
>> zfs-import-scan.service
>> zfs-import-cache.service
>>
>> The three ways I know to have Debian import zpools:
>> - systemd: zfs-import-scan.service
>> - systemd: zfs-import-cache.service
>> - zfs kernel module parameter: zfs_autoimport_disable=0
>
> zfs-import-scan.service and zfs-import-cache.service appear to be
> implementation details of zfs-linux.
> I don't think we should pull something like this into systemd,
> especially since no-one in the systemd team has ZFS knowledge (at least
> I don't have any idea if what you propose makes sense or not from a ZFS
> pov).
>
> Finally, this would have to be added upstream first and not be
> maintained as downstream patch.
> For that you'd need to file a bug report at
> https://github.com/systemd/systemd/issues and convince upstream that
> what you propose is the right thing to do.
ZFS on Linux also ships an (opt-in) mount generator in recent versions,
which should avoid the need to have any fstab entries at all for ZFS
mount points when used together with zfs-zed.
https://manpages.debian.org/buster-backports/zfsutils-linux/zfs-mount-generator.8.en.html
More information about the Pkg-zfsonlinux-devel
mailing list