OpenVZ Forum


Home » General » Support » mount --bind Bug in OpenVZ?
mount --bind Bug in OpenVZ? [message #35793] Wed, 22 April 2009 21:20 Go to previous message
divB is currently offline  divB
Messages: 79
Registered: April 2009
Member
Hi,

The following scenario without OpenVZ:

# mount /dev/sda1 /home
# mount --bind /home /dest1
# mount --bind /home /dest2
...


Now the content from /home is mapped to dest1 and dest2. Now I want to unmount these mapping but never ever the original mount to /home:

# umount /dest1
# umound /dest2
...
# ls /home
(there are files)


Well this is how should bind-mounts work. Now OpenVZ comes into play. In $VEID.mount, I have the following command:

mount --bind /home /var/lib/vz/root/${VEID}/home


When the VE starts everything is fine. In the $VEID.unmount-Skript I have the following command:

umount /home /var/lib/vz/root/${VEID}/home


But now suddenly /home has been unmounted too on the host!! But this should never ever happen!

# ls /home
. ..


When I just ignore unmounting the bind-mounts it seems to work without problems but it seems to be not elegant to me.

I just don't understand it. Without the mount-Scripts everything works fine. But inside the mount/umount script, the original mount (/dev/sda1 to /home on VE0) is unmounted too.

And this is a fiasco: I have mounted /home into multiple VEs stopping one VE which has /home mounted removes /home from all other VEs!

Does anybody know something about this issue?

Regards,
divB

 
Read Message
Read Message
Read Message
Previous Topic: IPsec with rebuilt kernel possible?
Next Topic: Mysql Sockets?
Goto Forum:
  


Current Time: Mon Aug 12 10:28:07 GMT 2024

Total time taken to generate the page: 0.02705 seconds