Shorten NFS share paths via symbolic links

Posted on

Problem :

I have a large number of NFS shares on a private server of mine, and they all exists fairly deep in the directory tree, ie:

Share list:

I have to access these shares periodically, and always via command-line, ie:

mount -t nfs /mnt/network/share_a

Is there a way to shorten the paths as far as the NFS client sees them. I’m thinking of making a directory on the server called “shares”, which contains symlinks to the roots of the folders, then sharing the symlinks instead of the folders.


Share List:

Symlink details:
/shares/share_a ==> /data/files/external/share_a
/shares/share_b ==> /data/files/external/share_b
/shares/share_c ==> /data/files/external/share_c

Will this sort of thing work?

Thank you!

Solution :

On the server, use

mount --bind

to “link” in what you want.

Leave a Reply

Your email address will not be published. Required fields are marked *