I created an LXC container and stored files there. How do I share this containers storage with another lxc container?

elogat

New Member
Nov 29, 2020
2
0
1
39
Of course I could create a network share, but that would create unnecessary network traffic.
 
Easiest way I found was using a directory on the host and adding that directory as mount point to all containers that need access to those files.
Other options are using network file sharing such as NFS or CIFS but you have to setup a server or file sharing service.

PS: I just gave you some options and only told you what worked best for me. Maybe other people have better ideas for your specific situation. Do what you think is best for you...
 
Last edited:
Easiest way I found was using a directory on the host and adding that directory as mount point to all containers that need access to those files.
Other options are using network file sharing such as NFS or CIFS but you have to setup a server or file sharing service.
so I have a ZFS volume that is ~9 TB. I created a container on that volume that hosts docker. then that docker. all the files are stored in the lxc docker container that i share out to my docker images. are you saying that I should transfer them out and retransfer them back to the host (proxmox) itself? How do I create a folder on that ZFS volume? Just through the CLI?

retransferring everything would be a pain and then dealing with 3 levels of permissions (host, lxc, docker). is there no simple way that won't saturate network with unnecessary traffic?
 

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!