Mount NFS Share in Ubuntu
Ubuntu OS setup
Table of contents
Source Information
There are many online walkthroughs on how to create a Synology NFS share, get its mount point for use in a Linux client’s fstab, and implement fstab for mounting. One of the better ones I have found is Setting up NFS on a Synology NAS at PiMyLifeUp. The information below is based on multiple sources and describes the implementation on one of my servers.
We will be using Ubuntu Linux
fstabso that our Linux OS VM will mount the Synology NFS share every time the OS boots.
Mount Synology NAS shared NFS drive using mount and fstab
Do
Install nfs-common for NFS client support
sudo apt install nfs-common
Create the mount point and mount
-
Make the mount point:
In this example,
/mnt/naswill be the[MOUNTPATH]in themountcommand, below.mkdir /mnt/nas -
Mount your Synology NAS volume to the mount point:
mount nas.kurtshuler.net:/volume1/data /mnt/nasThis is the syntax:
mount [SYNOLOGY-IPADDRESS]:[SYNOLOGY-REMOTEVOLUME] [MOUNTPATH] -
Verify the mount is correct:
df -HT -
Create a file to test the mount
cd /mnt/nas touch test.txt -
Check your Synology NAS NFS share folder to confirm the file is in it.
Update /etc/fstab
We will add our new mount to the Linux OS’s fstab file so the Synology shared drive will always be mounted at boot time.
-
Open
fstab:nano /etc/fstab -
Append this line:
nas.kurtshuler.net:/volume1/data /mnt/nas nfs defaults 0 0 -
Reboot and check
reboot -
Verify the mount is correct:
df -HT