How to configure a NFS mounting in fstab?

I have a NFS share folder on a FreeNas system. I'm able to mount this share and use it with this command:

mount -t nfs -o proto=tcp,port=2049 192.168.0.216:/mnt/HDD1
/media/freenas/

I just don't know how to do that in /etc/fstab so it does it automatically. How can I do that?

1

2 Answers

A typical /etc/fstab entry for a NFS mount looks like as follows:

192.168.0.216:/mnt/HDD1 /media/freenas/ nfs defaults 0 0 

The options you supply looks pretty much default, but you can add those as well:

192.168.0.216:/mnt/HDD1 /media/freenas/ nfs defaults,proto=tcp,port=2049 0 0 
0

Edit /etc/fstab and append to the end:

192.168.0.216:/mnt/HDD1 /media/freenas/ nfs rw,bg,soft,intr,nosuid 0 0
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like