openVZ挂载的主机文件夹

我正在尝试在我的新服务器上设置openVZ,但是我遇到了安装我无法理解的文件夹的问题。

它显示了VZ和主机上的不同文件,尽pipe挂载点是相同的。

安装openvz ID 1的login脚本

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

在主机上创build文件夹:

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

进入VZ并检查文件夹

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

离开VZ,回到主机

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

VZ的文件在哪里? 我在这里错过了什么? 从主机挂载显示其所有相同的文件夹

 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 

你应该使用-t simfs除了--bind

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

我可以为这个问题提供更方便的方法: http : //www.stableit.ru/2013/11/how-to-mount-multiple-disks-to-openvz.html