I'm moving webspace content to NFSv3 shares. Because of suexec restrictions I have different paths to different subsets of the content on the client. I wonder if I can still have all of the content in one path on one exported nfs share.


i need




exported share "/export" could have


AFAICS there are three options:

  • mounting /export twice on different paths on the nfs client
  • mounting /export once and doing a bind mount
  • put foo and bar in different directories and exporting/mounting them separately

Which of these options would you recommend?


Personally, I'd just NFS mount twice in two different locations. You don't need to export/mount separately, as you can mount subdirectories of an NFS export directly.


I would probably put the content in a tree under /exports (/exports/web for example) and then mount that tree in both places on the client. This keeps things neat and allows you to add new projects at a later date without having to reorganise.


I would suggest the bind mount for two reasons:

  • I know of people who have run into a scaling problem when mounting hundreds of users' home directories. This would not have happened with bind mounts, because then at the NFS layer it would still only be a single mount.
  • NFS does have cases where the semantics can be a little problematic, if files are accessed through multiple mounts simultaneously.

But as long as it is only two mounts, and none of the directories are accessible through more than one of the mounts, then I'd say choose the option you find easiest to work with.

  • FWIW, the "semantics can be a little problematic" is only an issue if writing is involved. – Scott Leadley Apr 28 '14 at 14:27

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.