[NTLUG:Discuss] disk space mystery

Kevin Brannen kbrannen at gte.net
Mon Aug 16 00:49:46 CDT 1999


Richard Cobbe wrote:
> 
> Kevin Brannen wrote on 8-14-1999:
> 
> > I have rebooted several times, no change.  I fsck'ed using an alternate
> > superblock and cleaned up a few "group" errors, but no change in space.
> > I'm now of the opinion that I've got a circular list of blocks
> > (A->B->C->...Z->A) in there somehow that should be on my "free" list.
> > Short of reformating the partition, I'm not sure how to fix it.  Oh
> > well, SuSE 6.2 should be here in a week or two I'm told, that'll be a
> > good excuse and opportunity to fix it (via reformatting).
> 
> If you have such a cycle, fsck should have found it.
> 
> (Incidentally, I don't believe that the e2fs actually allows a circular
> list of blocks, as is possible (I think) with the MSDOS FAT.  It is still
> possible to create a cycle and thus shoot yourself in the foot, though; it
> involves creating a hard link to a directory that's a direct ancestor of
> the current one.)
> 

After spending several hours going thru e2fsck code, I think I would
agree with that.  At the time, it seemed like the best guess.  Or maybe
a "lost" dir, with all it's inodes & blockd still attached/intact.  I
now don't believe that either.

I added a print to e2fsck to show me the inode number of each regular
file, saved that to file 1.  Then I got all the inodes via "ls -i",
saved that to file 2.  Cross-reference the 2 files, printing all inodes
in file 1 not in file 2, save that to file 3.  The jumping into debugfs
(in RO mode :-) I did an "ncheck" on random inodes from file 3.  Here's
an example of what I found, with an ls command in the middle:

debugfs:  ncheck 130
Inode   Pathname
130     /usr/X11R6/lib/X11/susewm/bin/files

tigger:/tmp # ll -i  /usr/X11R6/lib/X11/susewm/bin/files
 246834 -rw-r--r--   1 root     root          408 Mar  4  1997
/usr/X11R6/lib/X11/susewm/bin/files

debugfs:  ncheck 246834
Inode   Pathname
246834  <inode not found>

Now as I understand it, with "ls -i", that first number is the inode
number.  If so, this file system is really screwed up, and yet, when I
look in these files, the contents seem correct.  I must not understand
everything correctly!  Or at least I hope that's the explanation. :-) 
But whatever the explanation is, I still have 770M missing.

Anyway, I'm about to send a summary of this to Theo Ts'o & Remy Card,
the ext2 FS people; I'll see of they have any insights.

Kevin




More information about the Discuss mailing list