Sharing host folder with multiple containers

ymyinfinity

New Member
Oct 30, 2024
2
0
1
Hi all,

I have a host folder (Linux raid5) that I am able to successfully share with one container by editing the config, e.g.:

for 100.conf:
mp0 /mnt/nas,mp=/mnt/nas

When logged into the console for the above container, I am able to view contents
When I try to mount the same folder onto additional identical containers, the mount point within those containers is empty.

1. Is this expected behavior?
2. Is there an alternative solution that is recommended within the Proxmox community?

My use case includes a simple samba nas, separate emby server, and a torrent box, all writing/reading/editing the same set of subfolders

thank you all in advance!
 
Hi,
I had the same problem.

Assume the /mnt/nas host folder refers to partition /dev/sda1.

If you want to share the partition /dev/sda1 with various containers/VM you have to launch the following command from the host terminal (in this example container "101"):
Code:
sudo pct set 101 -mp0 /dev/sda1,mp=/mnt/nas

I hope this was helpful.
P.
 
  • Like
Reactions: waltar
Thank you SO much!
I was passing in the mounted folder from host into my container, which worked for the first container but would not for subsequent ones.
Passing in the partition itself worked flawlessly. I was about to resort to sharing a samba folder across the containers and hoping the internal virtual bridge would give me fast speeds, but your rec. was exactly what I was hoping for as a solution!!!!!!!
 

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!