On Tue, 28 Oct 2014, Alan Stern wrote: > On Tue, 28 Oct 2014, Dave Jones wrote: > > > > I had a USB2 enclosure that I put a disk into and used for a few years. > > It reports my 3TB drive like so.. > > ... > > sd 11:0:0:0: [sdc] 732566646 4096-byte logical blocks: (3.00 TB/2.72 TiB) > > sd 11:0:0:0: [sdc] Attached SCSI disk > > > > The difference in sector size reporting means it can't read the partition table. > > Is this a bug, or a hardware flaw ? > > It's probably neither one, but a difference in the way the two > enclosures buffer their data. It's hard to imagine how an enclosure > could claim to use 512-byte sectors if the drive itself had 4-KB > sectors, but the reverse is entirely possible. I wouldn't say the difference is related to the two enclosures buffer their data as such. For 512-byte-sector drives larger than 2TB, the MBR partitioning scheme can't be used because there are more than 2^32 sectors. That's not a huge problem for recent operating systems which understand GPT, but Windows XP and other older OSes (including Linux kernels I assume) won't be happy with it. The solution that some enclosures use, is to tell the host that the drive sector size is 4096 bytes, and the number of sectors is correspondingly reduced by a factor of 8. Then MBR partitioning works fine, so you can use the drive with older OSes. The SATA<->USB bridge chip firmware handles translating read/write requests. If the host requests, say, ten sectors starting at sector 1234, the enclosure firmware translates that to eighty 512-byte sectors starting at sector 9872 when it talks to the drive. You could investigate whether alternative firmware is available for your new enclosure, which doesn't emulate 4096-byte sectors. Some manufacturers have two versions available, with and without emulation. [A quick Google search suggests there is generic ASMedia firmware and a Windows firmware update tool.] Another advantage of emulating 4096-byte sectors relates to so-called "Advanced Format" drives. Most larger-than-2TB drives are Advanced Format. The drive's physical sector size is 4096 bytes, but for compatibility reasons the drive emulates having 512-byte sectors. If partitions are not aligned to a multiple of 8 (512 byte emulated) sectors, write performance can be badly reduced since for every write the drive has to read-modify-write to update partially-written 4096-byte sectors. With an enclosure that emulates 4096-byte sectors, misaligned accesses never occur; all drive reads and writes are aligned to an exact multiple of eight 512-byte sectors. Mark -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html