Bug#975873: Acknowledgement (Please hook zfs-share up to nfs-kernel-server stop+start)
Andrei POPESCU
andreimpopescu at gmail.com
Sat Jan 9 11:32:19 GMT 2021
On Sb, 09 ian 21, 10:39:38, Michael Biebl wrote:
> On Thu, 26 Nov 2020 14:15:23 +1100 "Trent W. Buck" <trentbuck at gmail.com> wrote:
> > This quick-and-dirty fix seems to work for me:
> >
> > root at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20210109/2f4d1f19/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list