Share a volume between clusters

itspuia

New Member
Dec 7, 2022
8
0
1
Hi there!
Since I am absolutely new to Proxmox (and also Linux) and am trying out a few things to understand it, I wanted to find a solution for my server setup. I want to run a Docker Container and a Plex Container on the same volume. This way I can use Docker to add/download media to the same volume that Plex operates on.

I am a little overwhelmed by all the Drive Types and the Wiki, so I am not sure which one to choose for this use case and how to set it up.

So I just need a 3 TB Volume on my 4 TB HDD where Plex and Docker (and maybe other Containers) share the files.

Thanks a lot in advance!
 
If you only use containers, you can use bind mounts [1] for this. You mount your volume on the host (e.g. to /mnt/media) and then you setup a bind mount for both containers.
How did you setup Docker? Does the Docker daemon run directly on the PVE host? Or in a container/VM?

[1] https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points
 
If you only use containers, you can use bind mounts [1] for this. You mount your volume on the host (e.g. to /mnt/media) and then you setup a bind mount for both containers.
How did you setup Docker? Does the Docker daemon run directly on the PVE host? Or in a container/VM?

[1] https://pve.proxmox.com/wiki/Linux_Container#_bind_mount_points
Thank you very much for your reply. It worked perfectly!
I have installed Docker in a Ubuntu LXC (https://blog.login.gmbh/docker-portainer-unter-proxmox-7-installieren/).

While I can share my bind mount with any Container, I don't get it to work in Docker/Portainer. Do you happen to know, what else I need to set up in Portainer to access the Mounted drive? It is accessable from the command line of the Docker Container, but I have difficulties of mounting the drives in Containers inside of Docker.
 
Thank you very much for your reply. It worked perfectly!
I have installed Docker in a Ubuntu LXC (https://blog.login.gmbh/docker-portainer-unter-proxmox-7-installieren/).

While I can share my bind mount with any Container, I don't get it to work in Docker/Portainer. Do you happen to know, what else I need to set up in Portainer to access the Mounted drive? It is accessable from the command line of the Docker Container, but I have difficulties of mounting the drives in Containers inside of Docker.

We highly discourage using Docker inside LXC containers, always use VMs for it [1,2] - I'd imagine that the issue that you're having is due to Docker interfering with LXC in some way.

That being said, if you switch to a VM, you cannot pass-through directories - you'd have to use some sort of networked filesystem, e.g. SMB or NFS.

[1] https://forum.proxmox.com/threads/ssl-connection-error-please-offer-suggestions.120247/#post-522799
[2] https://forum.proxmox.com/threads/t...-really-messed-up-my-boxes.119933/post-520845
 
Thank you @l.wagner, that is good to know. I will think about switching to a VM instead.
But can I anyways give my containers permission to write on that drive somehow? I can't use mkdir in the console of any containers with my mounted drive.
Thanks a lot!