Start sm-notify/statd atfer nfsd
The README of nfs-utils explains that we must not notify clients before nfsd is running, otherwise they may fail to reclaim their locks. OTOH it's allowed but not required to start "rpc.statd --no-notify" before nfsd. So for simplicity we do both after starting nfsd.
This commit is contained in:
parent
2d57847f16
commit
163ed5264b
@ -86,7 +86,8 @@ in
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
requires = [ "rpcbind.service" "mountd.service" ];
|
||||
after = [ "rpcbind.service" "mountd.service" "statd.service" ];
|
||||
after = [ "rpcbind.service" "mountd.service" "idmapd.service" ];
|
||||
before = [ "statd.service" ];
|
||||
|
||||
path = [ pkgs.nfsUtils ];
|
||||
|
||||
@ -98,8 +99,6 @@ in
|
||||
rpc.nfsd \
|
||||
${if cfg.hostName != null then "-H ${cfg.hostName}" else ""} \
|
||||
${builtins.toString cfg.nproc}
|
||||
|
||||
sm-notify -d
|
||||
'';
|
||||
|
||||
postStop = "rpc.nfsd 0";
|
||||
@ -133,13 +132,13 @@ in
|
||||
''
|
||||
}
|
||||
|
||||
exportfs -ra
|
||||
exportfs -rav
|
||||
'';
|
||||
|
||||
restartTriggers = [ exports ];
|
||||
|
||||
serviceConfig.Type = "forking";
|
||||
serviceConfig.ExecStart = "@${pkgs.nfsUtils}/sbin/rpc.mountd rpc.mountd -f /etc/exports";
|
||||
serviceConfig.ExecStart = "@${pkgs.nfsUtils}/sbin/rpc.mountd rpc.mountd";
|
||||
serviceConfig.Restart = "always";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user