OpenVZ Forum


Home » General » Support » Why umount script runs on VE start?
Re: Why umount script runs on VE start? [message #37799 is a reply to message #37796] Thu, 22 October 2009 15:38 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

cray wrote on Thu, 22 October 2009 19:23

host:/etc/vz/conf# mount -l | grep test
/test on /home/vz/root/101/mnt type none (rw,bind)
---------------------------------------
host:/etc/vz/conf# umount /home/vz/root/101/mnt
umount: /test: not mounted
umount: /home/vz/root/101/mnt: not found
umount: /test: not mounted
umount: /home/vz/root/101/mnt: not found[/code]


As you can see, there is a discrepancy here -- "mount -l" output shows that test is mounted, while "umount" is not able to unmount it.

This discrepancy is caused by the fact that mount/umount has a build-in functionality to add/remove mount records to the /etc/mtab file, and "mount -l" just lists those records. This add/remove behavior can be disabled using -n option, check mount/umount man pages for details. So if you mount without using -n and then umount with -n you will get this.

To see if something is mounted for real, one need to look into /proc/mounts file.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *SOLVED* OpenVZ mount script works incorrectly
Next Topic: routing tables with openvz container
Goto Forum:
  


Current Time: Sun Oct 05 00:54:48 GMT 2025

Total time taken to generate the page: 0.14905 seconds