Handling NFS stale file handle error in containers

crash

Active Member
Jun 24, 2017
8
0
41
49
I jumped into the discussion on this thread, but did not want to step on any toes, so decided to start my own topic.

Current set up is:

PVE host directly passes disks to VM (ubuntu-server)
--> VM runs NFS server and exports directories
--> PVE host NFS client mounts those exports
--> PVE host bind-mounts some of the NFS directories into (unprivileged) containers.

This works well until the file-server VM needs to reboot. Sometimes everything goes smoothly. Most of the time, the PVE host can reaquire the NFS exports (they are accessible on the host), but all of the containers get "stale file handle" errors.

Most of the solutions I have found online discussing the issue of NFS server rebooting, and NFS clients getting "stale" errors are to unmount and remount the NFS share on the client. In this case, the PVE host is the client, and this solution can work there.

But what do I do about the containers? Is there a command I can run on the PVE host to "refresh" container mounts? Is there a command inside the container that will do that? Or do I need to just reboot all the containers?
 
To follow up, is there a way to trigger a container restart when the NAS VM restarts?
 

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!