2

My external USB drive with GUID Partition Table shows wrong size and i am thinking thats stopping TrueCrypt from mounting it.

The disk is Formated in Win7 and works there fine. The 2. partition is mounted automatically by Ubuntu but the 3. partition does not work. The partition is encrypted with TruCrypt.

gdisk -p

Disk /dev/sdc: 1565565872 sectors, 746.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): AA9BEA51-54B9-4AC4-B090-FBD4928B52D7
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1565565838
Partitions will be aligned on 8-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34          262177   128.0 MiB   0C01  Microsoft reserved part
   2          264192        21235711   10.0 GiB    0700  Basic data partition
   3        21235712      5860530175   2.7 TiB     0700  Basic data partition

The disk size appears as 746 GB as it was MBR but it is GPT

gdisk -v

Problem: partition 3 is too big for the disk.

Warning! Secondary partition table overlaps the last partition by
4294964337 blocks!
You will need to delete this partition or resize it in another utility.

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 2 problems!

There is lot of information about internal drives but i cant find any useful information about GPT-USB drives in Ubuntu. Probably TrueCrypt cant mount it on Linux at all, but there is still the problem with the wrong size.

Thanks for any suggestions.

1
  • Is true Crypt installed in Ubuntu?
    – Mitch
    Jun 16, 2012 at 11:56

1 Answer 1

4

As a general rule, this symptom is almost always either a driver problem or a hardware problem.

What's happening is that something along the line is taking a 64-bit value and truncating that to 32 bits. This results in a drop of 2 TiB (2048 GiB) in the disk's apparent size, as reported by most disk utilities. Attempts to access beyond the 2 TiB mark are likely to "wrap around" to the front of the disk, resulting in incorrect reads or damage when the disk is written. Thus, you should NOT attempt to write to the disk until this problem is solved!

This problem is common on external disk enclosures with firmware that uses 32-bit fields to store critical sector information. It's generally necessary to replace such enclosures if you want to use an over-2TiB disk. Since you say that the disk works fine in Windows, though, this is most likely not the problem. One notable exception: If you prepared the disk in Windows as an internal drive and have since transferred it to an external enclosure, you could see the symptoms you report. The solution is to replace the enclosure with one capable of handling over-2TiB disks.

The other common cause of this symptom is a driver issue, but the usual problem reports in this case come from Windows users. Linux's USB disk stack has long supported over-2TiB external disks (with proper 64-bit firmware), and the driver stack is identical for most external disks. It could be that there's a bug in the specific kernel you're using, though, so you could try upgrading your kernel (or downgrading it to an earlier version, if you're using the latest version). There are also a handful of model-specific drivers in the kernel, and I don't know how they'd work (or fail to work) with over-2TiB disks.

In either case, another possible solution is to change interfaces. If the disk supports both USB and another interface, such as eSATA or FireWire, you could try the other interface. That might bypass whatever bug is causing the problem -- but you'll have to be very careful to never use the buggy interface if you do it this way!

As to TrueCrypt, I can't comment on it, since I have no experience with that technology. (Edit: If you've installed some TrueCrypt drivers in Linux, it's conceivable that they're the source of the problem and would have to be removed or upgraded to fix it.)

1
  • Thanks for your advice, Rob. As you said the problem was not Linux but the enclosure. I purchased a other one, partitioned the HDD again and this time it worked. If somebody wont to know: Ubuntu 12.04/64 + TrueCrypt with 3TB External USD-HDD formated in GUID/GPT works.
    – Frantisek
    Jun 20, 2012 at 21:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .