I have a 3TB HDD and Ubuntu 14.04 live DVD is showing it as being 746.5GiB. I've seen this sort of problem with other disks in other situations before and never found a solution. I've even had Seagate replace a HDD telling me they were unable to fix the HDD after a disk imaging tool somehow permanently told the HDD it was a smaller disk.
Two questions:
- How did this happen?
- How do I fix it?
HDD Background for this case
- The disk used to be part of a ZFS RAIDZ using the bare disk instead of a partition.
- it sat on a shelf for a quite a few months.
- I used GParted to try and delete everything on the disk
I'm currently running the command
dd if=/dev/zero of=/dev/sdd bs=16M
Before that I ran:
root@ubuntu:/home/ubuntu# dd if=/dev/zero of=/dev/sdd bs=10M count=128 128+0 records in 128+0 records out 1342177280 bytes (1.3 GB) copied, 42.8214 s, 31.3 MB/s
root@ubuntu:/home/ubuntu# smartctl -i /dev/sdd smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.13.0-32-generic] (local build) Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org === START OF INFORMATION SECTION === Model Family: Western Digital Caviar Green (AF, SATA 6Gb/s) Device Model: WDC WD30EZRX-00DC0B0 Serial Number: {blanked} LU WWN Device Id: 5 0014ee 0036bc22d Firmware Version: 80.00A80 User Capacity: 3,000,592,982,016 bytes [3.00 TB] Sector Sizes: 512 bytes logical, 4096 bytes physical Device is: In smartctl database [for details use: -P show] ATA Version is: ACS-2 (minor revision not indicated) SATA Version is: SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s) Local Time is: Sun Jul 17 07:44:41 2016 UTC SMART support is: Available - device has SMART capability. SMART support is: Enabled
root@ubuntu:/home/ubuntu# gdisk -l /dev/sdd GPT fdisk (gdisk) version 0.8.8 Partition table scan: MBR: not present BSD: not present APM: not present GPT: not present Creating new GPT entries. Disk /dev/sdd: 1565565872 sectors, 746.5 GiB Logical sector size: 512 bytes Disk identifier (GUID): 1F876634-0284-4A1C-8FDF-34A255B9DCCC Partition table holds up to 128 entries First usable sector is 34, last usable sector is 1565565838 Partitions will be aligned on 2048-sector boundaries Total free space is 1565565805 sectors (746.5 GiB) Number Start (sector) End (sector) Size Code Name root@ubuntu:/home/ubuntu#
It is connected via a USB HDD dock. Perhaps this is the source of the problem. I'll rewire so it is plugged in directly to a SATA port on the motherboard. In the meantime here is the extra info requested.
root@ubuntu:/home/ubuntu# sg_readcap --16 /dev/sdd READ CAPACITY (16) not supported root@ubuntu:/home/ubuntu# sg_readcap /dev/sdd Read Capacity results: Last logical block address=1565565871 (0x5d50a3af), Number of blocks=1565565872 Logical block length=512 bytes Hence: Device size: 801569726464 bytes, 764436.5 MiB, 801.57 GB root@ubuntu:/home/ubuntu# hdparm -N /dev/sdd /dev/sdd: max sectors = 5860533168/1(5860533168?), HPA setting seems invalid (buggy kernel device driver?)
3000592982016 / 512 = 5860533168 = 0x15d50a3b0
and it got truncated to0x5d50a3b0 = 1565565872
. How is it connected to your computer?sg3-utils
in Ubuntu) and runsg_readcap -16 /dev/sdd
. If it reports the capacity correctly, then probably your gdisk is too old to handle a 3TB disk. Otherwise it would be either the kernel, or your USB enclosure/docking/adapter.hdparm -N /dev/sdd
?HPA setting seems invalid
is worth investigating. Check similar case I have found; Ultimate Boot CD allegedly helped.