LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-13-2011, 02:25 AM   #1
ktat
LQ Newbie
 
Registered: Jan 2011
Posts: 5

Rep: Reputation: 0
superblock is corrupt after attempted resize & move of ext3 partition


Hi All,

I could really use some help here (I hope I am posting in correct place), I have made my /home partition inaccessible

Problem started when I used gparted to resize and move /dev/sda3 (where all my personal data is). This partition is about 250G and the process was going to take some hours to complete so I went to bed before it finished. When I checked it in the morning my pc had shut itself down, so I rebooted and started up gparted again. Looking at the partition table in gparted I noticed that /dev/sda6 had been resized, however it hadn't been moved. I tried to move it and the following error came up...



Code:
GParted 0.5.2



Libparted 2.2

Check and repair file system (ext3) on /dev/sda3  00:00:01    ( ERROR )

     	

calibrate /dev/sda3  00:00:01    ( SUCCESS )

     	

path: /dev/sda3

start: 39054829

end: 474914343

size: 435859515 (207.83 GiB)

check file system on /dev/sda3 for errors and (if possible) fix them  00:00:00    ( ERROR )

     	

e2fsck -f -y -v /dev/sda3

     	

e2fsck: Group descriptors look bad... trying backup blocks...

e2fsck: going back to original superblock

Filesystem mounted or opened exclusively by another program?

e2fsck 1.41.11 (14-Mar-2010)

e2fsck: The ext2 superblock is corrupt when using the backup blocks

e2fsck: Device or resource busy while trying to open /dev/sda3


This is the dmesg output...



Code:
karlos@ubuntu-10:~$ dmesg|tail

[ 4588.270555] EXT3 FS on sda6, internal journal

[ 4588.270565] EXT3-fs: mounted filesystem with ordered data mode.

[ 4669.197392] kjournald starting.  Commit interval 5 seconds

[ 4669.197633] EXT3 FS on sda6, internal journal

[ 4669.197643] EXT3-fs: mounted filesystem with ordered data mode.

[ 6401.853257] kjournald starting.  Commit interval 5 seconds

[ 6401.853573] EXT3 FS on sda6, internal journal

[ 6401.853584] EXT3-fs: mounted filesystem with ordered data mode.

[ 7895.924569] EXT3-fs error (device sda3): ext3_check_descriptors: Block bitmap for group 1 not in group (block 0)!

[ 7895.925081] EXT3-fs: group descriptors corrupted!


Then I did some playing around with the partition table, deleting partitions and then rescuing them with parted. This resulted in sda3 becoming sda1. To continue



## backing up sda1

Code:
sudo dd if=/dev/sda1 of=/home/karlos/backup/backup-sda1.img

435859512+0 records in

435859512+0 records out

223160070144 bytes (223 GB) copied, 3623.43 s, 61.6 MB/s


## then after trying a number of different superblocks.. (found using mke2fs -n /dev/sda1)

Code:
karlos@ubuntu-10:~$ sudo e2fsck -f -b 163840 /dev/sda1

e2fsck 1.41.11 (14-Mar-2010)

Resize inode not valid.  Recreate<y>? yes



Pass 1: Checking inodes, blocks, and sizes

Inode 161, i_blocks is 3440, should be 0.  Fix<y>? yes



Inode 417, i_blocks is 48, should be 0.  Fix<y>? yes



Inode 32769 is a unknown file type with mode 00 but it looks like it is really a directory.

Fix<y>? yes



Inode 98337, i_blocks is 16, should be 0.  Fix<y>? yes



Inode 98338, i_blocks is 72, should be 0.  Fix<y>? yes



Inode 114849 is a unknown file type with mode 00 but it looks like it is really a directory.

Fix<y>? yes



Inode 147489, i_blocks is 8, should be 0.  Fix<y>? yes



Inode 147490 is a unknown file type with mode 00 but it looks like it is really a directory.

Fix<y>? yes



Inode 180225 is a unknown file type with mode 00 but it looks like it is really a directory.

Fix<y>? yes



Inode 180225, i_size is 0, should be 4096.  Fix<y>? yes



Inode 213025, i_blocks is 4168, should be 0.  Fix<y>? yes



Inode 213026, i_blocks is 4240, should be 0.  Fix<y>? yes



Inode 213027, i_blocks is 3368, should be 0.  Fix<y>? yes



Inode 213028, i_blocks is 4448, should be 0.  Fix<y>? yes



Inode 213029, i_blocks is 3512, should be 0.  Fix<y>? yes



Special (device/socket/fifo) inode 2116299 has non-zero size.  Fix<y>? 



.....



Inode 5179684 has illegal block(s).  Clear<y>? yes



Illegal block #0 (4040140531) in inode 5179684.  CLEARED.

Illegal block #1 (3902218074) in inode 5179684.  CLEARED.

Illegal block #2 (771429886) in inode 5179684.  CLEARED.

Illegal block #3 (935633403) in inode 5179684.  CLEARED.

Illegal block #4 (1327107087) in inode 5179684.  CLEARED.

Illegal block #5 (3680397508) in inode 5179684.  CLEARED.

Illegal block #6 (1350728668) in inode 5179684.  CLEARED.

Illegal block #7 (846466656) in inode 5179684.  CLEARED.

Illegal block #8 (3803158996) in inode 5179684.  CLEARED.

Illegal block #9 (346235357) in inode 5179684.  CLEARED.

Illegal block #10 (2055782526) in inode 5179684.  CLEARED.

Too many illegal blocks in inode 5179684.

Clear inode<y>? 



......



Illegal block #135267340 (1295874896) in inode 5179471.  CLEARED.

Error storing directory block information (inode=5179471, block=0, num=126821203): Memory allocation failed

e2fsck: aborted


### try again...

Code:
root@PartedMagic:~# e2fsck -f -b 163840 /dev/sda1

e2fsck 1.41.11 (14-Mar-2010)

Resize inode not valid.  Recreate<y>? yes



Pass 1: Checking inodes, blocks, and sizes

Inode 5179471 has illegal block(s).  Clear<y>? yes



Illegal block #135267340 (1295874896) in inode 5179471.  CLEARED.

Error storing directory block information (inode=5179471, block=0, num=126821236): Memory allocation failed

e2fsck: aborted



So now I am stuck with an error stating "memory allocation failed", does anyone know what this means and how I might work around it?
 
Old 01-13-2011, 03:07 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 19,574

Rep: Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502Reputation: 3502
I suspect you may have lost the opportunity to "work around it". If there ever was such an opportunity.
I've generally had very good results with gparted, but I'm anal about backups before screwing with data. I just searched and found this - you may not like what it says.
 
Old 01-14-2011, 04:23 AM   #3
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 15.2
Posts: 1,338

Rep: Reputation: 259Reputation: 259Reputation: 259
Quote:
Originally Posted by syg00 View Post
I've generally had very good results with gparted, but I'm anal about backups before screwing with data.
Especially when there is no UPS for the system during such an operation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
corrupt ext3 partition - need to recover whysyn Linux - Hardware 8 07-02-2010 08:30 AM
Corrupt superblock or partition table jdtiede Linux - Hardware 2 12-29-2008 03:31 PM
ext3 superblock/partition table problem sxeraverx Linux - Software 7 03-14-2008 10:31 PM
superblock or partition table corrupt? Kristian2 Linux - Newbie 1 05-11-2004 09:34 AM
resize an ext3 partition with coexisting ntfs partition andy_g Linux - Newbie 1 02-03-2004 05:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration