[SOLVED] EXT2-fs (md0): group descriptors corrupted - Raid won't mount after power cut
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
EXT2-fs (md0): group descriptors corrupted - Raid won't mount after power cut
Hi All,
I know enough to be dangerous, but for once I'm going to ask for help before jumping in and trying to fix this myself as the terrible truth is I have no backup.
mount -t ext2 /dev/md0 /mnt/2TBRaid/
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I get "EXT2-fs (md0): group descriptors corrupted " from dmesg.
I created this raid0 from two disks using webmin. I barely knew what I was doing, but it worked OK, and I have been filling it up for a couple of years now. It is not the root partition, so I am on the box fine, but can't mount the /dev/md0 partition. Webmin still says the RAID is active and its status is clean.
Is it safe to run an fsck ? Are there any other diags I can run safely to get further information ?
Are you sure it is ext2 (and not ext3 or ext4)? Since ext3 and ext4 are extensions you might be getting an ext2 error if you specify mount -t ext2. What happens if you just try mount without the "-t ext2"?
Check your /etc/fstab to see what filesystem type it has specified for this device.
Assuming you have filesystem issues running fsck is the only way to fix them. What happens if you just run fsck on md0 without specifying a filesystem type?
Last edited by MensaWater; 07-07-2015 at 01:45 PM.
Presumably MensaWater meant - What happens if you just try mount without the "-t ext2"?.
Quote:
Is it safe to run an fsck ?
fsck will fix the problem with the filesystem. Most of the time everything "just works" after fsck.
It may mangle files whilst fixing - unlikely but possible. It is also possible you may never know which files - but look in "lost+found" at the root of the filesystem (i.e. look at /home not /home/user).
mount -t ext2 /dev/md0 /mnt/2TBRaid/
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
Is it safe to run an fsck ? Are there any other diags I can run safely to get further information ?
You can always run fsck -n, which will only report errors without fixing anything.
Assuming it's really an ext2 filesystem, your superblock could be broken. If that is the only problem, it can be repaired from an alternate superblock. Use google for instructions, or check here: http://www.cyberciti.biz/faq/linux-f...ve-superblocks.
Did an fsck -n and sent the output to a file - 2.8M of text saying it had errors, but guessed that the first error meant that nothing else would be valid to the scan.
Maybe fooolish, but took the plunge and did an fsck /dev/md0
and said yes to the first few suggestions - it has been running for an hour or so now...
does anyone know if the inode numbers make any sense - is this just a slow way to format my drive one inode at at time ? (I don't even really know what an inode is), or has it skipped huge portions of 'good inodes' and is ruthlessly targetting the bad or empty ones ?
output so far (from an hour or so) below...
fsck from util-linux 2.20.1
fsck: WARNING: bad format on line 13 of /etc/fstab
e2fsck 1.42.5 (29-Jul-2012)
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
fsck.ext2: Group descriptors look bad... trying backup blocks...
/dev/md0 was not cleanly unmounted, check forced.
Resize inode not valid. Recreate<y>? yes
Pass 1: Checking inodes, blocks, and sizes
Inode 21880871 has illegal block(s). Clear<y>? yes
Illegal block #17420 (3282210021) in inode 21880871. CLEARED.
Illegal block #17421 (2915989931) in inode 21880871. CLEARED.
Illegal block #17422 (2740283881) in inode 21880871. CLEARED.
Illegal block #17424 (518891801) in inode 21880871. CLEARED.
Illegal block #17425 (3028642388) in inode 21880871. CLEARED.
Illegal block #17426 (1814138070) in inode 21880871. CLEARED.
Illegal block #17427 (2980536655) in inode 21880871. CLEARED.
Illegal block #17428 (1452061607) in inode 21880871. CLEARED.
Illegal block #17429 (1529605004) in inode 21880871. CLEARED.
Illegal block #17430 (869570719) in inode 21880871. CLEARED.
Illegal block #17431 (3467654841) in inode 21880871. CLEARED.
Too many illegal blocks in inode 21880871.
Clear inode<y>? yes
Inode 74555397 has illegal block(s). Clear<y>? yes
Illegal block #12 (2441949688) in inode 74555397. CLEARED.
Illegal block #13 (3829104721) in inode 74555397. CLEARED.
Illegal block #14 (3263180480) in inode 74555397. CLEARED.
Illegal block #15 (1349793897) in inode 74555397. CLEARED.
Illegal block #16 (1952443906) in inode 74555397. CLEARED.
Illegal block #18 (2483017152) in inode 74555397. CLEARED.
Illegal block #19 (748554112) in inode 74555397. CLEARED.
Illegal block #21 (594543876) in inode 74555397. CLEARED.
Illegal block #23 (1182135828) in inode 74555397. CLEARED.
Illegal block #24 (2162786310) in inode 74555397. CLEARED.
Illegal block #27 (3927901288) in inode 74555397. CLEARED.
Too many illegal blocks in inode 74555397.
Clear inode<y>? yes
Depending on size it can take quite a while to do a full fsck. One benefit of going to ext3 is that it is journaled so some fixes can be done by doing log replay but full fsck takes a while on large filesystems. A benefit of going to ext4 is that it seldom requires that long to do even automated fsck.
You never did say what your fstab had for md0 (e.g. is it in fact an ext2 filesystem).
Interesting when you started your check you got a WARNING:
fsck: WARNING: bad format on line 13 of /etc/fstab
What is on line 13 of /etc/fstab? What is on the line above it?
Generally speaking fsck prompts should all be answered yes unless you really know what you're doing. It may trash your filesystem but if you don't know what you're doing at an expert level chances are it was toast from your standpoint anyway.
Note that often enough the reason you need to do the fsck is the one it showed you at the beginning - it simply was not shutdown cleanly and in such cases fsck seldom causes you issues. Sometimes if the issue is underlying disk or controller failure fsck isn't going to help (and could do damage) until you replace the underlying disk or controller.
Thanks for all your help - fsck still going - its now working its way through "multiply-claimed blocks" for various files - each one takes longer that I can bear to wait at the prompt, so I go back and check the prompt as often as I can and hit enter again, but I suspect it will take days to get through its work this way.
I don't mind waiting, but I didn't want to seem ungrateful to your help
Sorry, also you asked about the fstab
below are lines 12 and 13 - I can't remember what the comment means - and if I wrote it or it was text from Webmin ?
Sorry, also you asked about the fstab
below are lines 12 and 13 - I can't remember what the comment means - and if I wrote it or it was text from Webmin ?
You have two devices and two mountpoints in a single fstab line. Remove either the UUID.../mnt/2TBRaid, or the /dev/md0....TBRaid, and the error message will disappear.
Regarding your fsck output, your filesystem doesn't look very healthy. When fsck is done repairing it, you will see most data gone.
Well, after several days of hitting enter, and reading up that fsck does its best to behave when interrupted I hit cntrl + c and tried an fsck -y. This failed saying it was mounted - did a df -ha and could see that it was indeed mounted and was showing only a few gig used (was nearly full).
un-mounted and re-ran the fsck with a -y. Left it over night and by the morning it seemed to be back OK.
I guess there is really no way to tell for sure as I have no inventory other than my memory (brain, not RAM ) but to me it all seems fine.
I have now recieved a 2TB SATA disk which I intend to use for backups
Thankyou so much for your help - I really appreciate it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.