Using NFSv4 Referrals
Suppose you want your server to redirect clients that traverse into the NFSv4 directory /foo to the filesystem /bar on the server foo.example.com.
First make sure foo.example.com is NFSv4-exporting /bar, as you normally would.
Then create an exports file that looks like this:
/exports *(rw,no_subtree_check,fsid=0) /exports/foo *(nohide,email@example.com)
This will only work if there is a mountpoint at /exports/foo. If not (for example, if /exports/foo is just empty), you can create a dummy mountpoint using mount --bind:
cd /exports/foo mount --bind . .
(This just bind-mounts /exports/foo on top of itself.)
The server must have version 2.6.19, and the client 2.6.20 with Trond's NFS_ALL patches; the latest CITI nfs-utils patches are also required.