Red Hat Bugzilla – Bug 488343
ext4: EXT4-fs error (device sdc1): ext4_add_entry: bad entry in directory #12: rec_len % 4 != 0
Last modified: 2010-02-01 18:12:44 EST
Description of problem:
I cant copy file hierarchy from ext3 to ext4
Version-Release number of selected component (if applicable):
Fedora 10 x86_64
Steps to Reproduce:
1. mke2fs -j -L HDTV1500H -m 0 -T largefile4 -t ext4 -v /dev/sdc1
2. mount /HDTV1500H
3. mkdir /HDTV1500H/films
4. cp -avi /HDTV500/films/* /HDTV1500H/films/
`/HDTV500/films/11 друзей Оушена.Oceans Eleven.2001.HDTV.MPEG2.1920x1080.RUS.mkv' -> `/HDTV1500H/films/11 друзей Оушена.Oceans Eleven.2001.HDTV.MPEG2.1920x1080.RUS.mkv'
`/HDTV500/films/13-й воин.13th Warriror.1999.HDTV.MPEG2.1920x1080.rus_eng.mkv' -> `/HDTV1500H/films/13-й воин.13th Warriror.1999.HDTV.MPEG2.1920x1080.rus_eng.mkv'
`/HDTV500/films/Американский психопат.American Psycho.2000.BluRay-rip.1080p.MPG2.Rus.Eng.ts' -> `/HDTV1500H/films/Американский психопат.American Psycho.2000.BluRay-rip.1080p.MPG2.Rus.Eng.ts'
`/HDTV500/films/Аполлон 13.Apollo 13.1995.HDTV.x264.1280x720.rus_eng.mkv' -> `/HDTV1500H/films/Аполлон 13.Apollo 13.1995.HDTV.x264.1280x720.rus_eng.mkv'
`/HDTV500/films/Армагеддон.Armageddon.1998.HDTV.1280x720.XviD.avi' -> `/HDTV1500H/films/Армагеддон.Armageddon.1998.HDTV.1280x720.XviD.avi'
`/HDTV500/films/Большое путешествие.The Wild.2006.мультфильм.HDTV.x264.1920x1040.RUS.mkv' -> `/HDTV1500H/films/Большое путешествие.The Wild.2006.мультфильм.HDTV.x264.1920x1040.RUS.mkv'
`/HDTV500/films/Большой Лебовски.The Big Lebowski.1998.HDDVD.Remux.1920x1080.VC-1.Goblin.Eng.mkv' -> `/HDTV1500H/films/Большой Лебовски.The Big Lebowski.1998.HDDVD.Remux.1920x1080.VC-1.Goblin.Eng.mkv'
cp: cannot create regular file `/HDTV1500H/films/Большой Лебовски.The Big Lebowski.1998.HDDVD.Remux.1920x1080.VC-1.Goblin.Eng.mkv': Input/output error
syslog: EXT4-fs error (device sdc1): ext4_add_entry: bad entry in directory #12: rec_len % 4 != 0 - offset=0, inode=2027203910, rec_len=36069, name_len=145
copies of all from /HDTV500/films to /HDTV1500H/films
fsck.ext4 -v -C 0 /dev/sdc1
e2fsck 1.41.4 (27-Jan-2009)
Superblock has an invalid journal (inode 8).
*** ext3 journal has been deleted - filesystem is now ext2 only ***
Resize inode not valid. Recreate<y>? yes
HDTV1500H contains a file system with errors, check forced.
fsck.ext4: Illegal doubly indirect block found while reading bad blocks inode
This doesn't bode well, but we'll try to go on...
Pass 1: Checking inodes, blocks, and sizes
Bad block inode has illegal block(s). Clear<y>? yes
Illegal block #0 (666912423) in bad block inode. CLEARED.
Would you be willing to provide an "e2image -r" image of the source filesystem, either as an attachment or in private? That way I can probably reproduce and narrow down the problem.
If so, a dumpe2fs -h of the target filesystem after you've mkfs'd it would help too.
Ok, I got the e2image; unfortunately so far I cannot reproduce it. however, my target filesystem is a bit smaller, I'll try again with one of the proper size and same geometry.
I've had no luck reproducing this. Did you see it more than once?
My best guess at this point is perhaps some memory corruption...
ext4_add_entry: bad entry in directory
#12: rec_len % 4 != 0 - offset=0, inode=2027203910, rec_len=36069, name_len=145
looks like a real mess; your inode nr should probably not be that high, the record length cannot(?) be that long, and I don't think any of your names are that long either...
No, i tried only once :(
Needed to return one of old disk in the same day.
I'll try copy files from 500GB to other 500GB disk this week.
If you do hit it, you might try it again on a -debug kernel variant, if it is memory corruption it might get caught sooner, or with more info.
No, I cant reproduce it. I tried 2 times without any problem
in the same configuration (files from 500GB disk to 1500GB disk with active
ktorrents/aMule), only kernel upgraded to 18.104.22.168-170.2.35.fc10.x86_64.
I was able to reproduce this on Fedora 12 Kernel 22.214.171.124-166.fc12.i686.PAE . I added a 256 MB DDR SDRAM module to my system and on rebooting, got the above error twice. Removing the RAM module resulted in normal booting.
The RAM module was a defective one hence the issue was due to corrupt memory.