[SOLVED] Best way to access NFS mount from a CT

Dec 17, 2021
37
2
13
59
Hi.

We have a Proxmox VE with ~50 CT's running.

We need to share some files between all the CT's. For that we use a NFS mount that must be mounted by all the CT's.

At the beginning I opted for mounting the NFS mounts in the host and then give them as resources using the -mpX parameter. I assume that this was a better approach, for the host kernel is just one NFS mount. I was happy with that solution.

But now I have added a second VE to the cluster.

I found that when I try to migrate a CT between servers in the cluster fails because the -mp resource.
ERROR: migration aborted (duration 00:00:00): cannot migrate local bind mount point 'mp3'

If I remove the mounts from the container configuration and mount then inside the container with a mount call, the I can migrate the CT's without problem.

I just wonder if there's a way to make the NFS mount shareable between the two VE's.

Also wondering if mounting 50 NFS in 50 containers can have a negative impact in the host VE performance.

I will be grateful for any advise on this.

Cheers
Javi
 
Hey :)

NFS mount doesn't really impact VE host perfs ;)

With "features" in option tab, you can, when privilegied mode ON on the CT, mount directly into the CT your share.

For NFS between your two nodes, just make a dedicated NFS server in another phyisical host, to prevent losing access from downing of 1 host :)
 
  • Like
Reactions: Javier Vilarroig
Sorry for the delay :oops:

Finally I have followed your advice.

I'm mounting the required NFS shares in the CTs to avoid having migration problems. This required to install on each container nfs-common and update fstab accordingly.

In the hosts I have mounted the NFS shares in each of them, to make sure I also have access to shared data in them.

After the change I have not noticed any issue, instability or increase in host load.

So, yes. I can consider this solved.
 
  • Like
Reactions: Pifouney