Windows does not recognize the full capacity of my hitachi harddrive

Solution 1:

So the issue was that Windows only recognized half of my disk. After some digging (and some more digging) I found out this is a problem which can occur because of a host protected area (HPA). Using hdparm, included with the Linux partitioning tool gparted, I can check if this is the case. From an Ubuntu live CD I issued the following commands:

ubuntu@ubuntu:~$ sudo hdparm -N /dev/sdb

/dev/sdb:
 max sectors   = 1953569134/3907029168, HPA is enabled

If I check my other disk it shows this output:

ubuntu@ubuntu:~$ sudo hdparm -N /dev/sda

/dev/sda:
 max sectors   = 156301488/156301488, HPA is disabled

which shows what I would expect, all the sectors on the hard drive are visible. So it seems that half of the sectors on my 2 TB disk under /dev/sdb are covered by an HPA. The following hdparm command fixed this:

sudo hdparm -N p3907029168 /dev/sdb
/dev/sdb:
 setting max visible sectors to 3907029168 (permanent)
 max sectors   = 3907029168/3907029168, HPA is disabled

by setting the maximum visible sectors to the maxmimum of the drive, and thus disabling the HPA. Now if I go to Windows and check Disk management, the disk nicely shows the correct amount of free space.

It could be that the HPA is caused by my gigabyte motherboard which hides a copy of the bios in a HPA on a harddrive. A bug in the bios causes this HPA to cut the space on this two Tb hard drive in two, see also this post on tom's hardware. The information is roughly halfway down the replies, by a user called fzabkar. The OP in that post also used a hitachi drive, so it could be that the problem is caused by a combination of a Gigabyte motherboard and a Hitachi hard drive.