I'm currently developing a kernel mode driver that interacts with raw disk operations.
I wish to understand more about the concept of Sector Size. Is a sector size a constant value per physical drive that was set when the HDD was manufactured ?
Or is it defined by the file system that is formatted on the Disk ? If so can they be 2 Sector Size ? One for the physical disk and one for the File System ?
I know for example that NTFS has in its BIOS Parameter Block a DWORD called "sector size", is this the NTFS FS sector size ? Or is it the Physical HDD sector size ?
Thanks a lot Michael
Yes, the sector size is established by the drive manufacture.
According to wikipedia:
The standard sector size of 512 bytes for magnetic disks was established with the inception of the hard disk drive in 1956 http://en.wikipedia.org/wiki/Disk_sector
Hard drives have typically been shipped with 512 byte sectors. That was until January 2011, when hard drive manufactures unanimously switched to 4k sectors.
As all hard drive manufacturers have agreed to transition to the Advanced Format sector design by January 2011 http://www.seagate.com/tech-insights/advanced-format-4k-sector-hard-drives-master-ti/
Querying the device for its sector size is not reliable. It is not uncommon for drives report the wrong sector size.
Unfortunately, some HDD manufacturers do not properly respond to the device inquiry sizes. ... The problem is that some HDDs misrepresent 4KB sector disks as having a physical sector size of 512 bytes. http://wiki.illumos.org/plugins/viewsource/viewpagesrc.action?pageId=1147716
http://en.wikipedia.org/wiki/Advanced_Format
http://www.tomshardware.com/forum/274376-32-change-sector-size-4096