On Sb, 09 ian 21, 10:39:38, Michael Biebl wrote: > On Thu, 26 Nov 2020 14:15:23 +1100 "Trent W. Buck" <trentb...@gmail.com> > wrote: > > This quick-and-dirty fix seems to work for me: > > > > root@odin:~# systemctl cat nfs-kernel-server > > # /lib/systemd/system/nfs-server.service > > [...] > > > > # /etc/systemd/system/nfs-server.service.d/zfsutils-linux.conf > > # If you configure NFS exports in "zfs set sharenfs", > > # this will remove all your NFS shares! > > # > > # systemctl stop nfs-kernel-server > > # systemctl start nfs-kernel-server > > # > > # This is an attempt at a quick fix. > > [Service] > > ExecStartPost=/sbin/zfs share -a > > > > Thank you for reading and apologies in case the Cc: was inappropriate. At first I thought this is a problem with the PartOf directive, but then I noticed the man page explicitly mentions restart and stop only, but not start.
> Hm, I assume this triggers the mount of ZFS volumes. > While I understand the motivation for the stop+start nfs-server.service > case, what happens during boot? > Does this have the potential to trigger the mount at a time when not > all dependencies are ready? Probably, e.g. in case nfs-server is started before the ZFS pool is ready. Additionally zfsutils-linux is in contrib, so even if it does work reliably it's likely unsuitable to apply such a fix to the nfs-kernel-server package. In my limited testing a WantedBy=nfs-server.service seems to do the trick (somehow I was under the impression this can be used only with targets). Still curious why a stop/start is triggered by needrestart though. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
signature.asc
Description: PGP signature