From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 2 16:12:59 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3BF6016A401 for ; Fri, 2 Mar 2007 16:12:59 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id CE15713C4AA for ; Fri, 2 Mar 2007 16:12:58 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 19757 invoked by uid 1001); 2 Mar 2007 16:14:28 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Fri, 02 Mar 2007 11:14:28 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17896.19812.84680.339102@bhuda.mired.org> Date: Fri, 2 Mar 2007 11:14:28 -0500 To: "Steven Hartland" In-Reply-To: <010001c75ce3$6983ded0$b3db87d4@multiplay.co.uk> References: <00cb01c75c5b$4205e390$b3db87d4@multiplay.co.uk> <45E82660.4030107@freebsd.org> <008101c75cd1$42a4df10$b3db87d4@multiplay.co.uk> <17896.15939.9988.89695@bhuda.mired.org> <010001c75ce3$6983ded0$b3db87d4@multiplay.co.uk> X-Mailer: VM 7.17 under 21.4 (patch 20) "Double Solitaire" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, freebsd-stable@freebsd.org Subject: Re: Mount on non-empty directories (Was: sysinstall creates corruptfilesystems after repartitioning) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2007 16:12:59 -0000 In <010001c75ce3$6983ded0$b3db87d4@multiplay.co.uk>, Steven Hartland 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/ /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. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.