Mount NFS filesystem in two different directories on same system

Mount NFS filesystem in two different directories on same system

To mount an NFS filesystem in two different directories on the same system, you will need to follow these steps:

  1. Install the NFS client utilities. On Ubuntu, you can install the NFS client utilities using the following command:
ref‮ re‬to:lautturi.com
apt-get install nfs-common
  1. Determine the NFS server and export. You will need to know the IP address or hostname of the NFS server, as well as the name of the export on the server that you want to mount. You can use the showmount command on the NFS server to list the available exports:
showmount -e <server>

Replace <server> with the IP address or hostname of the NFS server.

  1. Create the mount points. Create two directories where you want to mount the NFS filesystem. For example:
mkdir /mnt/nfs1
mkdir /mnt/nfs2
  1. Mount the NFS filesystem. Use the mount command to mount the NFS filesystem on both mount points. For example:
mount <server>:<export> /mnt/nfs1
mount <server>:<export> /mnt/nfs2

Replace <server> and <export> with the appropriate values for your NFS server and export.

The NFS filesystem will now be mounted in both /mnt/nfs1 and /mnt/nfs2. You can access the files in the NFS filesystem by navigating to either of these directories.

When you are finished using the NFS filesystem, you can unmount it by running the umount command on each of the mount points:

umount /mnt/nfs1
umount /mnt/nfs2
Created Time:2017-10-30 10:17:50  Author:lautturi