Olivier Kaloudoff | 4 Jul 2012 16:51

sharing directory between two VE

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
Kirill Korotaev | 4 Jul 2012 19:11
Favicon

Re: sharing directory between two VE

Bind mount from ve mount script solves this problem...

Sent from my iPhone

On 04.07.2012, at 21:05, "Olivier Kaloudoff" <openvz@...> 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
> _______________________________________________
> Users mailing list
> Users@...
> https://openvz.org/mailman/listinfo/users
(Continue reading)

Massimiliano | 4 Jul 2012 22:12

Re: sharing directory between two VE

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 iPhone
>
> On 04.07.2012, at 21:05, "Olivier Kaloudoff"<openvz@...>  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
>> _______________________________________________
(Continue reading)

Juan Carlos Rey Anaya | 5 Jul 2012 10:18
Picon
Favicon

Re: sharing directory between two VE

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

Gmane