2

We have a file server (fsrv1) that has a 3 mounted XFS filesystems /srv/xfs{1,2,3} each with 3 top-level directories: /home, /scratch and /project. What is the preferred approach to mounting this on a NFS client where a single directory on the client, such as /scratch, contains the relevant 3 directories provided by the NFS server (/srv/xfs{1,2,3}/scratch)?

For example:

  1. Single mount approach:

Mock client /etc/fstab:

fsrv1:/srv/xfs1 /srv/xfs1
fsrv1:/srv/xfs2 /srv/xfs2
fsrv1:/srv/xfs3 /srv/xfs3

Then use client-side symlinks such as

ln -s /srv/xfs1/scratch /scratch/xfs1
ln -s /srv/xfs2/scratch /scratch/xfs2
ln -s /srv/xfs3/scratch /scratch/xfs3

Or is it better to more directly mount the individual sub-directories:

  1. Multiple mount points:

Mock client /etc/fstab:

fsrv1:/srv/xfs1/scratch /scratch/xfs1
fsrv1:/srv/xfs2/scratch /scratch/xfs2 
fsrv1:/srv/xfs3/scratch /scratch/xfs3

Apart from managing more symlinks versus more mount points, are there any more technical or performance-related pros/cons to either approach?

Thanks,

Vince

3

Better to mount the individual sub-directories. When using soft links, an extra "lookup" is required every time a file in that structure is referenced. So, there is some performance impact.

Plus... there's simply no need for the extra layer. It's just adding more administrative work for you to keep track of it all.

| improve this answer | |
  • We reached same conclusion. Also, in case admin needs access to the root file system it can always be mounted in /srv I assume. – Vince Aug 29 at 20:42

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.