On Jo, 26 nov 20, 14:06:15, Trent W. Buck wrote: > Package: zfsutils-linux > Version: 0.8.4-1~bpo10+1 > Severity: minor > > I'm not sure who is 'at fault' here, or where the fix belongs. > > The problem I ran into was this: > > 1. I zfs set sharenfs (not /etc/exports), because > it makes config management a little easier (exports(5) lacks a "drop-in" > dir). > > 2. During an apt update, needrestart asks to restart NFS. > > 3. I tell needrestart "sure, go ahead". > > 4. All my NFS exports are gone! > > I can reproduce the symptoms with stop+start, but not restart: > > root@odin:~# exportfs -s > /srv/old-disks > goll.lan(ro,async,wdelay,root_squash,no_subtree_check,mountpoint,sec=sys,ro,secure,root_squash,no_all_squash) > root@odin:~# systemctl restart nfs-kernel-server > root@odin:~# exportfs -s > /srv/old-disks > goll.lan(ro,async,wdelay,root_squash,no_subtree_check,mountpoint,sec=sys,ro,secure,root_squash,no_all_squash) > root@odin:~# systemctl stop nfs-kernel-server > root@odin:~# systemctl start nfs-kernel-server > root@odin:~# exportfs -s > [UH OH, PROBLEM!] > root@odin:~# zfs share -a > root@odin:~# exportfs -s > /srv/old-disks > goll.lan(ro,async,wdelay,root_squash,no_subtree_check,mountpoint,sec=sys,ro,secure,root_squash,no_all_squash)
I can reproduce this as well. > Can ZFS hook NFS, or vice-versa, so this problem flow stops happening? > This has already bitten me twice! :-( If my understanding of systemd.unit(5) is correct this works as expected when using the PartOf= directive: zfs-share is stopped or restarted together with nfs-service, but not started. Maybe the needrestart Maintainers have a better idea what is going on here? (adding to Cc: and attaching zfs-share.service for their convenience) Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[Unit] Description=ZFS file system shares Documentation=man:zfs(8) After=nfs-server.service nfs-kernel-server.service After=smb.service Before=rpc-statd-notify.service Wants=zfs-mount.service After=zfs-mount.service PartOf=nfs-server.service nfs-kernel-server.service PartOf=smb.service [Service] Type=oneshot RemainAfterExit=yes ExecStartPre=-/bin/rm -f /etc/dfs/sharetab ExecStart=/sbin/zfs share -a [Install] WantedBy=zfs.target
signature.asc
Description: PGP signature