4

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?

Jenny D
  • 27,358
  • 21
  • 74
  • 110
matthias
  • 69
  • 1
  • 2

3 Answers3

4

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.

Sobrique
  • 3,697
  • 2
  • 14
  • 34
0

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.

user9517
  • 114,104
  • 20
  • 206
  • 289
0

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.

kasperd
  • 29,894
  • 16
  • 72
  • 122