Skip to main content

Mount an NFS share.

First, create an NFS Share on your host

With OMV for example.

The location of the files to share. The share will be accessible at /export/.
Clients allowed to mount the file system, e.g. 192.168.178.0/24. Please check the manual page for more details.
192.168.1.0/24

Read/Write

subtree_check,insecure
Please check the manual page for more details.

Installing NFS Client Packages

To mount an NFS share on a Linux system first you’ll need to install the NFS client package. The package name differs between Linux distributions.

Installing NFS client on Ubuntu and Debian:

sudo apt update
sudo apt install nfs-common

Manually Mounting an NFS File Systems

Mounting a remote NFS share is the same as mounting regular file systems.

To mount an NFS file system on a given mount point, use the mount command in the following form:

mount [OPTION...] NFS_SERVER:EXPORTED_DIRECTORY MOUNT_POINT

Use the steps below to manually mount a remote NFS share on your Linux system:

  • First, create a directory to serve as the mount point for the remote NFS share:

    sudo mkdir /mnt/OrbiterVideo

Mount point is a directory on the local machine where the NFS share is to be mounted.

  • Mount the NFS share by running the following command as root or user with sudo privileges:

    sudo mount -t nfs orbiter:/Video /mnt/OrbiterVideo

Where orbiter is the LAN Name of the NFS server, /Video is the directory that the server is exporting and /mnt/OrbiterVideo is the local mount point.
Can be with IP adress

 

sudo mount -t nfs 10.10.0.10:/Video /mnt/OrbiterVideo

Automatically Mounting NFS File Systems with /etc/fstab

nano /etc/fstab

Add line

orbiter:/Video /mnt/OrbiterVideo  nfs      defaults    0       0

Unmounting NFS File Systems

The umount command detaches (unmounts) the mounted file system from the directory tree.

To detach a mounted NFS share, use the umount command followed by either the directory where it has been mounted or remote share:

umount orbiter:/Video
#or
umount /mnt/OrbiterVideo

Permission problems ?

sudo chown -R root:root path/to/Video
sudo chmod -R 755 path/to/Video
Extensive explications from ChatGPT

To address this "Permission denied" error, let’s go through a few key steps to ensure your NFS share is correctly configured for root-level access between your two Debian machines.