Re: Mount on non-empty directories (Was: sysinstall creates corruptfilesystems after repartitioning)

[ Available lists | Index of freebsd-stable | Month of Mar 2007 | Week of 2 Mar 2007 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Mike Meyer <mwm@mired.org>
Date
2 Mar 2007 16:39:40
Subject
Re: Mount on non-empty directories (Was: sysinstall creates corruptfilesystems after repartitioning)
Message-ID
17896.19812.84680.339102@bhuda.mired.org


[ Hide this part ]
In <010001c75ce3$6983ded0$b3db87d4@multiplay.co.uk>, Steven Hartland <killing@multiplay.co.uk> typed:
> Mike Meyer wrote:
> > In <008101c75cd1$42a4df10$b3db87d4@multiplay.co.uk>, Steven Hartland
> > As a general rule, deciding that something is "useless and dangerous"
> > and removing it isn't the Unix way of doing things. Just because you
> > can't see a use for something doesn't mean that no one else
> > will. That's true even if you wrote the code. Someone doing something
> > with your program you never thought of is a sign that you developed a
> > generally useful tool. As for dangerous, Unix users - especially root,
> > and mount is restricted to root by default - are assumed to know what
> > they're doing.
> Appreciated but the issue I'm trying to understand is that the result
> didn't make any sence i.e. ls returned the files but trying to run
> them didnt work.

You can make that happen:

# cd /usr
# mount /dev/<blank> /usr
# vim
vim: not found
# ls /usr/bin
ls: /usr/bin: No such file or directory
# ls bin This will show the contents of /usr/bin before
the mount, because it looks in "./bin", and
"." is on the original /usr, not the new one.
# bin/vim will find bin/vim
# pwd This is both true and not true. The current
/usr/bin directory is /usr/bin, but you won't get there
if you cd to /usr/bin.


> Result my head started to spin a bit :P As mentioned
> this seemed to easily resolved by force unmounting the second device
> but as has been explained this has a clear use for which I was unaware
> but I'd still like to understand by I saw what I did i.e. ls
> displayed the files yet running vim didnt.

Well, without knowing exactly what you did, we can't say how you got
those results. But I suspect something like the above.

<mike
--
Mike Meyer <mwm@mired.org> http://www.mired.org/consulting.html
Independent Network/Unix/Perforce consultant, email for more information.


Elapsed time: 0.182 seconds