Re: NFS server flakiness
Reply #4 –
If, after starting the server (sudo s6-rc -u change nfs-server) i run:
~$ sudo rpc.nfsd
rpc.nfsd: knfsd is currently down
rpc.nfsd: Writing version string to kernel: -2 +3
rpc.nfsd: Created AF_INET TCP socket.
rpc.nfsd: Created AF_INET6 TCP socket.
~$
everything then works fine. As i said, nfsd is now mounted on /proc/fs/nfsd and 8 nfsd processes are running.
If i just bring the nfs-server service down and back up again, nfsd is not mounted and there are no nfsd processes running.
~$ cat /etc/s6/sv/nfs-server-srv/run
#!/bin/execlineb -P
foreground { modprobe sunrpc }
foreground { modprobe nfs }
foreground { modprobe nfsd }
foreground { mountpoint -q /var/lib/nfs/rpc_pipefs }
redirfd -w 1 /dev/null
foreground { exportfs -ra }
foreground { rpc.nfsd -- = 4 }
fdmove -c 2 1
exec rpc.mountd --foreground
~$
When i start nfs-server, rpc.mountd is running, when i stop it, it's not. But it doesn't appear that the above is running rpc.nfsd.
I assume the above runs things (like rpc.nfsd) as root. I don't know what the "=4" is about on that line.