Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #208359
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: A Basic Mount Observation |
| Date | 2019-05-07 17:30 +0200 |
| Message-ID | <xVacx-5fa-5@gated-at.bofh.it> (permalink) |
| References | <xV9Jw-4Pt-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Martin McCormick wrote:
> I may just be remembering things the wrong way but it
> seems like that for most of my memory, one could be root and, if
> you cd'd to a mount point, one could mount /dev/whatever on that
> mount point and immediately see the top of the new tree you had
> just mounted. If you cd'd in to that tree and tried to umount,
> you got the error that the file system was busy which makes sense
> because you are trying to saw off the limb you are sitting on, so
> to speak.
>
> If you cd'd out of the mount point and nobody else was in
> it, you could umount and all was well.
>
> I accidentally discovered now that I can become the root
> user, cd to a mount point and mount something with a subsequent
> ls of my current directory yielding nothing new. One doesn't see
> the new mount.
>
> If you open another session and look at the mount point,
> the new mount is there. You can even create a file under the new
> mount which is only visible to you if you didn't cd out of the
> mount point. Everybody else who looks at that point will see
> what's mounted there and not the test file slipped in under the
> mount.
>
> Has this always been the normal behavior of mount or has
> there been a change?
mkdir point
cd point
touch original
ls
original
mount /dev/whatever .
ls
original
cd ..
cd point
ls
whatever-was-in-whatever
cd ..
umount point
cd point
ls
original
This behavior has always been consistent in Linux, as far as I am aware.
The handle to your current directory cannot be changed out from
underneath you; only when you move away from it can it be
released, and from then on you see the new mount.
-dsr-
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
A Basic Mount Observation "Martin McCormick" <martin.m@suddenlink.net> - 2019-05-07 17:00 +0200
Re: A Basic Mount Observation Dan Ritter <dsr@randomstring.org> - 2019-05-07 17:30 +0200
Re: A Basic Mount Observation <tomas@tuxteam.de> - 2019-05-07 17:40 +0200
Re: A Basic Mount Observation Cindy Sue Causey <butterflybytes@gmail.com> - 2019-05-07 18:10 +0200
Re: A Basic Mount Observation Dan Ritter <dsr@randomstring.org> - 2019-05-07 18:30 +0200
Re: A Basic Mount Observation Cindy Sue Causey <butterflybytes@gmail.com> - 2019-05-07 18:10 +0200
Re: A Basic Mount Observation Bob Weber <bobrweber@gmail.com> - 2019-05-07 19:00 +0200
Re: A Basic Mount Observation "Thomas Schmitt" <scdbackup@gmx.net> - 2019-05-07 19:00 +0200
csiph-web