You are not logged in.

#1 2013-12-19 14:53:07

Zuiop
Member
Registered: 2013-03-06
Posts: 7

[SOLVED] GPT Partition detected or not depending on method of access

Hello everyone,

I have a 3 TB HDD which is connected either via a USB dock or an eSATA dock. Connecting it to the USB dock, everything works: its single partition shows up, I mount (cryptsetup) it, fine. But connecting it via eSATA shows no partitions. To investigate, I dd'ed the first megabytes to compare them. The results are:

- With the eSATA dock, reading the device file (i.e. /dev/sdb) shows that it starts with zeroes, then follows the GPT header at 0x1000 and the LUKS header at 0x100000.
- With the USB dock, /dev/sdb is identical to the eSATA dock.
- With the USB dock, /dev/sdb1 starts with the LUKS header.


Any more info upon request. What makes it so that the apparently identical device file once shows its partitions when connected via USB, and then showing none when connected with eSATA?


Cheers,
Zuiop

Last edited by Zuiop (2013-12-20 06:26:42)

Offline

#2 2013-12-19 14:59:22

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] GPT Partition detected or not depending on method of access

The only thing I can think of is that the design of the eSATA dock might somehow be incompatible with >2TB drives.

In any case, the relevant content of dmesg and/or the journal might be useful.


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#3 2013-12-19 15:32:15

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] GPT Partition detected or not depending on method of access

The usual cause of this problem is that the USB interface is translating the logical sector size from 512 bytes to 4096 bytes. With an altered sector size, all the partition table data get rearranged, references to partition start and end points become meaningless, and so on.

You can check this hypothesis by looking at the sector size data returned by parted, gdisk, or as stored in various system files. For instance:

parted /dev/sda print
Model: ATA Hitachi HDP72505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B

If that "Sector size" line, and particularly the first (logical) value, shows one thing for the disk attached one way and another for the disk attached another way, then my hypothesis is correct. If so, I know of only one solution, short of replacing the hardware: Use the disk via a single interface type. In theory, a manufacturer might offer a jumper or something to control this behavior, but I've never heard of this.

Offline

#4 2013-12-20 06:26:22

Zuiop
Member
Registered: 2013-03-06
Posts: 7

Re: [SOLVED] GPT Partition detected or not depending on method of access

You are perfectly correct, srs5694. Here's the fdisk -l output:

SATA
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
/dev/sdd1          1 732566645 366283322+ ee GPT

USB
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
/dev/sdd1   256    732566527   2.7T Microsoft basic data

And the total number of reported sectors is in the ratio SATA/USB = 8 = 4096/512.

I know the SATA dock works with 3TB drives, so I'll take srs5694's advice and stick with one interface per HDD. I'll mark the thread as solved, since at least I now understand the problem.
I might try the solution given here: http://superuser.com/questions/410606/l … b-or-direc should I need to access the drive with my eSATA dock.


Thank you very much for explaining the issue.

Offline

Board footer

Powered by FluxBB