Failed NFS unmounting on PVE shutdown

PapaGigas

Member
Mar 18, 2023
40
2
8
Hi everyone,

I'm running a TrueNAS VM with an NFS share for PBS, which I've mounted on PVE since PBS is on the same machine. Here’s how I set it up initially:

root@pve:~# mkdir -p /mnt/pbs/truenas
root@pve:~# nano /etc/fstab

ip:/path /mnt/pbs/truenas nfs defaults 0 0

root@pve:~# systemctl daemon-reload
root@pve:~# mount -a

This setup worked, but I encountered issues where it failed on boot, significantly increasing the boot time.

To address this, I modified the fstab entry like this:

ip:/path /mnt/pbs/truenas nfs nofail,defaults 0 0

Now it's working and booting fine. However, I’m seeing this error when shutting down PVE:

[FAILED] Failed unmounting mnt-pbs-truenas.mount - /mnt/pbs/truenas.

Has anyone else experienced this or know how to resolve it? Any help would be greatly appreciated. Thanks in advance! ;)
 
Last edited:
Hey,

this is likely due to PBS keeping the .lock file open. You can check with lsof /<DATSTORE>/.lock. If your installed version is at least 3.1.5-1 putting the datastore into "Offline" maintenance mode should clear this up. After setting it you can check with lsof again.
 
putting the datastore into "Offline" maintenance mode should clear this up.

It worked, but do I need to put it offline every time I want to reboot or shutdown PVE? :confused:

PS - if the datastore's not offline, PVE takes a bit longer because of this:

nfs_unmounting.jpg
 
Last edited:
The thing is you have to tell PBS it is not supposed to use the disk anymore, just pulling the disk out under its feet can lead to problems. In your specific case it is just a file handle for the lock file that is kept, but you'd have the same problem if a backup was running.
 
How can I notify PBS during a reboot or shutdown so it automatically sets the datastore to offline and brings it back online after startup?
 

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!