mounted multiple times

Jack Tanner ihok at
Thu Dec 1 23:17:46 UTC 2005

David G. Miller (aka DaveAtFraud <dave <at>> writes:
> Question, does umount still unmount "one instance" of the mount?  This 
> is the behavior under Red Hat Enterprise 3 (2.4 kernel) which also 
> doesn't complain.  The application I QA hasn't managed to get confused 
> enough under RHEL4 (we start supporting RHEL4 under our next release) to 
> mount one of our mount points multiple times so I don't have a data 
> point for RHEL4 (2.6 kernel).

Under FC4 (kernel 2.6.14-1.1644), umount removes no mounts at all if there are
multiple mounts of the same mount point.
> Under RHEL3, I just keep issuing umounts for the mount point until I get 
> rid of all of them.  Would this work for your situation?  Any idea when 
> this "feature" got added to mount/umount?

The only thing that worked for removing one of the duplicate mount points was
umount -f (as root).

I wrapped a code snippet posted earlier in this thread into a function that I
then placed in my .bashrc.

mount_if_not_mounted() {
        if [ "`$MOUNT | grep "$MOUNTPOINT"`" = "" ] ; then
                $MOUNT $1

That works wonderfully when invoked from .bash_profile as

mount_if_not_mounted /mount/point

More information about the fedora-list mailing list