Re: repair partition: wrong size



On 08/05/2010 07:07 AM, hugo vanwoerkom wrote:
Hi,

I just noticed that the partition sizes on my usb disk are wrong.

debian:/# fsck -f /dev/sdb2
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
The filesystem size (according to the superblock) is 1953905 blocks
The physical size of the device is 487974 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? yes

These are the sizes reported:

debian:/# sfdisk -l /dev/sdb

Disk /dev/sdb: 9729 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

Device Boot Start End #cyls #blocks Id System
/dev/sdb1 * 0+ 972 973- 7815591 83 Linux
/dev/sdb2 973 1215 243 1951897+ 83 Linux
/dev/sdb3 1216 2918 1703 13679347+ 83 Linux
/dev/sdb4 2919 9728 6810 54701325 5 Extended
/dev/sdb5 2919+ 3891 973- 7815591 83 Linux
/dev/sdb6 3892+ 4864 973- 7815591 83 Linux
/dev/sdb7 4865+ 9728 4864- 39070048+ 83 Linux


sdb2 an sdb3 are wrong, they both ought to be 7815591.

How does one repair that?

Hugo


Have you tried the '-b' option, to use an alternate superblock?

If the primary has been corrupted, using an alternate would/should fix
the issue, assuming the alternate is OK.

See the man page for e2fsck for a way to figure out where the alternates
were created.

--
Bob McGowan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx
with a subject of "unsubscribe". Trouble? Contact listmaster@xxxxxxxxxxxxxxxx
Archive: http://lists.debian.org/4C5AFBE3.60207@xxxxxxxxxxxx



Relevant Pages

  • Re: [solved] Re: cant mount my root partition (rescue mode)
    ... >> filesystem superblock is corrupt). ... If the device is valid and it really contains an ext2 filesystem ... > with a subject of "unsubscribe". ...
    (Debian-User)
  • repair partition: wrong size
    ... I just noticed that the partition sizes on my usb disk are wrong. ... Either the superblock or the partition table is likely to be corrupt! ... Device Boot Start End #cyls #blocks Id System ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: repair partition: wrong size
    ... I just noticed that the partition sizes on my usb disk are wrong. ... Either the superblock or the partition table is likely to be corrupt! ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx with a subject of "unsubscribe". ...
    (Debian-User)
  • Re: URGENT: RAID5 Ext3 superblock corruption
    ... > seems that the previous card corrupted the filesystem somehow. ... > Luckily the root partition RAID is alive and working. ... > filesystem, then the superblock ... > is corrupt, and you might try running e2fsck with an alternate superblock: ...
    (comp.os.linux.misc)
  • Re: cant mount my root partition (rescue mode)
    ... > in this case it might be a "bad superblock" like it says. ... The file system is appalently too high for this version of e2fsck (or the ... filesystem superblock is corrupt). ...
    (Debian-User)