From owner-freebsd-questions@FreeBSD.ORG Tue Mar 13 10:02:34 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4ACE31065678 for ; Tue, 13 Mar 2012 10:02:34 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 031B88FC1D for ; Tue, 13 Mar 2012 10:02:33 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S7OYq-0002PH-6U for freebsd-questions@freebsd.org; Tue, 13 Mar 2012 11:02:32 +0100 Received: from np-19-75.prenet.pl ([np-19-75.prenet.pl]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Mar 2012 11:02:32 +0100 Received: from jb.1234abcd by np-19-75.prenet.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 13 Mar 2012 11:02:32 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: jb Date: Tue, 13 Mar 2012 10:02:16 +0000 (UTC) Lines: 42 Message-ID: References: <201203130825.q2D8Pa6Y053252@mail.r-bonomi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 79.139.19.75 (Mozilla/5.0 (X11; FreeBSD i386; rv:9.0.1) Gecko/20100101 Firefox/9.0.1) Subject: Re: lost+found dir placement X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Mar 2012 10:02:34 -0000 Robert Bonomi mail.r-bonomi.com> writes: > ... > The fsck_ffs manpage says that 'lost+found' is _created_ *when*needed*, > in the root of a filesystem, if not already present. > > The presense of /mnt/lost+found is _not_ an error. just a surperfluous > file that ended up there 'somehow'. > ... This worried me. And still does ... > *IF* you're going to file a PR, it should be for the filesystem > initialization process -- which "should" (a) create the lost+found > directory, (b) create some 'reasonable' number of files in that directory, > and (c) then delete all those files. This ensures that the directory > exists and has disk-space allocated for a 'reasonable' number of > 'recovered' file entries. > That's perhaps why under Linux they have special mklost+found entry ? > The existing fsck_ffs has a catastrophic failure mode if there is no > space on the disk for the lost+found directory to grow to acomodate > the recovered file entries. > I was surprised to find empty lost+found dir in /mnt. drwx------ 2 root wheel 512 May 5 2011 lost+found That's why I jumped a bit. Few days ago, after clean reboot to single user mode, I tested fsck manually on SUJ fs and found things that seemed to be questionable (I posted it on current@ list, if you want to take a look). So, it must have happened during that time, because as I said I did not have any forced fsck run at boot times, and I almost swear I did not have this lost+found dir in /mnt before. I will take a look at source code of fsck* entries and perhaps find a clue. jb