Problem with "mount --bind"

  • Thread starter Thread starter amicobromo
  • Start date Start date
A

amicobromo

Guest
Good morning,
I'm writing because I have a problem that I can't fix following the istructions I found on this forum.

I installed a CT (debian7.0-x86_64) and I can find the file system:

root@proxmox:/var/lib/vz/private/102# ls
bin
boot
dev
...

I mounted a NAS file system in /tmp/nas, and it works

root@proxmox:/var/lib/vz/private/102# ls /tmp/nas
file1
file2

I tried to mount that directory inside le CT:

root@proxmox:/var/lib/vz/private/102# mount --bind /tmp/nas/ /var/lib/vz/private/102/nas

root@proxmox:/var/lib/vz/private/102# ls var/lib/vz/private/102/nas
file1
file2

When I try to look inside /nas from the OS installed in CT I can find any files inside the folder:

amicobromo@julia:~$ ls /nas
[empty folder]

Where is the error?

Thank you very much!

Francesco
 

Thank you for your reply, but still it doesn't work.

I am a beginner regarding this type of virtualization, but the point is that I can not understand why if from the host ("Proxmox") I can see the mounted contents inside the
folder of the container, when I work from the container OS this folder is empty. :confused::confused:
 
When you start a container, it mounts /var/lib/vz/private/102 to /var/lib/vz/root/102 (and use that at runtime),