From owner-freebsd-fs@FreeBSD.ORG Fri Feb 21 16:54:14 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB13C6DA; Fri, 21 Feb 2014 16:54:14 +0000 (UTC) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:4a5b:39ff:fe12:452]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9D5F41448; Fri, 21 Feb 2014 16:54:14 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id s1LGsAAi037242; Fri, 21 Feb 2014 08:54:10 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201402211654.s1LGsAAi037242@chez.mckusick.com> To: Ivan Voras Subject: Re: su-journal and lost+found sharing inodes? In-reply-to: Date: Fri, 21 Feb 2014 08:54:10 -0800 From: Kirk McKusick Cc: freebsd-fs@freebsd.org X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Feb 2014 16:54:14 -0000 > To: freebsd-fs@freebsd.org > From: Ivan Voras > Subject: su-journal and lost+found sharing inodes? > Date: Fri, 21 Feb 2014 12:15:03 +0100 > > After a crash which required manual fsck, I've enabled SUJ and rebooted. > Everything seemed fine until I (as a part of normal, unrelated work) > noticed that "lost+found" is not a file. But the details are very curious: > > (ls -ali) > > 3 drwxrwxr-x 2 root operator 512 Jan 17 14:25 .snap/ > 4 -r-------- 1 root wheel 33554432 Feb 21 10:29 .sujournal > 4 -r-------- 1 root wheel 33554432 Feb 21 10:29 lost+found > > Am I seeing what I think I'm seeing? lost+found sharing an inode with > .sujournal, but the hardlink count staying "1" for both files? > > SUJ was enabled after a fsck -y run on the file system. That is wrong. You will need to run fsck -f to force it to do a full fsck on the filesystem to get that cleaned up. Journalling (like all journalling systems) only fixes things that break while it is running. It does not fix up pre-existing conditions. Note that fsck -y does not always make good decision on how to handle things. It is really designed as a last-ditch effort to recover the filesystem. Kirk McKusick