Date: Sun, 29 Apr 2018 19:49:58 +0100 From: Mark Raynsford <list+org.freebsd.net@io7m.com> To: freebsd-net@freebsd.org Subject: Starting and stopping nfsd apparently results in permanently disabling it Message-ID: <20180429194958.53c7aa7d@almond.int.arc7.info>
next in thread | raw e-mail | index | archive | help
--Sig_/U0jXK9VDhPZf.cfMGsqUQSc Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable 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=3D280827606, ino=3D66203, mode=3D010= 0600, nlink=3D1, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1525025391.17 1870000, mtime=3D1525025391.171870000, ctime=3D1525025391.171870000, birtht= ime=3D1525025391.171870000, size=3D0, blksize=3D131072, blocks=3D1, fla gs=3D0x800 } 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=3D280827606, ino=3D66204, mode=3D010= 0600, nlink=3D1, uid=3D0, gid=3D0, rdev=3D4294967295, atime=3D1525025391.17 1956000, mtime=3D1525025391.171956000, ctime=3D1525025391.171956000, birtht= ime=3D1525025391.171956000, size=3D0, blksize=3D131072, blocks=3D1, fla gs=3D0x800 } 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? --=20 Mark Raynsford | http://www.io7m.com --Sig_/U0jXK9VDhPZf.cfMGsqUQSc Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQS4Thd0dhbGF0xo1eVcGntxKBLMBQUCWuYT1gAKCRBcGntxKBLM BXV8AQC+f+UfuzEZIRU3mcBIPZyWhBRhV9l/xLA9MWPyJqKYYwD7BOyZK1UtcWOb 0RWLGAD6WZpzxd2LTS4WXGfivuibIAQ= =tFq8 -----END PGP SIGNATURE----- --Sig_/U0jXK9VDhPZf.cfMGsqUQSc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180429194958.53c7aa7d>