Skip to content

Commit

Permalink
nfsd.service: Retry exports
Browse files Browse the repository at this point in the history
Our fileservers sometimes don't export to all clients after reboot.
This can be fixed by manually executing `exportfs -r`.

This might be caused by DNS lookup timeouts when the local
unbound server has no cache yet and thus has to pull DNSKEY
records from remove servers.

Try to mitigate the problem by doing additional `exportfs -r` commands
10,30 and 60 seconds after the nfsd.service unit was started.
  • Loading branch information
donald committed Jul 6, 2020
1 parent ae75fce commit 44f4cc6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions misc_systemd_units/nfsd.service
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ ExecStartPre=/bin/mkdir -p /var/lib/nfs/v4recovery
ExecStartPre=/usr/sbin/exportfs -ra
ExecStart=/usr/sbin/rpc.mountd --foreground --manage-gids
ExecStartPost=/usr/sbin/rpc.nfsd --lease-time 90 --grace-time 90 --no-nfs-version 3 64 ; /usr/sbin/sm-notify
ExecStartPost=bash -c "(sleep 10;exportfs -r;sleep 20;exportfs -r;sleep 30;exportfs -r)&"
ExecReload=/usr/sbin/exportfs -ra
ExecStopPost=/usr/sbin/rpc.nfsd 0 ; /usr/sbin/exportfs -ua
Restart=always
Expand Down

0 comments on commit 44f4cc6

Please sign in to comment.