Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

example:

i need

/home/content/foo

and

/var/www/content/bar

exported share "/export" could have

/export/foo
/export/bar

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?

share|improve this question

3 Answers 3

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.

share|improve this answer

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.

share|improve this answer

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.

share|improve this answer
    
FWIW, the "semantics can be a little problematic" is only an issue if writing is involved. –  Scott Leadley Apr 28 at 14:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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