External HDD wrong size

0

I have an very interesting problem with a Seagate HDD (3TB): Under Windows the HDD has a size of ~3TB. When I connect it to Ubuntu 14.04 and try to format it with GParted, GParted tells me that the backup partition table (GPT) is corrupt and it uses the main. BUT: After that gparted threw an error (in some .c file) and crashed. I tried gdisk:

nch@Media:/mnt$ sudo gdisk /dev/sdi GPT fdisk (gdisk) version 0.8.8

Warning! Disk size is smaller than the main header indicates! Loading secondary header from the last sector of the disk! You should use 'v' to verify disk integrity, and perhaps options on the experts' menu to repair the disk. Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header.

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:   MBR: protective   BSD: not present   APM: not present   GPT: damaged

**************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended.
****************************************************************************

Command (? for help): p Disk /dev/sdi: 1565565872 sectors, 746.5 GiB Logical sector size: 512 bytes Disk identifier (GUID): 329DB2A5-1B26-4FCC-9599-288010699D37 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 5860533134 Partitions will be aligned on 8-sector boundaries Total free space is 5860270957 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name    1     34          262177   128.0 MiB   0C01  Microsoft reserved part

Command (? for help): v

Caution: The CRC for the backup partition table is invalid. This table may be corrupt. This program will automatically create a new backup partition table when you save your partitions.

Problem: The secondary header's self-pointer indicates that it doesn't reside at the end of the disk. If you've added a disk to a RAID array, use the 'e' option on the experts' menu to adjust the secondary header's and partition table's locations.

Problem: Disk is too small to hold all the data! (Disk size is 1565565872 sectors, needs to be 5860533168 sectors.) The 'e' option on the experts' menu may fix this problem.

Problem: GPT claims the disk is larger than it is! (Claimed last usable sector is 5860533134, but backup header is at 5860533167 and disk size is 1565565872 sectors. The 'e' option on the experts' menu will probably fix this problem

Caution: Partition 1 doesn't begin on a 8-sector boundary. This may result in degraded performance on some modern (2009 and later) hard disks.

Consult http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/ for information on disk alignment.

Identified 4 problems!

Command (? for help): r

Recovery/transformation command (? for help): f Warning! This will destroy the currently defined partitions! Proceed? (Y/N): yes

Recovery/transformation command (? for help): f Warning! This will destroy the currently defined partitions! Proceed? (Y/N): y

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!!

Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdi. The operation has completed successfully.

So the interesting thing is that gdisk showed me a free space of 2.7TB but after the repair I used

fdisk -l

and it showed me the following:

    Disk /dev/sdi: 801.6 GB, 801569726464 bytes
256 Köpfe, 63 Sektoren/Spur, 97071 Zylinder, zusammen 1565565872 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Festplattenidentifikation: 0x00000000

   Gerät  boot.     Anfang        Ende     Blöcke   Id  System
/dev/sdi1               1  1565565871   782782935+  ee  GPT

I tried several other repairs with gdisk but with no success. Under windows I have only to convert the gpt disk to an mbr disk and then I can see unformated two partitions:

  1. 2048GB
  2. ~780GB

What is wrong here and how can I fix this?

ubuntu
fdisk
hard-drive
gpt
mbr
asked on Server Fault Oct 2, 2014 by WhiteIntel • edited Oct 23, 2014 by Dave M

2 Answers

1

Very often "External" HDDs are reported with wrong size, if the size of the HDD exceeds the supported maximum size of the usb bridge. if the external hhd is an bundled enclosure you can ignore my answer, if it is something like a docking station this could be your problem.

try a different enclosure that supports 3tb hdds and up...

answered on Server Fault Jul 1, 2016 by Mr.Gosh
1

If the 2TB limit is exceeded, in many situations you will be able to detect what's above 2TB and up to the true HDD space, meaning the rest of ~730GB.

This can be a partitioning or controller problem. Some external drives use fake-SATA controllers (software-emulated) and will cause such issues with large drives, because the addressing the controller uses.

To identify if it's really a controller problem, try connecting the drive directly to a SATA port, or via another non-emulated adapter.

On the software side, note that fdisk (util-linux 2.20.1) does not understand GPT. You should try parted -l.

You can use parted's mkpart primary to create partition larger than 2TB [ (parted) mkpart primary 0GB 2929GB ].

answered on Server Fault Sep 29, 2020 by Overmind

User contributions licensed under CC BY-SA 3.0