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.


The purpose of this is to add an abstraction layer that gives you more flexibility; you can move things around on the server without having to reconfigure all the clients to reflect the new paths.

You can export stuff outside /mnt/blah by bind-mounting it inside blah, for instance

mount --bind /home /mnt/blah/home
| improve this answer | |
  • The question is, if /home is bound to /mnt/blah/home, it is still accessible from within the root export (/mnt/blah), so what is the point in adding another export for /mnt/blah/home? – SystemParadox Aug 2 '12 at 11:16
  • Because the server may want to configure different modes and ACLs for various mounts ? – b0fh Aug 2 '12 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.