Create shared storage to be used between two containers

densha1609

New Member
Jul 30, 2022
1
0
1
Hi Proxmox,

I am new to Promox and trying to learn the command line interface. I want to create shared storage (10Gb) and share it between two containers
  • CID 100 - /var/lib/plexmediaserver/Library
  • CID 101 - /var/lib/deluged/Downloads
I can create the two containers (unpriviledged)
  • pct create 100 local:vztmpl/debian-11-standard_11.0-1_amd64.tar.gz --rootfs local-lvm:8 --cores 2 --net0 name=eth0,bridge=vmbr0,ip=dhcp --unprivileged 1 --password 12345 --features nesting=1
  • pct create 101 local:vztmpl/debian-11-standard_11.0-1_amd64.tar.gz --rootfs local-lvm:8 --cores 2 --net0 name=eth0,bridge=vmbr0,ip=dhcp --unprivileged 1 --password 12345 --features nesting=1
Start the containers and created the mount points

I tried to the following but I found this created two seperate storage areas.
  • pct set 100 -mp0 local-lvm:10,mp=/var/lib/plexmediaserver/Library
  • pct set 101 -mp0 local-lvm:10,mp=/var/lib/deluged/Downloads
Ive looked at https://pve.proxmox.com/wiki/Linux_Container#Storage_Backed_Mount_Points. But I cannot figure out the correct syntax.

How to I create a shared storage and mount it between two containers at the specific mount points I want.

Thanks
Densha
 
Hi,
I don't think it's possible as you plan.

I offer two alternatives:
1 - Mount the drive at PVE Proxmox level, and then SSH/SCP/SFTP from each container to that mount.
2 - Set up filesharing, for example, Samba CT with the mounted drive and share to unlimited other VMS.
example
https://www.turnkeylinux.org/fileserver

If it is for backup purposes there is a much easier way directly adding disk as a mounted Directory in Proxmox, accessible by all VMs as a backup destination.

Cheers