How to sharing data between containers?

Yashalta

Member
Feb 26, 2018
8
0
6
25
Hi,
I want to use the Samba installed on container for share a folder from another container.
For testing, I created 2 containers "Test555" and "Test777".
In the "Test555" container, I installed Samba, which sharing a folder named "samba_folder".
I need that the samba also make sharing a folder "test777" from the container Test777, how can I implement this?

Test555 has 192.168.1.55/24 gw 192.168.1.1
Test777 has 192.168.1.77/24 gw 192.168.1.1
 
If you want to configure SAMBA use google.

IF your two LXC containers are in the same server you can try folder share ...
Thanks for the answer!
With the installation of samba i have no problems...

In the container named "Test555" , I installed Samba and In the container named "Test777" exist the folder named "777" which I want to sharing by samba from the container named "Test555".
according to your link of instruction
below are my steps
1.In the container named "Test777" I created a folder /mnt/Test777
2. in file /etc/pve/lxc/555.conf I must add line like this
pct set 777 -mp0 /mnt/Test777,mp=/777
it is right?

PS - unfortunately I can't leave the link!
 
You have to share host catalog. Set full path like /lxc/110/mnt/Test777
I can't find right way and I'm confused!

1.In the container with ID "777" I created a folder /mnt/Test777
2. in file /etc/pve/lxc/555.conf I must add line like this

pct set 777 -mp0 /lxc/555/mnt/Test777
after added the line, I reboot the container with ID "555"... (Doesn't work!)
ок, trying differently like this
pct set /lxc/777/mnt/Test777 -mp0 /lxc/555/mnt/Test777
again after added the line, I reboot the container with ID "555"... (and again doesn't work!)
I'm doing something wrong!