How to create file system tree from different NFS mounts?

Solution Unverified - Updated -

Environment

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • NFSv3

Issue

We have an application which requires a file system hierarchy which consists of different NFS mounts. Unfortunately this hierarchy cannot be created with symlinks as the security validation of the application doesn't allow this.

The following example will show the simplyfied setup:

  • Requested client view: /foo/bar
  • Server 1 exports /foo
  • Server 2 exports /bar

Resolution

You can setup an automount point for /foo and one for /foo/bar. Whenever
/foo/bar is accessed, /bar from server2 will be mounted after mounting /foo
from server1. Any race conditions during boot will be automatically
eliminated (/foo/bar may get mounted quicker than /foo).

This works with both NFSv3 and NFSv4.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments