OpenVZ Forum


Home » Mailing lists » Users » sharing directory between two VE
sharing directory between two VE [message #47085] Wed, 04 July 2012 14:51 Go to next message
Olivier Kaloudoff is currently offline  Olivier Kaloudoff
Messages: 1
Registered: July 2012
Junior Member
Hi,

For the purpose of a migration, I'd need to share a directory between
two VE, context 1 and 2. I've tried, with no success:

- mounting /tmp/shared.ext2 from the host to both guests using simfs and -o
loop
- mounting --bind /tmp/shared.dir from the host to both guests using mount
--make-shared
- mounting --bind from the 1st VE to the 2nd

Is there another way to try ... ?

Using vserver, I used to change the context of the files, does OpenVz offer
this capability ?

Best Regards,

Olivier
Re: sharing directory between two VE [message #47086 is a reply to message #47085] Wed, 04 July 2012 17:11 Go to previous messageGo to next message
Kirill Korotaev is currently offline  Kirill Korotaev
Messages: 137
Registered: January 2006
Senior Member
Bind mount from ve mount script solves this problem...

Sent from my iPhonespam SPAMSPAM

On 04.07.2012, at 21:05, "Olivier Kaloudoff" <openvz@kalou.net> wrote:

> Hi,
>
> For the purpose of a migration, I'd need to share a directory between
> two VE, context 1 and 2. I've tried, with no success:
>
> - mounting /tmp/shared.ext2 from the host to both guests using simfs and -o
> loop
> - mounting --bind /tmp/shared.dir from the host to both guests using mount
> --make-shared
> - mounting --bind from the 1st VE to the 2nd
>
> Is there another way to try ... ?
>
> Using vserver, I used to change the context of the files, does OpenVz offer
> this capability ?
>
> Best Regards,
>
> Olivier
Re: sharing directory between two VE [message #47087 is a reply to message #47086] Wed, 04 July 2012 20:12 Go to previous messageGo to next message
massimiliano.sciabica is currently offline  massimiliano.sciabica
Messages: 11
Registered: March 2012
Junior Member
Hi, I use fuse to mount remote filesystem over ssh. Works smoothly.

On 04/07/2012 19:11, Kirill Korotaev wrote:
> Bind mount from ve mount script solves this problem...
>
> Sent from my iPhonespam SPAMSPAM
>
> On 04.07.2012, at 21:05, "Olivier Kaloudoff"<openvz@kalou.net> wrote:
>
>
>> Hi,
>>
>> For the purpose of a migration, I'd need to share a directory between
>> two VE, context 1 and 2. I've tried, with no success:
>>
>> - mounting /tmp/shared.ext2 from the host to both guests using simfs and -o
>> loop
>> - mounting --bind /tmp/shared.dir from the host to both guests using mount
>> --make-shared
>> - mounting --bind from the 1st VE to the 2nd
>>
>> Is there another way to try ... ?
>>
>> Using vserver, I used to change the context of the files, does OpenVz offer
>> this capability ?
>>
>> Best Regards,
>>
>> Olivier
Re: sharing directory between two VE [message #47090 is a reply to message #47085] Thu, 05 July 2012 08:18 Go to previous message
jcrey is currently offline  jcrey
Messages: 2
Registered: May 2012
Location: Málaga
Junior Member
In HN:/etc/fstab
/dev/sda1 /shared ext4 defaults 1 3

And in containers mount files
ctid.mount:
[ -d ${VE_ROOT}/mydir ] || mkdir ${VE_ROOT}/mydir
mount -o bind /shared ${VE_ROOT}/mydir

ctid.umount:
umount ${VE_ROOT}/mydir 2> /dev/null || echo -n ""

Greetings
Previous Topic: Ubuntu 12.04 template issue (vzctl enter VEID hangs)
Next Topic: openvz and prelinking
Goto Forum:
  


Current Time: Sat Jun 14 08:53:33 GMT 2025

Total time taken to generate the page: 0.01671 seconds