Recommended Options for Mounting NFS Shares

NASbox

Guru
Joined
May 8, 2012
Messages
650
I have very little experience with NFS shares, so I am looking for guidance as to the best options to use on my mount statement in /etc/fstab .

I have 2 shares defined in freenas, a RO share and a RW share. I have been mounting the shares with "default" options just to get things workking, but now I am hoping to optimize my configuration.

The client system is Ubuntu derivative on a small home network, and my objectives are as follows:

  1. Shares should not prevent the client system from booting/operating if FreeNAS is down
  2. Minimize the chance of data corruption on FreeNAS
  3. Maximizing I/O speed/performance
  4. Graceful/easy recovery from error conditions
After studying the docs, my proposed changes are below - Any suggestions/guidance is much appreciated.


READ ONLY SHARE
Read Only Share /etc/fstab
freenas:/mnt/TANK/library /media/user/library nfs defaults 0 3

Output of mount | grep -i freenas on client system with default options
freenas:/mnt/TANK/share /media/user/library nfs ro,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=x.x.x.x,mountvers=3,mountport=608,mountproto=udp,local_lock=none,addr=x.x.x.x 0 0

Proposed Read Only Share /etc/fstab
freenas:/mnt/TANK/library /media/user/library nfs ro,bg,rsize=131072,wsize=1024,soft,intr,timeo=150,retrans=3 0 0

READ/WRITE SHARE
Read/Write Share /etc/fstab

freenas:/mnt/TANK/SHARE /media/user/SHARE/ nfs noatime,defaults 0 3

Output of mount | grep -i freenas on client system with default options
freenas:/mnt/TANK/SHARE on /media/user/SHARE type nfs (rw,noatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=x.x.x.x,mountvers=3,mountport=608,mountproto=udp,local_lock=none,addr=x.x.x.x)

Proposed Read/Write Share /etc/fstab
freenas:/mnt/TANK/SHARE /media/user/SHARE/ nfs rw,noatime,bg,rsize=131072,wsize=131072,hard,intr,timeo=150,retrans=3 0 0
 
Joined
May 2, 2017
Messages
211
Greetings,

I have the same question. I am troubleshooting an issue with transfers hanging and freezing the client systems, and I am leaning towards an NFS mount option causing grief. I have the same needs as you, and I currently have...

192.168.1.100:/mnt/TANK/DOCS /mnt/Documents nfs rsize=8192,wsize=8192,timeo=14,intr,tcp 0 0

If I copy a large file to this, from numerous machines, this will crash and hang my systems. Never used to, but it is now.

How are your settings working?
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
This is what I have been using -- don't know enough to help you more specifically than this. Hopefully someone can fill in the blanks. Haven't had any lockup problems to the best of my knowledge.

Code:
freenas.pvt:/mnt/TANK/DUMP     /media/xxxxx/DUMP/           nfs   rw,noatime,rsize=131072,wsize=131072,hard,intr,timeo=150,retrans=3    0
 
Joined
May 2, 2017
Messages
211
This is what I have been using -- don't know enough to help you more specifically than this. Hopefully someone can fill in the blanks. Haven't had any lockup problems to the best of my knowledge.

Code:
freenas.pvt:/mnt/TANK/DUMP     /media/xxxxx/DUMP/           nfs   rw,noatime,rsize=131072,wsize=131072,hard,intr,timeo=150,retrans=3    0

Thanks. I’ve been trying it out on a couple shares. Seems to be working here too.
 
Top