From owner-freebsd-stable@FreeBSD.ORG Fri Mar 2 16:02:23 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0752F16A400; Fri, 2 Mar 2007 16:02:23 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id CBE5013C4A8; Fri, 2 Mar 2007 16:02:22 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l22G2M43032797; Fri, 2 Mar 2007 10:02:22 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <45E84A8E.6040705@freebsd.org> Date: Fri, 02 Mar 2007 10:02:22 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: Steven Hartland 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> In-Reply-To: <010001c75ce3$6983ded0$b3db87d4@multiplay.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2701/Fri Mar 2 08:16:16 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=AWL,BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-hackers@freebsd.org, Mike Meyer , freebsd-stable@freebsd.org Subject: Re: Mount on non-empty directories (Was: sysinstall creates corruptfilesystems after repartitioning) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2007 16:02:23 -0000 On 03/02/07 09:56, Steven Hartland wrote: > Mike Meyer wrote: >> In <008101c75cd1$42a4df10$b3db87d4@multiplay.co.uk>, Steven Hartland >> This is just a special case of mounting on a non-empty directory. It >> should work right. The last mounted file system is the one you get >> (unless you're using a file system that's designed to behave another >> way). If you unmount the directory, the last mounted device is >> unmounted. > > This makes sence but is not what happens hence the confusion. If > the last mounted FS is the one you get that makes sence but in > this case thats not what I observed. Are you sure? In your last email, you described the above interaction exactly (you had an NFS mounted /usr, then you made a new empty /usr, and it mounted it on top, then you couldn't execute things in /usr anymore (vim was your example), then you unmounted the last mounted fs (the empty one), and your vim was accessible again.. ? >> 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. 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. > > I'm going to investigate this more in an effort to determine why I > got these results and report back. Thanks for everyone's feedback > so far most appreciated. Ok, at this point, you need to send df, mount, and your ls output between each step. Eric