Use shared (NFS) directory from NAS in several containers/VMs

Aug 15, 2016
27
0
1
44
Hi community

is there a way via the proxmox webgui, to mount a shared NAS directory via NFS _AND_ use it as a shared file transfer/exchange directory for several containers/VMs?

I easily can manage to mount a NFS share (exported from my NAS) via Proxmox GUI and make it accessible to my containers via mountpoints. But it seems, like the share is isolated for each container, so that I cannot use it as exchange directory for files across my containers.

And to be honest, I am not really sure, if this is the right approach, since I have to chose for an explicit Content type, when I create the NFS storage on proxmox. The given choices do not really reflect, what I want to do :-/

My research on this topic and the information I found until now, could not help me so far, so my questions would be:
a) is this scenario possible to configure via proxmox webgui (4.2)
b) and how? :)

Thank you in advance,
Simon
 
mhh, so maybe my question was too specific?

Maybe somebody can help me with a more generic approch?

What is "state of the art" to exchange/share files acrosss two or more containers?

Thank you in advance,
Simon
 
Update:

Ok, it seems like I can reach what I want to chieve, by manually modifying the /etc/pve/lxc/<id>.conf file as described in https://pve.proxmox.com/wiki/LXC_Bind_Mounts

e.g. addind the following line to my containers' .conf files allows me to share data across them: "mp0: /mnt/my_mounted_NAS_on_pve,mp=/mnt/my_mounted_NAS_on_container"

Question 1: I am not sure, if this is really the best way to do it, but it seems to work ;-)

Question 2: Is it possible to configure these things also via Web-Gui? When I try to add a mountpoint via Resources->Add->Mount Point it seems like every container is somehow isolated. I think, this is fine, but wouldn't it be also a nice feature, to allow to configure the "shared-approach" I described above also directly via web GUI? *looking_at_proxmox_team*

Greets,
Simon
 
Update:

Ok, it seems like I can reach what I want to chieve, by manually modifying the /etc/pve/lxc/<id>.conf file as described in https://pve.proxmox.com/wiki/LXC_Bind_Mounts

e.g. addind the following line to my containers' .conf files allows me to share data across them: "mp0: /mnt/my_mounted_NAS_on_pve,mp=/mnt/my_mounted_NAS_on_container"

Question 1: I am not sure, if this is really the best way to do it, but it seems to work ;-)

Question 2: Is it possible to configure these things also via Web-Gui? When I try to add a mountpoint via Resources->Add->Mount Point it seems like every container is somehow isolated. I think, this is fine, but wouldn't it be also a nice feature, to allow to configure the "shared-approach" I described above also directly via web GUI? *looking_at_proxmox_team*

Greets,
Simon

adding bind (and device) mounts is restricted to the CLI/root user for security reasons - otherwise regular users could expose arbitrary host paths to the container.
 

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!