[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: repair partition: wrong size

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

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?


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.

Actually I was wrong: The sizes of sdb2+3 are correct, but what I cannot figure out is how the physical size of 487974 blocks for sdb2 is determined.
The partition has nothing on it that is useful. Just delete and reallocate?


Reply to: