[nSLUG] Advanced Format Disk (was: Best way to upgrade mirrored disks to larger capacity?)

George N. White III gnwiii at gmail.com
Thu May 19 16:46:17 ADT 2011

On Thu, May 19, 2011 at 2:59 PM, D G Teed <donald.teed at gmail.com> wrote:
> On Thu, May 19, 2011 at 2:37 PM, George N. White III <gnwiii at gmail.com>
> wrote:
>> I found this tidbit:
>> "Because of 63-sector legacy problems a bunch of ATA vendors will
>> initially ship 512/4096 drives that are not naturally aligned.
>> I.e. logical sector 63 will be aligned on a 4KB hardware sector
>> boundary to overcome the misaligned default partitioning. "
>>  -- <http://www.gossamer-threads.com/lists/linux/kernel/1039141>
>> This suggests that  "Logical Sector-0 offset" will be "1" for retail
>> desktop drives.
> Thanks for those bits of research, although I'm not finding matches
> with my "Blue" series WD drive.  The identify device info
> doesn't show anything about 4001h, and the alignment is zero.
> # sdparm --page=ai -HHH /dev/sdb | hdparm --Istdin
> ATA device, with non-removable media
>     Model Number:       WDC WD10EALX-009BA0
>     Serial Number:      WD-WCATR6952606
>     Firmware Revision:  15.01H15
>     Transport:          Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5,
> SATA Rev 2.6, SATA Rev 3.0
> [...]
>     Logical/Physical Sector size:           512 bytes

The relevant code in hdparm.identify.c is:

		if((val[106] & 0xc000) != 0x4000) {
			printf("\t%-31s %11u bytes\n","Logical/Physical Sector size:", sector_bytes);
		} else {
			unsigned int lsize = 256, pfactor = 1;
			if (val[106] & (1<<13))
				pfactor = (1 << (val[106] & 0xf));
			if (val[106] & (1<<12))
				lsize = (val[118] << 16) | val[117];
			sector_bytes = 2 * lsize;
			printf("\t%-31s %11u bytes\n","Logical  Sector size:", sector_bytes);
			printf("\t%-31s %11u bytes\n","Physical Sector size:", sector_bytes
* pfactor);
			if ((val[209] & 0xc000) == 0x4000) {
				unsigned int offset = val[209] & 0x1fff;
				printf("\t%-31s %11u bytes\n", "Logical Sector-0 offset:", offset
* sector_bytes);

so pfactor=1, e.g., this drive does not claim to have SATA Advanced
Format.   I think SATA Advanced Format is generally reserved for
drives > 1TB.  There have been other reports of drives that claim AF
on the box but have pfactor=1.  Makes you think the vendors are
worried about returns from XP users so configure pfactor=1 in drives
sold thru retail channels.  I know of other cases where OEM bulk
purchases get "better" hardware than you can thru retail channels, but
the vendors require that the OEM deal with support and returns.

claims to have found a way to "dynamically manage each individual
miss-alignment condition within the hard drive firmware and without
the host computer even knowing", so maybe newer drives just claim

George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia

More information about the nSLUG mailing list