NFS4

Steph007

Member
Mar 2, 2016
9
0
21
47
Hi There,

Is there any reason why Proxmox 4.1 doesn't give you the option to create an NFS4 mount? Not stable or will it be implemented in future releases?

Anyway , the only info I could find were a guy asking the same question in 2012 running Proxmox 2.1.1. Apparently he got around the issue by manually editing this file. /usr/share/pve-manager/ext4/pvemanagerlib.js
and altering this value: values.options = 'vers=3';

I tried the above solution and I'm able to mount but I'm getting permission issues when I try and write to the drive. Everything works fine when I use NFS3... or what ever the default mode is.

I'm using Centos 7 for my NFS server.
#content of /etc/exports
/home 10.50.0.0/24(rw,sync,fsid=0)

Thanks in advance,
-steph
 
you can set NFS options in your NFS storage definition on /etc/pve/storage.cfg

e.g. for NFSv4

# options vers=4
 
I'm seeing the following error when I change to version 4.

Mar 2 12:25:05 pve2 pvedaemon[9509]: create failed - mount error: mount.nfs: mounting 10.50.0.2:/home failed, reason given by server: No such file or directory

Here's my config file:
nfs: nas1
server 10.50.0.2
export /home
path /mnt/pve/nas1
maxfiles 2
content iso,rootdir,vztmpl,images,backup
options vers=4

I also tried changing the export path to "/" since NFS4 doesn't require an absolute path as far as I know... talking under correction though :) But I'm getting the following message then.

file /etc/pve/storage.cfg line 7 (section 'nas1') - unable to parse value of 'export': invalid format - value does not look like a valid absolute path.
file /etc/pve/storage.cfg line 11 (skip section 'nas1'): missing value for required option 'export'

Thanks in advance,
-steph
 
Yup , I actually just dropped the whole firewall and also disabled selinux on the Centos 7 NFS server.
 
The actual NFS server seems fine , I've managed to mount the same folder manually from another Centos host without any issues.

mount -t nfs4 10.50.0.2:/ /mnt/nfs/
df |grep 10.50
10.50.0.2:/ 1338517504 295501824 1043015680 23% /mnt/nfs

-steph