I'm trying to learn more about NFS, and I'm experimenting by exporting arbitrary volumes on my M1 Air (running Ventura 13.1) and then mounting them. Often, I write a row to my
/etc/exports
file and then find that nfsd
doesn't do what I expect; I believe it's erroring, though I haven't been able to find any error logs. I've carefully read through man 5 exports
but even so, what works and what doesn't seems totally arbitrary to me.
In all of my experiments, I add a single row to /etc/exports
and then run sudo nfsd restart; sleep 3; showmount -e
. I've pasted a table of my results so far below. Does anyone know why nfsd
is failing to come up, or showmount -e
doesn't show any mounts in the indicated cases below?
| /etc/exports
entry | Result |
| --- | --- |
| /Users -network=127.0.0.1 -mask=255.0.0.0
| Works |
| /Users -network=127.0.0.0 -mask=255.0.0.0
| nfsd
won’t start |
| /Users -network=127.0.0.1/8
| showmount -e
returns nothing |
| /Users -mapall=root -network=127.0.0.1 -mask=255.0.0.0
| Works |
| /Users -mapall=root:root -network=127.0.0.1 -mask=255.0.0.0
| showmount -e
returns nothing |
| /Users/m -network=127.0.0.1 -mask=255.0.0.0
| Works |
| /Users/m/test -network=127.0.0.1 -mask=255.0.0.0
| Works |
| /Users/m/Documents -network=127.0.0.1 -mask=255.0.0.0
| showmount -e
returns nothing |
N.B. In the cases where I've written "showmount -e
returns nothing", the specific output is this:
$ showmount -e
Exports list on localhost:
$
Where I've written "nfsd
won't start", the output is:
$ showmount -e
showmount: Cannot retrieve info from host: localhost: RPC: Program not registered
Removing the line and then running sudo nfsd restart
seems to fix it in these cases.
Asked by maths
(111 rep)
Feb 10, 2023, 11:42 PM
Last activity: Feb 11, 2023, 03:34 AM
Last activity: Feb 11, 2023, 03:34 AM