≡ Menu

bind

Q. How do I mount NFS filesystem twice in two different dirs on same Linux client?

NFS Server : nfsserver:/data

Mount to dirs /home/data and /backup

A. You will not able to do that. However mount command has bind option to remount part of the file hierarchy somewhere else.

Procedure

First mount to /home/data
# mount -t nfs4 nfsserver:/data /home/data
Now bind /home/data to /backup
# mount --bind /home/data /backup
# ls /backup /home/data

Read man page of mount command for more information:
$ man mount