Thank you sgosnell. I ran the commands (exportfs and the nfs-kernel-server restart as root from the NAS.
Back into my computer, I removed the "//" in front of the NAS IP address and ran:
Code:
$ sudo mount -av
/ : ignored
/media/Data : already mounted
mount.nfs: timeout set for Sat Nov 7 04:39:36 2020
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.1.105,clientaddr=192.168.1.235'
/media/NAS : successfully mounted
/media/tmpdisk : already mounted
...and it works! was the problem with fstab the "//" in front of the NAS mount line?
Okay, so here is my updated fstab:
Code:
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda2 during installation
UUID=9cb44c29-b632-4035-ab0c-26bab80761c3 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
#
# Data drive mount to /media/Data
UUID=9d3f1ff1-99b4-418c-8dca-84916431f9d5 /media/Data ext4 auto,exec,rw,noatime 0 2
#
# NAS server mount to /media/NAS. Script added to System Settings>Autostart to mount NAS if online.
192.168.1.105:/nas /media/NAS nfs defaults,nofail,exec 0 0
#
# This line mounts a RAM disk for temp files storage to prevent unnecessary SSD writes.
tmpfs /media/tmpdisk tmpfs nodev,nosuid,noexec,nodiratime,size=1024M 0 0
So I rebooted my computer to see if fstab would automatically mount the NAS and it did!
So now, the mount script fstab-mount-nas. I unmounted the NAS then run the script. No joy! NAS is not mounted. Here is the file for review:
Code:
!/bin/bash
#fstab_Mount NAS
# script to mount NAS if it's powered on
if [ ping -c1 -w3 192.168.1.105 >/dev/null 2>&1 ]
then
mount 192.168.1.105:/nas /media/NAS
echo "NAS is mounted to /media/NAS"
else
echo "NAS is not mounted"
fi
2 down and 1 to go.