Understanding NFS4 exports and pseudofilesystem
- by Trevor Harrison
I think I understand the way pre-NFS4 exports work, specifically the namespace of the exported point.
(ie. export /mnt/blah on server, use mount server:/mnt/blah /my/mnt/point on client)
However, I'm having a hard time wrapping my head around NFS4 exports.
What I've been able to gather so far is that you export a 'root' by marking it with fsid=0, which you then import on the client side by referring to it as '/'.
(ie. exportfs -o fsid=0 /mnt/blah on server, mount server:/ on client)
However, after that, it gets a little weird. From my playing around, it seems I can't export anything else thats not under /mnt/blah. For example, exportfs /home/user1 fails when trying to mount from the client unless /mnt/blah/home/user1 exists on the server.
If this is the case, what is the difference between exportfs /mnt/blah/subdir1 on server and mount server:/subdir1 on client and just skipping the exportfs and mounting whatever subdir of /mnt/blah you want?
Why would you need to export anything other than the root? Its all in the same namespace anyway.