Date: Sat, 22 Feb 2014 10:55:01 +0100 From: Ivan Voras <ivoras@freebsd.org> To: Kirk McKusick <mckusick@mckusick.com> Cc: freebsd-fs <freebsd-fs@freebsd.org> Subject: Re: su-journal and lost+found sharing inodes? Message-ID: <CAF-QHFXL4-A7XTO3twMfDj88q0EiOAM9Sboxm7Jh0GpxUpKj1g@mail.gmail.com> In-Reply-To: <201402211654.s1LGsAAi037242@chez.mckusick.com> References: <le7cfm$2gp$1@ger.gmane.org> <201402211654.s1LGsAAi037242@chez.mckusick.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 21 February 2014 17:54, Kirk McKusick <mckusick@mckusick.com> wrote: > > To: freebsd-fs@freebsd.org > > From: Ivan Voras <ivoras@freebsd.org> > > 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. > I didn't want to suggest that journaling would fix anything, I was describing the sequence of operations I did: first fsck -y then turning on journaling - the inode mixup could have happened either in fsck or in tunefs where it re-used an inode which it shouldn't have.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF-QHFXL4-A7XTO3twMfDj88q0EiOAM9Sboxm7Jh0GpxUpKj1g>