[SOLVED] NFS storage shows offline but I can mount it manually

Ovidiu

Renowned Member
Apr 27, 2014
324
12
83
I added a NFS share that my server provider offers as backup space, via the proxmox GUI, and it worked. A few days later it shows in proxmox as offline, with error 500.

If I access this proxmox server via ssh and execute:
Code:
mount -t nfs ftpback-rbxX-XXX.ovh.net:/export/ftpbackup/nsXXXXXX.ip-188-XXX-XXX.eu /mnt/nfs-backup-storage
it instantly mounts perfectly and I can read/write

Any ideas how to debug this issue?
 
Well, since its a new setup, I have since reinstalled PX completely to make sure I didn't screw up anything.

I just checked the logs you mentioned and:

syslog only keeps saying:
Code:
Oct  1 11:38:32 jarvis pvestatd[2925]: storage 'local-nfs' is not online
Oct  1 11:38:42 jarvis kernel: [ 1822.171806] FS-Cache: Netfs 'nfs' registered for caching

same for journalctl - at least I can't see anything I would immediately relate to NFS

I've also opened a ticket with the server provider but I'm pretty sure they will tell me to check if I can access the NFs mount via cli and if I can they'll say its PX's problem :-/
 
it feels like I have read all threads here on nfs and tried all those solutions to change from nfs 3 to nfs4 and try via udp but nothing works via PX GUI.

I tried using the nfs server IP instead of the server name and I tried changing my name servers with no change.
 
For the time being, I have mounted this NFS share via /etc/fstab like this:

Code:
# mount backup storage via NFS
ftpback-rbx7-XXX.ovh.net:/export/ftpbackup/ns312791.ip-188-XXX-XXX.eu /mnt/nfs-backup-storage nfs soft,retry=5,timeo=60

but I'd like to solve this mystery. I'm open for any pointers.
 
I talked to the support from my hoster and he pointed me in the right direction.
He showed me this old post from 2013 which talks about the short timeout of 2 seconds which PX checks the NFS connection for: https://forum.proxmox.com/threads/nfs-shares-storage-is-not-online-500.11121/#post-69878

So I dug into: /usr/share/perl5/PVE/Storage/NFSPlugin.pm and changed the timeout from 2s to 10s and then 60s with not result.
Then I went and manually executed the check which that scripts does and got an error:

Code:
/sbin/showmount --no-headers --exports ns312791.ip-188-165-225.eu
clnt_create: RPC: Program not registered

So I then commented out the complete check_connection function and now PX shows a different error in the syslog:

Code:
Oct 05 10:11:58 jarvis pvestatd[8184]: mount error: mount.nfs: requested NFS version or transport protocol is not supported
 
while the check_connection function was commented I tried again adding this storage via PX GUI and am getting:
Code:
I just tried manually adding this NFS storage again via Proxmox GUI and am getting:

create storage failed: error with cfs lock 'file-storage_cfg': mount error: mount.nfs: requested NFS version or transport protocol is not supported (500)

I found another thread here on the forum which said to check my mounts so I did:

Code:
 cat /proc/mounts  | grep nfs
ftpback-rbx7-670.ovh.net:/export/ftpbackup/ns312791.ip-188-XXX-225.eu /mnt/nfs-backup-storage nfs4 rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,soft,proto=tcp,timeo=60,retrans=2,sec=sys,clientaddr=188.165.225.88,local_lock=none,addr=147.135.138.37 0 0

ftpback-rbx7-670.ovh.net:/export/ftpbackup/ns312791.ip-188-XXX-225.eu /mnt/pve/local-nfs nfs rw,relatime,vers=3,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=147.135.138.37,mountvers=3,mountport=45381,mountproto=udp,local_lock=none,addr=147.135.138.37 0 0

The first mount is what I manually did via

Code:
mount -t nfs ftpback-rbx7-670.ovh.net:/export/ftpbackup/ns312791.ip-188-XXX-225.eu /mnt/nfs-backup-storage

The second is the result of this snippet inside /etc/pve/storage.cfg

Code:
nfs: local-nfs
        export /export/ftpbackup/ftpback-rbx7-670.ovh.net
        path /mnt/pve/local-nfs
        server ns312791.ip-188-XXX-225.eu
        content backup
        maxfiles 10
        options vers=3

and it turns out both mounts are fine and working on the command line:
Code:
root@jarvis:~/scripts# ls -al /mnt/nfs-backup-storage/
total 61
drwxr-xr-x 3 systemd-timesync users  5 Oct  3 13:32 .
drwxr-xr-x 4 root             root   4 Oct  5 10:10 ..
-r-------- 1 systemd-timesync users  0 Oct  5 10:30 .banner
drwxr-xr-x 2 systemd-timesync users  8 Oct  3 14:30 dump
-rw------- 1 systemd-timesync users 14 Oct  5 10:36 .ftpquota
root@jarvis:~/scripts#

root@jarvis:~/scripts# ls -al /mnt/pve/local-nfs/
total 61
drwxr-xr-x 3 systemd-timesync users  5 Oct  3 13:32 .
drwxr-xr-x 3 root             root   3 Oct  5 10:10 ..
-r-------- 1 systemd-timesync users  0 Oct  5 10:30 .banner
drwxr-xr-x 2 systemd-timesync users  8 Oct  3 14:30 dump
-rw------- 1 systemd-timesync users 14 Oct  5 10:36 .ftpquota

And yet PX shows an error in the GUI:
upload_2018-10-5_10-47-4.png
upload_2018-10-5_10-47-54.png
 
Problem solved and it had nothing to do with Proxmox. The problem was between me and the host.

Basically, they provide me with a value pair of name and server and I'm supposed to figure out that the name is not the export name but the server name and the server is not the nfs server but my export name :)
 
  • Like
Reactions: Chiaki

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!