NFS Mounting options

E

Eric Renfro

Guest
Hello,

I'm trying to get proxmox to actually mount my NFS shares the way I'd prefer them to with the proper tuning options to better utilize jumbo frames and a little higher resiliency to network issues to the storage, especially for the case of backend replication failover to the backup share.

The options I have in my /etc/fstab in hopes it would use it are:
san1:/tank/vmdisk /mnt/pve/san1 nfs4 defaults,timeo=20,retrans=5,rsize=8192,wsize=8192,intr,vers=4,proto=tcp,_netdev 0 0

But when proxmox itself mounts it, all I get is:
san1:/tank/vmdisk on /mnt/pve/san1 type nfs (rw,vers=3,addr=172.17.6.0)

Is there any way to change this?

Eric
 
I've found the problem. It seems to be /etc/pve/storage.cfg as to where you can set the mount-specific options for each storage volume. When I did this, I noticed:


nfs: san1
path /mnt/pve/san1
server san1
export /tank/vmdisk
options vers=3
content images,iso,vztmpl


I changed this to:
nfs: san1
path /mnt/pve/san1
server san1
export /tank/vmdisk
options timeo=20,retrans=5,rsize=8192,wsize=8192,intr,vers=4,proto=tcp
content images,iso,vztmpl


The problem I noticed was in the sub function for parsing if a mount was active or not:
sub nfs_is_mounted {
my ($server, $export, $mountpoint, $mountdata) = @_;


my $source = "$server:$export";


$mountdata = read_proc_mounts() if !$mountdata;


if ($mountdata =~ m/^$source\s$mountpoint\snfs/m) {
return $mountpoint;
}


return undef;
}


Comparing from data relavant to the mounts as:
nas3:/c/proxmox /mnt/pve/nas3 nfs rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=172.17.6.3,mountvers=3,mountport=3075,mountproto=udp,local_lock=none,addr=172.17.6.3 0 0
nas2:/mnt/vmdisk /mnt/pve/nas2 nfs rw,relatime,vers=3,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=172.17.6.2,mountvers=3,mountport=58327,mountproto=udp,local_lock=none,addr=172.17.6.2 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0
san1:/tank/vmdisk/ /mnt/pve/san1 nfs4 rw,relatime,vers=4,rsize=8192,wsize=8192,namlen=255,hard,proto=tcp,port=0,timeo=20,retrans=5,sec=sys,clientaddr=172.17.5.4,minorversion=0,local_lock=none,addr=172.17.6.0 0 0




You'll notice, all the other mounts, which are mounted automatically by default settings in Proxmox, the $path from this is /c/proxmox, /mnt/vmdisk, and for the NFS4 one specifically, /tank/vmdisk/ <-- Extra ending / for some reason.


Eric
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!