For files that fsck
places in lost+found directory, under what circumstances does fsck
consider a file to be lost, I have the following in my mind:
For regular files:
1) If the inode links count is 0. As described in this answer: "an inode with no corresponding file name."
2) When a file has no entry in any directory even if the inode link count isn't zero possibly to improper shutdown.
This also raises the question about lost directories. What can qualify a directory as being lost so that fsck
places it in lost+found directory. Perhaps the directory's inode links count? Or when the directory doesn't have an entry in any other directory?
..
and.
– direprobs Aug 17 '17 at 09:10