Re: mounted multiple times

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jack Tanner wrote:

David G. Miller (aka DaveAtFraud <dave <at> davenjudy.org> 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() {
       MOUNT='/bin/mount'
       MOUNTPOINT='/mount/point'
       if [ "`$MOUNT | grep "$MOUNTPOINT"`" = "" ] ; then
               $MOUNT $1
       fi
}
What is the expected value of $1?

Minor modification

mount_if_not_mounted() {
       MOUNT='/bin/mount'
       MOUNTPOINT=$1
       if [ "`$MOUNT | grep "$MOUNTPOINT"`" = "" ] ; then
               $MOUNT $MOUNTPOINT
       fi
}

mount_if_not_mounted "/mnt/samba/share";

In this case there's a parameter being supplied to the funtion which is used to define the mount point...

That works wonderfully when invoked from .bash_profile as

mount_if_not_mounted /mount/point



--
*Trevor "TeC" Christian*
/TeC Productions Studios/
Cell #: (767) 225 4472
IM
  MSN: trevorc98@xxxxxxxxxxx / trevor@xxxxxxxxxxxxxxxxx
  YM : trevorc01@xxxxxxxxx
  AIM: DoubleOTeC
  GoogleTalk: doubleOTeC@xxxxxxxxx
------------------------------------------------------------------------
Home Page <http://trevor.bouyon.dalive.com/>
Curriculum Vitae <http://bouyon.dalive.com/cv/>
Dalive Market <http://www.dalivemarket.com/>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux