su-journal and lost+found sharing inodes?

Kirk McKusick mckusick at mckusick.com
Fri Feb 21 16:54:14 UTC 2014


> To: freebsd-fs at freebsd.org
> From: Ivan Voras <ivoras at 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.

	Kirk McKusick


More information about the freebsd-fs mailing list