Advanced Format Hard Disk

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
srg4096
Posts: 7
Joined: Sun Apr 04, 2010 3:12 pm

Advanced Format Hard Disk

Post by srg4096 »

Hi all

Soon we're going to start seeing hard disks with the "Advanced Format" which depending on the type, will have 4KiB sectors. Have you people seen any proper documentation on how to interact with these drives, or detect what the drive's sector size is?

There is some developer kit thing, bit i have no idea if it costs lots money, or is this stuff written into the latest ATA spec?

thanks
srg
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Advanced Format Hard Disk

Post by Combuster »

CDs have non-512-byte sectors, SCSI supports non-512-byte sectors, so if you have a SCSI or ATAPI harddisk then it may technically present itself as a 4k device already.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: Advanced Format Hard Disk

Post by bewing »

From the specs I have seen, the 4K sectoring is entirely internal and is completely invisible from outside the disk. Externally, the disk still represents itself as an entirely normal 512b sectored disk.
srg4096
Posts: 7
Joined: Sun Apr 04, 2010 3:12 pm

Re: Advanced Format Hard Disk

Post by srg4096 »

bewing wrote:From the specs I have seen, the 4K sectoring is entirely internal and is completely invisible from outside the disk. Externally, the disk still represents itself as an entirely normal 512b sectored disk.
Ahh that's the 512e (e for emulation version). I was thinking more along the lines of 4kn, which is native 4KB sectors.

http://en.wikipedia.org/wiki/Advanced_Format
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Advanced Format Hard Disk

Post by Brendan »

Hi,
srg4096 wrote:Soon we're going to start seeing hard disks with the "Advanced Format" which depending on the type, will have 4KiB sectors. Have you people seen any proper documentation on how to interact with these drives, or detect what the drive's sector size is?

There is some developer kit thing, bit i have no idea if it costs lots money, or is this stuff written into the latest ATA spec?
It's in "Information technology - AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS)". For the IDENTIFY DEVICE command, see word 106 (Physical sector size / logical sector size), words 117 and 118 (Logical sector size) and word 209 (Alignment of logical blocks within a physical block).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
srg4096
Posts: 7
Joined: Sun Apr 04, 2010 3:12 pm

Re: Advanced Format Hard Disk

Post by srg4096 »

Brendan wrote:Hi,

It's in "Information technology - AT Attachment 8 - ATA/ATAPI Command Set (ATA8-ACS)". For the IDENTIFY DEVICE command, see word 106 (Physical sector size / logical sector size), words 117 and 118 (Logical sector size) and word 209 (Alignment of logical blocks within a physical block).


Cheers,

Brendan
Thanks, so it's really not a big issue, just need to ask the drive using already provided commands rather than just assuming 512k sectors. I didn't know if this meant changes to specs, it appears it doesn't.

Thanks!
Ready4Dis
Member
Member
Posts: 571
Joined: Sat Nov 18, 2006 9:11 am

Re: Advanced Format Hard Disk

Post by Ready4Dis »

You shouldn't be assuming 512 byte sectors to begin with, then your code would just keep working as normal... :).
User avatar
qw
Member
Member
Posts: 792
Joined: Mon Jan 26, 2009 2:48 am

Re: Advanced Format Hard Disk

Post by qw »

srg4096 wrote:Thanks, so it's really not a big issue, just need to ask the drive using already provided commands rather than just assuming 512k sectors.
512 kilobytes?
Post Reply