0

i am trying to setup openVZ on my new server, but I am running into a problem with mounting the folders which i cant understand.

It shows different files in the VZ and on the Host, despite the mount points being the same.

mount login scripts for openvz ID 1

cat /etc/vz/conf/1.mount
#!/bin/bash
mount -n --bind /mnt/Archive /vz/private/1/var/export

create file in folder on host:

touch /mnt/Archive/fromHost
ls  /mnt/Archive/
-> fromHost

entering VZ and checking folder

vzctl enter 1
entered into CT 1
ls /var/export
-> [emtpy]
touch /var/export/fromVZ
ls /var/export
-> fromVZ

leave VZ, back to host

ls /mnt/Archive
-> fromHost
[where is the file from the VZ?]

where is the file from the VZ? what am i missing here? mount from host shows its all the same folder

mount 
/dev/mapper/VG_Archive-LV_Archive on /mnt/Archive type ext4 
/dev/mapper/VG_Archive-LV_Archive on /vz/private/1/var/export type ext4 

2 Answers 2

1

You should use -t simfs except --bind:

mount -n -t simfs /mnt/Archive /vz/private/1/var/export
0

I can provide more convenient way for this issue: http://www.stableit.ru/2013/11/how-to-mount-multiple-disks-to-openvz.html

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .