You are not logged in.

#1 2009-06-19 10:35:07

jack.mitchell
Member
From: Ely, Cambridgeshire, UK
Registered: 2008-08-28
Posts: 156
Website

ext4 corruption

Hi everybody,

I've run into some hiccups with a large ext4 partion. I've tried fsck.ext4 while the partition is unmounted and it says there is multiple errors but it can't fix them, my output is as follows:

[jack@mediaserver ~]$ sudo e2fsck -f /dev/sda1
e2fsck 1.41.6 (30-May-2009)
The filesystem size (according to the superblock) is 244190000 blocks
The physical size of the device is 242653784 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Error reading block 242745344 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes

Force rewrite<y>? no

Error reading block 243269632 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes

Force rewrite<y>? no

Error reading block 243793920 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes

Force rewrite<y>? no

Error reading block 243793932 (Invalid argument) while reading inode and block bitmaps.  Ignore error<y>? yes

Force rewrite<y>? no

Block bitmap differences:  +(242745344--242753567) +(243269632--243277855) +(243793920--243793932) +(243793936--243793948) +(243793952--243800607)
Fix<y>? yes


Terrapin: ***** FILE SYSTEM WAS MODIFIED *****
Terrapin: 17748/61054976 files (45.2% non-contiguous), 175817821/244190000 blocks
Error writing block 243793932 (Invalid argument).  Ignore error<y>? yes

Error writing block 242745344 (Invalid argument).  Ignore error<y>? yes

Error writing block 243269632 (Invalid argument).  Ignore error<y>? yes

Error writing block 243793920 (Invalid argument).  Ignore error<y>? yes

[jack@mediaserver ~]$

It seems as though I first need to start by fixing the partion table but I have no idea how to do this. Any help would be appreciated!

Cheers,
Jack.

Offline

#2 2009-06-19 12:33:40

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: ext4 corruption

Well, ext4 (in _my_ mind) is anything but ready for 'serious' duty (yet). There are just too many problems which can be caused by delayed/cached allocation. I would use ext4 on a partition where the data could be easily recovered (ie. the OS-part itself where you can (more or less) just do a reinstall).

I must admit to not having delved too much into ext4, but is there not a fsck for ext4 itself? I know you can upgrade ext3 to ext4 but not downgrade if the partition was originally formatted as ext4 ...?
Treating an original ext4 as ext2 - maybe the superblock is different?

In my experience, it is almost unheard of that the partition table is overwritten accidentily, especially in this case where it is the very first partition and it would need to be the MBR that is hosed, in which case you should not be able to boot!
In any case, if you run a 'fdisk -l /dev/sda', you will see if the partition table makes sense ...

The extN filesystems do have copies of the superblock spread ~64k blocks apart (eg. 1, 32k, 96k, 158k, etc), but personally, I have never had any luck trying to use the alternative superblocks.

I know this is not much help to you - more reflections upon the use of ext4 ...
Hopefully someone else may be able to shed more light on it.

Offline

#3 2009-06-23 19:39:11

jack.mitchell
Member
From: Ely, Cambridgeshire, UK
Registered: 2008-08-28
Posts: 156
Website

Re: ext4 corruption

My output to fdisk is:

[jack@mediaserver ~]$ sudo fdisk -l /dev/sda

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000a88be

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1      120836   970615138+  83  Linux
/dev/sda2          120837      120963     1020127+  82  Linux swap / Solaris
/dev/sda3          120964      121601     5124735   83  Linux

From what little I know this seems to make sense. I also just reinstalled arch today and before I could mount the partition even though it would give me some headaches, but now I can't even mount it! Some more info that i've managed to gather is as follows:

Filesystem volume name:   Terrapin
Last mounted on:          <not available>
Filesystem UUID:          95123925-aa74-4d4f-b1ae-c02ccd8d4633
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash 
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              61054976
Block count:              244190000
Reserved block count:     12209498
Free blocks:              66167036
Free inodes:              61036819
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      965
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
RAID stride:              32750
Flex block group size:    16
Filesystem created:       Thu May 21 00:44:08 2009
Last mount time:          Tue Jun 23 12:55:30 2009
Last write time:          Tue Jun 23 21:32:23 2009
Mount count:              0
Maximum mount count:      37
Last checked:             Tue Jun 23 21:32:23 2009
Check interval:           15552000 (6 months)
Next check after:         Sun Dec 20 20:32:23 2009
Lifetime writes:          15 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      3def4d0a-64cc-4658-8800-9313e115cece
Journal backup:           inode blocks
Journal size:             128M

I have tried using alternative superblocks and they give me errors to fix about inode checksums, there are ~7000 of these so it would take me a long time to answer yes to all of them and I don't know if it would make it worse or not.

 sudo fsck.ext4 -b 23887872 /dev/sda1
e2fsck 1.41.6 (30-May-2009)
The filesystem size (according to the superblock) is 244190000 blocks
The physical size of the device is 242653784 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no

Group descriptor 0 checksum is invalid.  Fix<y>? yes

Group descriptor 1 checksum is invalid.  Fix<y>? yes

Group descriptor 2 checksum is invalid.  Fix<y>? yes

Group descriptor 3 checksum is invalid.  Fix<y>? yes

Group descriptor 4 checksum is invalid.  Fix<y>? yes

Group descriptor 5 checksum is invalid.  Fix<y>? 

..........

Group descriptor 7449 checksum is invalid.  Fix<y>? cancelled!

Group descriptor 7450 checksum is invalid.  Fix<y>? cancelled!

Group descriptor 7451 checksum is invalid.  Fix<y>? cancelled!

Group descriptor 7452 checksum is invalid.  Fix<y>? cancelled!

[jack@mediaserver ~]$

Any help would be appreciated!

Regards,
Jack.

Offline

#4 2009-06-23 20:11:19

jack.mitchell
Member
From: Ely, Cambridgeshire, UK
Registered: 2008-08-28
Posts: 156
Website

Re: ext4 corruption

Ok, bit of an update, I can mount the partition with the 2009.2 livecd. I'm guessing this means that the new kernel (.30) has become more stringent on what it will allow to mount. Therefore I can still access my data which is good however there must be some way to rebuild/repair the damage?

Offline

#5 2009-06-23 21:05:46

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: ext4 corruption

@jack - My partitions are ext4 and I'm using 2.6.30 just fine.  Try forcing an fsck at boot like this and report back:

# shutdown -rF now

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2009-06-23 21:18:23

jack.mitchell
Member
From: Ely, Cambridgeshire, UK
Registered: 2008-08-28
Posts: 156
Website

Re: ext4 corruption

Hi graysky,

It's not mounting ext4 partitions that is the problem, for my main partition is ext4 and that mounts fine. It seems as though the partition is corrupted somehow and I need to fix that before the new kernel will mount it, however the old kernel is a bit more lienient and will allow me to mount the partition even with the errors. It seems to be this error which is the one I need to fix:

The filesystem size (according to the superblock) is 244190000 blocks
The physical size of the device is 242653784 blocks
Either the superblock or the partition table is likely to be corrupt!

Running shutdown -rF now, did scan my sda3 partiton but not my sda1 partition which is the troublemaker!

Thanks for your help so far!

Last edited by jack.mitchell (2009-06-23 21:18:40)

Offline

#7 2009-06-24 00:08:18

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,545

Re: ext4 corruption

This looks like bad trouble. If I were you, I'd try to find a way of talking to some *really* experienced users... you post on the ext4 mailing list, but I don't know if it's strictly a development list and they might yell at you in that case smile

Offline

Board footer

Powered by FluxBB