The umount command will fail to detach the share when the mounted volume is in use. If the NFS mount have an entry in the fstab file, remove it. To detach a mounted NFS share, use the umount command followed by either the directory where it has been mounted or remote share: umount 10.10.0.10:/backups umount /var/backups The umount command detaches (unmounts) the mounted file system from the directory tree. Next time you reboot the system the NFS share will be mounted automatically. The mount command, will read the content of the /etc/fstab and mount the share. Open the /etc/fstab file with your text editor Set up a mount point for the remote NFS share: sudo mkdir /var/backups Use the following procedure to automatically mount an NFS share on Linux systems: The line must include the hostname or the IP address of the NFS server, the exported directory, and the mount point on the local machine. To automatically mount an NFS share when your Linux system starts up add a line to the /etc/fstab file. The /etc/fstab file contains a list of entries that define where how and what filesystem will be mounted on system startup. Generally, you will want to mount the remote NFS directory automatically when the system boots. Automatically Mounting NFS File Systems with /etc/fstab # When you are manually mounting the share, the NFS share mount does not persist after a reboot. Once the share is mounted, the mount point becomes the root directory of the mounted file system. To verify that the remote NFS volume is successfully mounted use either the mount or df -h To get a list of all mount options type man mount in your terminal. Multiple options can be provided as a comma-separated list. If you want to specify additional mount options Where 10.10.0.10 is the IP address of the NFS server, /backup is the directory that the server is exporting and /var/backups is the local mount point. Privileges: sudo mount -t nfs 10.10.0.10:/backups /var/backups Mount the NFS share by running the following command as root or user with sudo Mount point is a directory on the local machine where the NFS share is to be mounted. ![]() To serve as the mount point for the remote NFS share: sudo mkdir /var/backups ![]() Use the steps below to manually mount a remote NFS share on your Linux system: Mount NFS_SERVER:EXPORTED_DIRECTORY MOUNT_POINT
0 Comments
Leave a Reply. |