# [Solved] gentoo-sources-2.6.28-r4 ext4 corruption?

## Jarjar

EDIT April 14th: This was MOST likely NOT a kernel fault nor something software related at all.

After running a BUNCH of disk tests on it (Spinrite level 4 three times turned up nothing), I used "Vivard" from the Ultimate Boot CD and it found an unreadable sector in the beginning of the disk (where you might expect the beginning of the first partition to be). I ran it again, same deal, four times, and finally told it to remap the bad sector, and it's no longer found. Problem solved, except I no longer trust that disk at all  :Sad: 

OK, this is no fun.   :Evil or Very Mad: 

I switched from 2.6.28-gentoo to -r4 yesterday or the day before that. Today I moved around some big files, and started getting IO errors from a simple ls. Uh oh.

I umounted the partition, and ran, BY MISTAKE, fsck -fy /dev/sda1 (should have been -pf...). F*CK, now all my stuff was in lost+found with #nnnnnn names (the fsck log was over 600 lines, see below). Oh well, I only lost a few files, I think, but I have NO idea whether the rest of the files are correct. There were a total of about 10 dirs + files in lost+found, and inside those, everything looked OK (except some missing files).

So, I started blaming that disk, doubly so when I found errors on the root partition (sda3) too (EDIT: OOPS. sda3 IS NOT ext4. It's ext3!)! However, I ran Seagate's disk test, and it came out OK. I then ran fsck -fn on all my ext4 partitions and noticed that there were errors on my /home partition too, on an entirely different disk (different brand, just 2-3 weeks old compared to the semi-ancient 250GB seagate)! I'm now starting to think that ext4 is behind all of this.

Here are some of the fsck log on the first partition (where everything was 'lost'):

 *Quote:*   

> 
> 
> e2fsck -y /dev/sda1
> 
> e2fsck 1.41.3 (12-Oct-2008)
> ...

 

Edit: OK, I'm very, very confused now. I could swear that there were errors on my /home partition, *AND* that I DID NOT repair them (out of fear for the above!), but now that I re-ran fsck all it found was "Superblock last mount time is in the future" which I don't even consider an error (there were at least 50 lines of output last time).

 :Confused:   :Confused: 

----------

## Jarjar

Here's the full fsck log: http://pastebin.com/f63d23d38

No further updates. I lost about 10-15 files, nothing really important (I back everything important up, but heck, I have about 1.5 TB of stuff I'd rather not lose but CAN replace in time). What bums me out is that I have NO freaking clue if I should rush to get the drive replaced, see this as a one-off from a bad kernel, or god knows what.

----------

## tgR10

```
Inode 21 is in use, but has dtime set.  Fix? yes
```

it't looks for me like you tried to use fsck on mounted partition, NEVER do that ...

init S

fsck /dev/XdXX

can't help you, i didn't check my 1tb partition for like 4 months, since that time there was many powerloss, some hardlocks = hard resets, but i alwasy tried to using magic key combination to sync/umount/reboot my computer, i checked it like a weak ago, there was like ~30 errors, which all were fixed ...

didn't loose any file and the partition type is ext3

i got ext4 on my root partiton since december 2008(i think), and nothing happend to me

----------

## Jarjar

 *tgR10 wrote:*   

> 
> 
> ```
> Inode 21 is in use, but has dtime set.  Fix? yes
> ```
> ...

 

No, it wasn't mounted - I definitely unmounted it first, and as you can see there was no warning (which I happened upon twice - needless to say I said NO to those - they freak me out  :Wink: ).

It looks to me (who is obviously not a pro in these matters) that there was some major read errors OR data corruption at the beginning of the partition (or wherever inodes 1~20 are located) - the errors point to them being overwritten by random data to me. Some random flags set here and there, completely insane sizes, root inode is not a directory (WTF?) etc.

----------

## tgR10

do you use 4kb block size ? i read somewhere that ext4 + 4kb block size = data loose during moving/copying files

----------

## Jarjar

 *tgR10 wrote:*   

> do you use 4kb block size ? i read somewhere that ext4 + 4kb block size = data loose during moving/copying files

 

Yup, I do (soon did). As part a precautionary measure and part a (possible) performance improvement I'm switching filesystems across the board, no more ext4.

----------

