Ubuntu – Can’t read partition table of 3TB USB disk

hard drivepartitioningsatausb

I've connected a 3TB disk via SATA and formatted it with a GPT partition table and added a single partition.

Now, after moving the disk into an external enclosure and connecting it via USB, the partition table won't be detected.

scsi 6:0:0:0: Direct-Access     WDC WD30 EFRX-68AX9N0     80.0 PQ: 0 ANSI: 5
sd 6:0:0:0: Attached scsi generic sg3 type 0
sd 6:0:0:0: [sdc] 732566646 4096-byte logical blocks: (3.00 TB/2.72 TiB)
sd 6:0:0:0: [sdc] Write Protect is off
sd 6:0:0:0: [sdc] Mode Sense: 43 00 00 00
sd 6:0:0:0: [sdc] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
sd 6:0:0:0: [sdc] 732566646 4096-byte logical blocks: (3.00 TB/2.72 TiB)
  sdc: unknown partition table
sd 6:0:0:0: [sdc] 732566646 4096-byte logical blocks: (3.00 TB/2.72 TiB)
sd 6:0:0:0: [sdc] Attached SCSI disk

It will work using the eSATA connection from the external enclosure. But not everybody has an eSATA port, so I need USB support too.

I've tried different Ubuntu and Kernel versions (12.04 with 3.2.0-52, 13.04 with 3.8.0-29, 13.04 with 3.9.0)

Ubuntu should support 3TB via USB shouldn't it?

EDIT:
Here is the log when I connect the disk via eSATA/SATA

scsi 5:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68A 80.0 PQ: 0 ANSI: 5
sd 5:0:0:0: Attached scsi generic sg2 type 0
sd 5:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
sd 5:0:0:0: [sdc] 4096-byte physical blocks
sd 5:0:0:0: [sdc] Write Protect is off
sd 5:0:0:0: [sdc] Mode Sense: 00 3a 00 00
sd 5:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
  sdc: sdc1
sd 5:0:0:0: [sdc] Attached SCSI disk

Best Answer

The problem is this, from your post:

sd 6:0:0:0: [sdc] 732566646 4096-byte logical blocks: (3.00 TB/2.72 TiB)

When connecting your disk via USB, the enclosure is translating its 512-byte logical blocks into 4096-byte logical blocks. This completely messes up the partition table created when you used the disk internally (or via the eSATA port). Translations like this make the disk usable with the older MBR partitioning system, and so are fairly common on external disks. In this case, though, it's effectively a bug. IMHO, any translation applied by the enclosure to a USB interface but not to an eSATA interface is a bug, since it locks the disk into use by the interface that was used to partition the disk. (Note that switching from GPT to MBR won't help, since both partition table types define partitions by sector values, which are inconstant between the interface types.) Note that this is a problem with the enclosure's firmware, not in Linux.

You might want to check the documentation (including anything you can find from the enclosure's manufacturer online) for information on disabling this feature. If you're lucky, there'll be a DIP switch or some way to reprogram the USB interface from your computer to disable this translation.

If that fails, your best option, given your needs, is to exchange the enclosure for one that doesn't do this translation, or that applies it to all interfaces. (I'm not sure if it's technically possible to apply such a translation to an eSATA port, though.) You could do this by returning the enclosure to the store or possibly by swapping the disk with another enclosure. If you're lucky, the enclosure will only apply this rule to disks that are over 2TiB in size, so swapping disks with a smaller external disk might fix the problem. Beware, though: Some USB enclosures can't handle over-2TiB disks at all, so you could just make matters worse.

If you can't replace the enclosure, then you'll just have to deal with it -- decide whether you want to use USB or eSATA, tape over the one you don't want to use, and live with it. If you use USB, you'll need to wipe the partition table and repartition the disk.

Related Question