0

I try to auto mount NFS shares over my local network. I add to /etc/fstab:

192.168.0.24:/mnt/Toshiba/dietpi_userdata /mnt/nas nfs defaults 0 0

I see service on start:

mnt-nfs.mount

but Elementary don't mount that shares after reboot.I have to do it manually:

sudo mount -t nfs 192.168.0.24:/mnt/Toshiba/dietpi_userdata/ /mnt/nas 

I disabled my firewall. I have the same config in second laptop with Ubuntu 19.10 and it works fine. Regards Przemek

0

Did you type sudo mount -a and then sudo mount after you changed in /etc/fstab ?

| improve this answer | |
  • Hi @Sysadmin, I add /etc/fstab etry and then I make: sudo mount /mnt/nas/ and sudo mount 192.168.0.24:/mnt/Toshiba/dietpi_userdata then reboot. I make the same steps in second laptop with Ubuntu and it works. – PrzemekS. May 15 at 9:30
  • can You tell me where I have to add -a ?? – PrzemekS. May 15 at 19:42
  • All you have to do is to make changes in /etc/fstab. You do not have to mount it manually sudo mount -a in terminal is adding everything from /etc/fstab automatically. Mount command should show those resources as mounted. Check this link: unix.stackexchange.com/questions/303846/… – Sysadmin May 16 at 22:03
  • Hi, I mount with sudo mount -a but this still don't work after reboot. Do I have to add sudo mount -a to /etc/fstab? – PrzemekS. May 17 at 10:03
  • No. The entry in /etc/fstab should look exactly the way you mentioned. 192.168.0.24:/mnt/Toshiba/dietpi_userdata /mnt/nas nfs defaults 0 0 Eventually use the hostname instead of IP address. The last option is to do this way like it is described here: linuxtechi.com/automount-nfs-share-in-linux-using-autofs – Sysadmin May 17 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.