Starting and stopping nfsd apparently results in permanently disabling it
Mark Raynsford
list+org.freebsd.net at io7m.com
Sun Apr 29 18:50:21 UTC 2018
Hello.
I've never used NFS, so this has been my first time setting it up. I
ran the following:
/usr/sbin/rpcbind -d -h 10.2.8.8 -s
/usr/sbin/nfsd --debug -n 4 -t -h 10.2.8.8
/usr/sbin/mountd -d -h 10.2.8.8 -l -p 9990 /local/etc/mountd/exports
Note that I'm running the above under process supervision and therefore
require that each server must be kept in the foreground rather than
forking into the background where it can't be supervised. I had to use
the undocumented --debug flag for nfsd to do this, but I don't think
that's related to my problem.
Anyway, I then realized that I actually meant to bind to 10.2.8.9
instead, so I killed all of the above and then ran:
/usr/sbin/rpcbind -d -h 10.2.8.9 -s
/usr/sbin/nfsd --debug -n 4 -t -h 10.2.8.9
/usr/sbin/mountd -d -h 10.2.8.9 -l -p 9990 /local/etc/mountd/exports
Unfortunately, nfsd refused to start:
nfsd[49031]: Can't read stable storage file: Operation not permitted
Running ktrace on the nfsd process lead me to:
84873 nfsd CALL openat(AT_FDCWD,0x403b60,0x2<O_RDWR>)
84873 nfsd NAMI "/var/db/nfs-stablerestart"
84873 nfsd RET openat 3
84873 nfsd CALL fstat(0x3,0x7fffffffe940)
84873 nfsd STRU struct stat {dev=280827606, ino=66203, mode=0100600, nlink=1, uid=0, gid=0, rdev=4294967295, atime=1525025391.17
1870000, mtime=1525025391.171870000, ctime=1525025391.171870000, birthtime=1525025391.171870000, size=0, blksize=131072, blocks=1, fla
gs=0x800 }
84873 nfsd RET fstat 0
84873 nfsd CALL openat(AT_FDCWD,0x403ece,0x2<O_RDWR>)
84873 nfsd NAMI "/var/db/nfs-stablerestart.bak"
84873 nfsd RET openat 4
84873 nfsd CALL fstat(0x4,0x7fffffffe9d0)
84873 nfsd STRU struct stat {dev=280827606, ino=66204, mode=0100600, nlink=1, uid=0, gid=0, rdev=4294967295, atime=1525025391.17
1956000, mtime=1525025391.171956000, ctime=1525025391.171956000, birthtime=1525025391.171956000, size=0, blksize=131072, blocks=1, fla
gs=0x800 }
84873 nfsd RET fstat 0
84873 nfsd CALL nfssvc(NFSSVC_BACKUPSTABLE,0)
84873 nfsd RET nfssvc -1 errno 22 Invalid argument
84873 nfsd CALL nfssvc(NFSSVC_STABLERESTART,0x604590)
84873 nfsd RET nfssvc -1 errno 1 Operation not permitted
Please see the trace files:
http://ataxia.io7m.com/2018/04/29/ktrace.out
http://ataxia.io7m.com/2018/04/29/ktrace.out.txt
The /var/db/nfs-stablerestart and /var/db/nfs-stablerestart.bak files
are empty, root:wheel, and mode 600. Nothing I can do can seem to get
nfsd to come back up. It seems to be permanently disabled somehow and
always gives the same error.
How can I fix this?
--
Mark Raynsford | http://www.io7m.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20180429/29780d30/attachment.sig>
More information about the freebsd-net
mailing list