10-26-2001
9,926,
461
Join Date: Aug 2001
Last Activity: 26 February 2016, 12:31 PM EST
Location: Ashburn, Virginia
Posts: 9,926
Thanks Given: 63
Thanked 461 Times in 270 Posts
Sheesh, where to start?
That ls you did is putting the link count as the first thing on the line. In effect, you sorted on link count.
I've never heard of xfs_repair but it sounds like fsck. The lost+found directory is used by fsck as a place to store inodes that are orphaned. The orphaned files are linked into the lost+found directory with the name being set to the inode number.
With most current filesystems, directories grow but do not shrink. This is exploited by fsck. The lost+found directory has empty slots already allocated. There typically is a script called mklost+found to rebuild it if it is removed.
Since fsck is running and we have located orphaned files, there clearly is file system damage. Under these circumstances, the list of free blocks in the filesystem should not be trusted. That's why lost+found must have space available, fsck cannot safely find a free block at this point in time. One of the last thinks fsck will be is to rebuild the free list. This also simplifies the code required to write fsck.