On an FC4 client, I'm mounting an smbfs filesystem over the network. In /etc/fstab, I have
//server/share /mount/point smbfs credentials=/home/user/.smbcreds,noauto,user 0 0
The user's .bash_profile contains the actual mount command, which goes off without a hitch. Consequently, the user can issue
$ umount /mount/point
when necessary.
It's all well and good, until the user connects to the FC4 client twice, and runs two xterms which both source .bash_profile.
Now the mount command has been issued twice, so here's what happens:
$ umount /mount/point umount: it seems /mount/point is mounted multiple times
Well, yes, it has been mounted multiple times; but how can the user unmount it now?
On Wed, November 30, 2005 12:55 pm, Jack Tanner said:
On an FC4 client, I'm mounting an smbfs filesystem over the network. In /etc/fstab, I have
//server/share /mount/point smbfs credentials=/home/user/.smbcreds,noauto,user 0 0
The user's .bash_profile contains the actual mount command, which goes off without a hitch. Consequently, the user can issue
$ umount /mount/point
when necessary.
It's all well and good, until the user connects to the FC4 client twice, and runs two xterms which both source .bash_profile.
Now the mount command has been issued twice, so here's what happens:
Should script such that the share isn't mounted unless it isn't already mounted.
$ umount /mount/point umount: it seems /mount/point is mounted multiple times
Well, yes, it has been mounted multiple times; but how can the user unmount it now?
One should be able to use ps to find the PID of the mounts and kill them directly i believe.
ps ax | grep mount
then kill -9 the corresponding PID's
Hope this helps.
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Trevor TeC Christian wrote:
On Wed, November 30, 2005 12:55 pm, Jack Tanner said:
On an FC4 client, I'm mounting an smbfs filesystem over the network. In /etc/fstab, I have
//server/share /mount/point smbfs credentials=/home/user/.smbcreds,noauto,user 0 0
The user's .bash_profile contains the actual mount command, which goes off without a hitch. Consequently, the user can issue
$ umount /mount/point
when necessary.
It's all well and good, until the user connects to the FC4 client twice, and runs two xterms which both source .bash_profile.
Now the mount command has been issued twice, so here's what happens:
Should script such that the share isn't mounted unless it isn't already mounted.
something like -
#!/bin/bash MOUNT='/bin/mount' MOUNTPOINT='/mount/point' if [ "`$MOUNT | grep "$MOUNTPOINT"`" = "" ] then mount /mount/point fi
Trevor TeC" Christian " <trevor <at> bouyon.dalive.com> writes:
One should be able to use ps to find the PID of the mounts and kill them directly i believe.
ps ax | grep mount
then kill -9 the corresponding PID's
Nice idea, but here's what happens in practice. When I kill'ed the mount processes, they died off... but mount output still shows the mounts as hanging around, and umount still shows the "multiple times" message! What makes it even worse is that although mount thinks the mounts are active, the processes have been killed, and doing an ls inside those mount points results in long waits and timeouts.
Jack Tanner wrote:
Trevor TeC" Christian " <trevor <at> bouyon.dalive.com> writes:
One should be able to use ps to find the PID of the mounts and kill them directly i believe.
ps ax | grep mount
then kill -9 the corresponding PID's
Nice idea, but here's what happens in practice. When I kill'ed the mount processes, they died off... but mount output still shows the mounts as hanging around, and umount still shows the "multiple times" message! What makes it even worse is that although mount thinks the mounts are active, the processes have been killed, and doing an ls inside those mount points results in long waits and timeouts.
OK... tried and seen...
as root#: umount -f <the mount point>; umount <the mount point>;
This worked for me when i tried it...
On Wed, 2005-11-30 at 13:26 -0400, Trevor TeC Christian wrote:
On Wed, November 30, 2005 12:55 pm, Jack Tanner said:
On an FC4 client, I'm mounting an smbfs filesystem over the network. In /etc/fstab, I have
//server/share /mount/point smbfs credentials=/home/user/.smbcreds,noauto,user 0 0
The user's .bash_profile contains the actual mount command, which goes off without a hitch. Consequently, the user can issue
$ umount /mount/point
when necessary.
It's all well and good, until the user connects to the FC4 client twice, and runs two xterms which both source .bash_profile.
Now the mount command has been issued twice, so here's what happens:
Should script such that the share isn't mounted unless it isn't already mounted.
$ umount /mount/point umount: it seems /mount/point is mounted multiple times
Well, yes, it has been mounted multiple times; but how can the user unmount it now?
One should be able to use ps to find the PID of the mounts and kill them directly i believe.
ps ax | grep mount
then kill -9 the corresponding PID's
Mount does not leave an active process running. Thus this would have no affect. Did you test your idea?
Hope this helps.
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
-- *Trevor "TeC" Christian* Cell #: (767) 225 4472 IM MSN: trevorc98@hotmail.com / trevor@bouyon.dalive.com YM : trevorc01 AIM: DoubleOTeC GoogleTalk: doubleOTeC@gmail.com
Home Page http://trevor.bouyon.dalive.com// Curriculum Vitae http://bouyon.dalive.com/cv/ Dalive Market http://www.dalivemarket.com/
Jeff Vian wrote:
On Wed, 2005-11-30 at 13:26 -0400, Trevor TeC Christian wrote:
On Wed, November 30, 2005 12:55 pm, Jack Tanner said:
On an FC4 client, I'm mounting an smbfs filesystem over the network. In /etc/fstab, I have
//server/share /mount/point smbfs credentials=/home/user/.smbcreds,noauto,user 0 0
The user's .bash_profile contains the actual mount command, which goes off without a hitch. Consequently, the user can issue
$ umount /mount/point
when necessary.
It's all well and good, until the user connects to the FC4 client twice, and runs two xterms which both source .bash_profile.
Now the mount command has been issued twice, so here's what happens:
Should script such that the share isn't mounted unless it isn't already mounted.
$ umount /mount/point umount: it seems /mount/point is mounted multiple times
Well, yes, it has been mounted multiple times; but how can the user unmount it now?
One should be able to use ps to find the PID of the mounts and kill them directly i believe.
ps ax | grep mount
then kill -9 the corresponding PID's
Mount does not leave an active process running. Thus this would have no affect. Did you test your idea?
Yea... I've done it in the past mostly when accidentally mounting a samba share that was already mounted. I killed the mounts and it worked.
Tried it today on my current machine and had no effect. I posted the solution that worked for me.
Hope this helps.
-- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
-- *Trevor "TeC" Christian* Cell #: (767) 225 4472 IM MSN: trevorc98@hotmail.com / trevor@bouyon.dalive.com YM : trevorc01 AIM: DoubleOTeC GoogleTalk: doubleOTeC@gmail.com
Home Page http://trevor.bouyon.dalive.com// Curriculum Vitae http://bouyon.dalive.com/cv/ Dalive Market http://www.dalivemarket.com/