Re: mounted multiple times



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/>

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: mounted multiple times
    ... > The user's .bash_profile contains the actual mount command, which goes off> without a hitch. ... > Well, yes, it has been mounted multiple times; but how can the user> unmount ... The application I QA hasn't managed to get confused enough under RHEL4 to mount one of our mount points multiple times so I don't have a data point for RHEL4. ...
    (Fedora)
  • Re: mounted multiple times
    ... > mount one of our mount points multiple times so I don't have a data ... > point for RHEL4 (2.6 kernel). ... I just keep issuing umounts for the mount point until I get ...
    (Fedora)
  • [BUG]: Crash with CONFIG_FAIR_CGROUP_SCHED=y
    ... If we skip the 'mount' command, there is no crash. ... mounting just the cpu or just the ns subsystem does not ... Kernel 2.6.24-rc1 on an x86_64 ...
    (Linux-Kernel)
  • Re: usb-storage && iRIVER flash player problem
    ... > The device is seen, but there is no way to mount it, nor re-partition ... explain that the mountable vfat partition under linux is the ... > debugging enabled and not as modules, directly into the kernel. ... > nfs warning: ...
    (Linux-Kernel)
  • Re: Getting CDRW to work in Debian
    ... Note that these instructions match a tuned modular kernel such as ... method to install your network and sound drivers. ... Test your configuration using cdrecord -scanbus. ... Create mount points for these devices. ...
    (Debian-User)