You are not logged in.

#1 2012-12-31 22:45:35

benine
Member
Registered: 2012-12-29
Posts: 9

Hard Drive partition size and actual size mismatch

[benine@comp ~]$ sudo fdisk -l /dev/sdd

Disk /dev/sdd: 320.1 GB, 320072933376 bytes, 78142806 sectors
Units = sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x26b0dccf

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *          32    78125055   312500096    7  HPFS/NTFS/exFAT
/dev/sdd2        78125056   625142447  2188069568    7  HPFS/NTFS/exFAT

[benine@comp ~]$ df -h /dev/sdd1
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd1       299G   74M  298G   1% /media/disk1

[benine@comp ~]$ df -h /dev/sdd2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd2        70M  2.6M   67M   4% /media/disk2

Can anyone explain the above discrepancy? The partitions on /dev/sdd were formatted by cfdisk to be approximately:
40GB    /dev/sdd1
280GB  /dev/sdd2

Turns out they are actually:
299GB  /dev/sdd1
70MB    /dev/sdd2

??????????????????????????

I have formatted both using mkfs -t ntfs

edit:
I just tested a theory I had and have discovered that this is related to an earlier problem I was having with the same hard drive where I could mount at most two partitions. This posting explains the original problem.

It doesn't matter how I configure the hard drive's partition table, when I mount the first partition it always results in a size of 299GB when I use df and the second partition is always 70MB. I am baffled by this. I thought the combination of changing the partition table and formatting the drive would take care of this.

Last edited by benine (2012-12-31 22:56:01)

Offline

#2 2013-01-07 11:12:14

p0x8
Member
Registered: 2012-09-20
Posts: 67

Re: Hard Drive partition size and actual size mismatch

I can imagine some improbable scenarios, the simplest one being some sort of weird interaction between partition types. The course of action I would take, assuming there was no valuable data on the disk:

- zero the entire disk to make sure that there were no lingering bits of partition tables or file systems (dd if=/dev/zero of=/dev/sdX)
- reboot/reconnect the disk and confirm that no partitions were detected
- create a new empty MBR partition table using fdisk (fdisk /dev/sdX, option 'o')
- create new partitions using fdisk

Using the same tool to list and create the partitions minimizes the amount of elements to debug.

Offline

#3 2013-01-13 03:34:58

benine
Member
Registered: 2012-12-29
Posts: 9

Re: Hard Drive partition size and actual size mismatch

I wound up giving up on the hard drive and had amazon send me a replacement. This time I partitioned the device with my linux box and formatted it using 'sudo mkfs -t ntfs /dev/sdxx'. 

I got the exact same result. I had created two partitions, one 40GB and one 280GB. When I tried mounting the two partitions I came up with an error that said the NTFS signature was missing. I then reformatted the device as ext4. I mounted the two partitions and checked their sizes it said one was 299GB and the second was 70MB. I feel like this may be just be a weird interaction between NTFS and this particular hard drive model: WD Blue 320 GB Mobile Hard Drive: 2.5 Inch, 5400 RPM, SATA II, 8 MB Cache - WD3200BPVT

I was still able to install windows 7 on the new hard drive in another laptop with no problems, and when I attached it to my Linux machine again, I couldn't access the partitions as the NTFS signature could not be found (and yet the hard drive was fully functional and accessible in windows). I repartitioned the hard drive so I could mount the partitions. I played with it just as before putting different sized partitions on the hard drive and a different number, but I was always left with the same size partitions in reality when the partition table reported however I set it up.

Another note: With the original hard drive I successfully tried partitioning and formatting an older 320GB WD Scorpio Blue hard drive with two partitions, one 40GB and one 280GB. I then used dd to copy the entire scorpio drive to the newer drive. This still didn't work. I was still left with a partition table that read one thing and a real partition size of 299GB and 70MB.

Does anyone have a clue why this might be happening? I would give it up to defective hardware but it still works in windows. I know this is a stretch, but is Microsoft doing something ridiculous?

Offline

#4 2013-01-13 03:54:31

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: Hard Drive partition size and actual size mismatch

Have you tried letting Windows size and format the NTFS partition? Alternatively, maybe try using any Live CD (with Gparted)?

Offline

#5 2013-01-13 09:29:00

benine
Member
Registered: 2012-12-29
Posts: 9

Re: Hard Drive partition size and actual size mismatch

Windows sized and and formatted the first drive with NTFS. Linux did the second with NTFS. Both wound up with the same exact issue and remained the same no matter how I tried reformatting.

No I have not tried a LiveCD. I suppose I could give that a shot.

Offline

Board footer

Powered by FluxBB