RES: RES: AS2105-based enclosure size issues with >2TB HDDs

Alfredo Dal Ava Junior
2014-08-25T19:51:45Z

On Mon, 15 Aug 2014 James Bottomley wrote:

> So how did the partition get on there at the correct size in the first place?
> Even under windows partition managers believe the disk size they get from
> the system if the disk is blank.

The HDD can be partitioned outside the enclosure, when connected directly to one SATA port on motherboard. READ_CAPACITY(16) will return properly when talking directly to the HDD.

> I assume for those of us on linux-scsi who don't have the start of this thread,
> you already tried read capacity(16) and it has this same problem?

Sorry, I forgot to include linux-scsi. On this device, READ_CAPACITY_16 fails 100% of times as unsupported command, then READ_CAPACITY_10 has a distinct behavior depending on HDD size:

1TB and 2TB: READ_CAPACITY_10 returns correct value
3TB and 4TB: READ_CAPACITY_10 returns in a 2TB modulus

> Hm, allowing users to set desired capacity by overriding the partition size ...
> I'm sure that's not going to cause support problems ...

Well, it is causing problems anyway... from user perspective, it's a Linux compatibility issue, as it works "fine" on Windows. I'm not an expert, but I'm wondering that if usb-storage could set capacity as "UNDETERMINED"/ Zero (or keep using the readcapacity_10 as it as with some flag signalizing it as inaccurate), EFI partition check would be able to ignore size and look for secondary GPT where it really is.

[]'s
Alfredo