You are not logged in.

#1 2008-11-05 03:26:34

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Ok, first here's my partition table:

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x55096fd8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1912    15358108+  83  Linux
/dev/sda2            1913       58210   452213685   83  Linux
/dev/sda3   *       58211       60801    20812207+   7  HPFS/NTFS

Disk /dev/sdb: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x069f4ade

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       38913   312568641   83  Linux

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8a87a6ea

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1       60801   488384001   83  Linux

Disk /dev/sdd: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf14bafec

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1       60801   488384001   83  Linux

Disk /dev/sde: 1540.1 GB, 1540150555136 bytes
255 heads, 63 sectors/track, 187245 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00074d1b

   Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdf: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000e82ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1               1      121601   976760001   83  Linux

Let's take a closer look on /dev/sde - 1540GB, right? No, that's not right, that should be 500.1 GB!

Let's take a look at what fsck tells me:

bash-3.2# fsck /dev/sde
fsck 1.41.3 (12-Oct-2008)
WARNING: bad format on line 1 of /etc/fstab
e2fsck 1.41.3 (12-Oct-2008)
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sde

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

mkfs.ext3 seems fine:

Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
94003200 inodes, 376011357 blocks
18800567 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
11475 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
    102400000, 214990848

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
bash-3.2# fsck -pv /dev/sde1
fsck 1.41.3 (12-Oct-2008)
WARNING: bad format on line 1 of /etc/fstab
fsck.ext3: A block group is missing an inode table while checking ext3 journal for /dev/sde1

What I did was deleting the old partition with cfdisk, created a new one and then run mkfs.ext3 /dev/sde - what have I've done wrong, and how could I correct this?[

Last edited by dmz (2008-11-07 12:15:19)

Offline

#2 2008-11-05 04:25:19

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

dmz wrote:

What I did was deleting the old partition with cfdisk, created a new one and then run mkfs.ext3 /dev/sde - what have I've done wrong, and how could I correct this?

/dev/sde or /dev/sde1 ??

There's a big difference there - if you're doing the first, then mkfs is overwriting your partition table, which will screw the whole thing... Make sure you're using /dev/sde1 instead.

Offline

#3 2008-11-05 09:54:21

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

fukawi2 wrote:
dmz wrote:

What I did was deleting the old partition with cfdisk, created a new one and then run mkfs.ext3 /dev/sde - what have I've done wrong, and how could I correct this?

/dev/sde or /dev/sde1 ??

There's a big difference there - if you're doing the first, then mkfs is overwriting your partition table, which will screw the whole thing... Make sure you're using /dev/sde1 instead.

Oops. Not sure which I did, actually... Is there some way to repair all of this mess?

Offline

#4 2008-11-05 11:01:33

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,222
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Assuming you haven't put any data on there yet....  Just recreate the partition table using fdisk or cfdisk, then reformat the partition using mkfs smile

Offline

#5 2008-11-05 11:40:30

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

fukawi2 wrote:

Assuming you haven't put any data on there yet....  Just recreate the partition table using fdisk or cfdisk, then reformat the partition using mkfs smile

I've done that.. several times. sad It still shows up as a 1500 GB drive..

Offline

#6 2008-11-05 11:44:23

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

By the way.. when I'm mkfs.ext3 /dev/sdd1 I'm getting this:

Warning!  Your mke2fs.conf file does not define the ext3 filesystem type.
You probably need to install an updated mke2fs.conf file.

I don't know if that matters though, cause I've formated 4,5 drives the exactly same way...

Offline

#7 2008-11-05 11:52:11

Xappe
Member
Registered: 2008-05-17
Posts: 105

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Look for a pacnew! mke2fs.conf was updated a couple of days ago (always look at the pacman output when upgrading).


vanum est vobis ante lucem surgere

Offline

#8 2008-11-05 12:15:58

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Xappe wrote:

Look for a pacnew! mke2fs.conf was updated a couple of days ago (always look at the pacman output when upgrading).

Thx, but that didn't help.. still 1500 GB..

Offline

#9 2008-11-05 18:27:32

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Anyone? sad

Offline

#10 2008-11-05 18:53:58

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Try running ....mke2fs -j /dev/sde1......

Ignore error messages...........


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#11 2008-11-05 19:28:27

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

lilsirecho wrote:

Try running ....mke2fs -j /dev/sde1......

Ignore error messages...........

Hm, okay, this is what happens:

> su
Password: 
bash-3.2# mke2fs -j /dev/sde1
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
94003200 inodes, 376011357 blocks
18800567 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
11475 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 
    102400000, 214990848

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 39 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
bash-3.2# fsck /dev/sde1
fsck 1.41.3 (12-Oct-2008)
WARNING: bad format on line 1 of /etc/fstab
e2fsck 1.41.3 (12-Oct-2008)
fsck.ext3: Group descriptors look bad... trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/sde1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>

bash-3.2#

No luck.. I am getting desperate >_<

Offline

#12 2008-11-05 20:25:28

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Search on google reveals that errors in syntax in fstab will cause such errors and many which are weird.

Missing commas, incorrect character ...such as o instead of 0 and no "new line" are mentioned.

Worth a looksee............


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#13 2008-11-05 21:42:36

Sophotect
Member
From: Hyperbolic excess
Registered: 2007-03-25
Posts: 30

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Try to "zero" out the MBR of the Disk the hard way. In your case f.e.: dd if=/dev/zero of=/dev/sde bs=512 count=16

16 to be on the safe side, 1 would be sufficient.
Then try again to partition the disk and formatting the partition(s).

See http://en.wikipedia.org/wiki/Dd_(Unix) or do a man dd to understand what it does.
Basically this gets some zeroes out of /dev/zero and transfers them to another device. In this case with blocksize in Bytes at 512 and 16 times straight to your HDD in my example. Beware of this, don't send the zeroes to your working disk ;-)

Last edited by Sophotect (2008-11-05 21:52:27)

Offline

#14 2008-11-05 23:17:17

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Sophotect wrote:

Try to "zero" out the MBR of the Disk the hard way. In your case f.e.: dd if=/dev/zero of=/dev/sde bs=512 count=16

16 to be on the safe side, 1 would be sufficient.
Then try again to partition the disk and formatting the partition(s).

See http://en.wikipedia.org/wiki/Dd_(Unix) or do a man dd to understand what it does.
Basically this gets some zeroes out of /dev/zero and transfers them to another device. In this case with blocksize in Bytes at 512 and 16 times straight to your HDD in my example. Beware of this, don't send the zeroes to your working disk ;-)

That did the trick! Thx a lot! big_smile:D
Any idea WHY it became this way in the first place so that I can prevent it from happening again?

Offline

#15 2008-11-07 09:55:49

Heller_Barde
Member
Registered: 2008-04-01
Posts: 245

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

probably something screwed with your MBR (Master Boot Record) some partitioning tool not getting the data straight. not very likely to happen again though (never ever happened to me and i mess around with harddisks a lot!)

cheers Barde

Offline

#16 2008-11-07 12:14:56

dmz
Member
From: Sweden
Registered: 2008-08-27
Posts: 881
Website

Re: HDD shows up as 1500 GB drive when it's really 500GB.. WTF? [SOLVED]

Allright, thx a lot everybody who took their time helping me out!

Offline

Board footer

Powered by FluxBB