Re: I *need* to know what this is.

Oliver Xymoron (oxymoron@waste.org)
Wed, 20 Jan 1999 16:44:54 -0600 (CST)


On Tue, 19 Jan 1999, Jeremy Hansen wrote:

>
> EXT2-fs error (device 08:01): ext2_find_entry: bad entry in directory
> #284673: rec_len is too small for name_len - offset=1436, inode=284754,
> rec_len=20, name_len=41
>
> We have burned three machines now and all three are getting the same
> error. I need to have an idea what this is. I find it hard to
> believe that we happen to get three bad drives in a row. All hardware
> has been switched out at least three times.

Ext2fs stores directories as a singly linked list with elements something
like this:

[inode][reclen][namelen][name... padding]

Reclen is the length of the entire record including the whole name and
some alignment padding. Inode is the file in question.

To figure out what's corrupted, you might do something like the following:

find / -exec ls -id '{}' ';' | grep 284673

which will find the directory with the corrupted entry. Then you can pull
out debugfs and poke around at the inodes to figure out more. If you need
to get at the file or directory data, it's a fairly simple matter to write
a C or Perl program to grab blocks from a device using llseek and read.

Lots of things could cause something like this to happen, BTW. In order of
likelihood, I'd investigate:

drives
cables
controller/chipset/DMA
memory (Try "gzip -9 < huge1 | gunzip > huge2; md5sum huge1 huge2"
repeatedly)

Figuring out which file is corrupted might be quite revealing though.

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/