James Sparenberg wrote on Tue, Oct 01, 2002 at 12:00:29AM -0700 :
> 
>   Cd /mnt/cdrom/some_directory as a user.... su to root do some work.
> eject the cdrom put in a new one..... Quite often the new one is
> unreadable.  ie

Understandable.  The problem is that the eject should fail with an
unable to unmount, IMHO.  If you want to see what I mean, open a
terminal right now, su to root, and then type 'umount /home':

[root@trip todd]# umount /home
umount: /home: device is busy

That's what supermount should report since the regular user you su'd
from is still in that directory.

> directory Mandrake not found.

Yes, everything in memory at this point is fubar'd because the media got
removed out from under it.

> Obvious question is since I only did an ls why or rather how did it know
> about a directory mandrake.  Now i exit the su ... it immediately drops
> back to by user.  IN a directory on the previously removed CD.(even
> though that tree no longer exists.)  In fact sometimes if I do an ls it
> has even given me the files in the directory of the removed CD.  (Not
> always repeatable....)  

A similar scenario is if I do:
[todd@trip todd]$ mkdir test1
[todd@trip todd]$ cd test1
[todd@trip test1]$ mkdir test2
[todd@trip test1]$ cd test2
[todd@trip test2]$ pwd
/home/todd/test1/test2
[todd@trip test2]$ su
Password: 
[root@trip test2]# cd ../..
[root@trip todd]# rm -rf test1
[root@trip todd]# exit
exit
[todd@trip test2]$ pwd
/home/todd/test1/test2
[todd@trip test2]$ ls
[todd@trip test2]$ cd ..
cd: could not get current directory: getcwd: cannot access parent
directories: No such file or directory
cd: could not get current directory: getcwd: cannot access parent
directories: No such file or directory
[todd@trip .]$ pwd
pwd: could not get current directory: getcwd: cannot access parent
directories: No such file or directory
[todd@trip .]$ cd ..
chdir: could not get current directory: getcwd: cannot access parent
directories: No such file or directory
[todd@trip ..]$ cd ..
[todd@trip ..]$ ls
bin/   dev/  home/    lib/  opt/   root/  tmp/  var/
boot/  etc/  initrd/  mnt/  proc/  sbin/  usr/
[todd@trip ..]$ ls
bin/   dev/  home/    lib/  opt/   root/  tmp/  var/
boot/  etc/  initrd/  mnt/  proc/  sbin/  usr/
[todd@trip ..]$ pwd
../..
[todd@trip ..]$ cd /
[todd@trip /]$ ls

So removing the media out from under the user is similar to removing
directories out from under the user (but not identical).  It's pretty
much fatal.  Luckily in the above example, I could always just "cd /"
and it took care of the issues that bash was having.  But it's not that
simple with supermount.

Keep in mind that I know very little about supermount.  Saying that I'm
studying it is a lot like saying I'm studying the Theory of Relativity
to make enhancements.  It sounds really impressive, but it doesn't mean
that it will ever happen (by my hand at least :)  Rather, I'm looking at
the code, trying to understand what it does.  Someone like Juan knows
that code much better and is able to read into the errors.

Blue skies...                   Todd
-- 
  Todd Lyons -- MandrakeSoft, Inc.   http://www.mandrakesoft.com/
UNIX was not designed to stop you from doing stupid things, because 
  that would also stop you from doing clever things. -- Doug Gwyn
   Cooker Version mandrake-release-9.0-0.3mdk Kernel 2.4.19-16mdk

Attachment: msg77824/pgp00000.pgp
Description: PGP signature

Reply via email to