Why mount command is working different than mentioned in man page in Red Hat Enterprise linux?

Solution Unverified - Updated -

Issue

Below is the snip of man page of mount

 EBUSY    source is already mounted. Or, it cannot be remounted read-only, because it still holds files open for  writing. 
          Or, it cannot be mounted on target because target is still busy (it is the working directory of some task, the 
          mount point of another device, has open files, etc.).  Or, it could not be unmounted because it is busy.

Below are the example of the issue:

1) In terminal One:

/ # mkdir /johan
/ # cd /johan
/johan # ls
/johan #

2) In terminal two:

/ # mount /dev/mapper/vgsoft-lvuc4 /johan   <--According to the man page the mount should fail. It does not 
/ # cd /johan
/johan # ls
lost+found

As per man page, the command mount should also return busy because there is a shell on the mount point which should prevent the mount command to actually mount the file system on that mount point. It is clearly stated above: it is the working directory of some task. In above example it is a shell. A reason why it should be implemented: An application, task or in this example the shell can still write on the underlying file system, even fill up that underlying file system to 100%.

Environment

  • Red Hat Enterprise Linux
  • mount

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.