FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-05-2010, 02:07 PM
hugo vanwoerkom
 
Default repair partition: wrong size

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: i3egja$run$1@dough.gmane.org">http://lists.debian.org/i3egja$run$1@dough.gmane.org
 
Old 08-05-2010, 02:32 PM
George-Cristian Bīrzan
 
Default repair partition: wrong size

On Thu, 2010-08-05 at 09:07 -0500, hugo vanwoerkom wrote:
> Hi,
>
> I just noticed that the partition sizes on my usb disk are wrong.
> [snip]
> sdb2 an sdb3 are wrong, they both ought to be 7815591.
>
> How does one repair that?

Try gpart: http://www.brzitwa.de/mb/gpart/index.html

--
George-Cristian Bīrzan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1281018770.30379.1701.camel@gcbirzan">http://lists.debian.org/1281018770.30379.1701.camel@gcbirzan
 
Old 08-05-2010, 02:59 PM
hugo vanwoerkom
 
Default repair partition: wrong size

George-Cristian Bīrzan wrote:

On Thu, 2010-08-05 at 09:07 -0500, hugo vanwoerkom wrote:

Hi,

I just noticed that the partition sizes on my usb disk are wrong.
[snip]
sdb2 an sdb3 are wrong, they both ought to be 7815591.

How does one repair that?


Try gpart: http://www.brzitwa.de/mb/gpart/index.html



Gpart finds the partitions allright, but they aren't lost, just the
wrong size. How do I set the correct size?


Hugo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: i3ejkd$7in$1@dough.gmane.org">http://lists.debian.org/i3ejkd$7in$1@dough.gmane.org
 
Old 08-05-2010, 03:01 PM
George-Cristian Bīrzan
 
Default repair partition: wrong size

On Thu, 2010-08-05 at 09:59 -0500, hugo vanwoerkom wrote:
> Gpart finds the partitions allright, but they aren't lost, just the
> wrong size. How do I set the correct size?

>From its page:

Now if after the check-phase it says Ok, you should check the proposed
partition table very carefully. After that you may write back the
guessed table by calling "gpart -W /dev/hdc /dev/hdc" (exchange /dev/hdc
with your disk device). When gpart has successfully written the new
primary partition table, cross your fingers and reboot.

--
George-Cristian Bīrzan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1281020500.30379.1702.camel@gcbirzan">http://lists.debian.org/1281020500.30379.1702.camel@gcbirzan
 
Old 08-05-2010, 04:06 PM
hugo vanwoerkom
 
Default repair partition: wrong size

George-Cristian Bīrzan wrote:

On Thu, 2010-08-05 at 09:59 -0500, hugo vanwoerkom wrote:
Gpart finds the partitions allright, but they aren't lost, just the
wrong size. How do I set the correct size?



From its page:


Now if after the check-phase it says Ok, you should check the proposed
partition table very carefully. After that you may write back the
guessed table by calling "gpart -W /dev/hdc /dev/hdc" (exchange /dev/hdc
with your disk device). When gpart has successfully written the new
primary partition table, cross your fingers and reboot.




Actually in my /dev/sdb both partition 2 + 3 are wrong:

num start should be end should be
2 8003MB 8003MB 10.0GB 16.0GB
3 10.0GB 16.0GB 24.0GB 24.0GB

The simplest fix would be to delete both and recreate them because I
have backups for both. But I would like to see if it can be fixed.


Gpart /dev/sdb gives:

Begin scan...
Possible partition(Linux ext2), size(7632mb), offset(0mb)
Possible partition(Linux ext2), size(7632mb), offset(7632mb)
Possible extended partition at offset(22897mb)
Possible partition(Linux ext2), size(7632mb), offset(22897mb)
Possible partition(Linux ext2), size(7632mb), offset(30529mb)
Possible partition(Linux ext2), size(38154mb), offset(38162mb)
End scan.

Checking partitions...
Partition(Linux ext2 filesystem): primary
Partition(Linux ext2 filesystem): primary
Partition(Linux ext2 filesystem): logical
Partition(Linux ext2 filesystem): logical
Partition(Linux ext2 filesystem): logical
Ok.

Guessed primary partition table:
Primary partition(1)
type: 131(0x83)(Linux ext2 filesystem)
size: 7632mb #s(15631176) s(63-15631238)
chs: (0/1/1)-(972/254/57)d (0/1/1)-(972/254/57)r

Primary partition(2)
type: 131(0x83)(Linux ext2 filesystem)
size: 7632mb #s(15631240) s(15631245-31262484)
chs: (973/0/1)-(1023/254/63)d (973/0/1)-(1945/254/58)r

Primary partition(3)
type: 015(0x0F)(Extended DOS, LBA)
size: 53419mb #s(109402650) s(46893735-156296384)
chs: (1023/254/63)-(1023/254/63)d (2919/0/1)-(9728/254/63)r

Primary partition(4)
type: 000(0x00)(unused)
size: 0mb #s(0) s(0-0)
chs: (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

But I don't think that is right: there are 3 primary partitions and 3
logical partitions and they should be all 8GB in length except the last
one that is 40GB in length.


Hugo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: i3enij$nj3$1@dough.gmane.org">http://lists.debian.org/i3enij$nj3$1@dough.gmane.org
 
Old 08-05-2010, 05:58 PM
Bob McGowan
 
Default 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@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4C5AFBE3.60207@symantec.com">http://lists.debian.org/4C5AFBE3.60207@symantec.com
 
Old 08-06-2010, 03:24 PM
hugo vanwoerkom
 
Default repair partition: wrong size

Bob McGowan wrote:

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.



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?

Hugo


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Archive: i3h9fi$lcn$1@dough.gmane.org">http://lists.debian.org/i3h9fi$lcn$1@dough.gmane.org
 

Thread Tools




All times are GMT. The time now is 04:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org