我目前正在开发与原始磁盘操作交互的内核模式驱动程序。
我想更多地了解扇区大小的概念。
扇区大小是否是在制造 HDD 时设置的每个物理驱动器的恒定值?
或者它是由在磁盘上格式化的文件系统定义的?如果是这样,它们可以是 2 个扇区大小吗?一种用于物理磁盘,一种用于文件系统?
例如,我知道 NTFS 在其 BIOS 参数块中有一个名为“扇区大小”的 DWORD,这是 NTFS FS 扇区大小吗?还是物理硬盘扇区大小?
非常感谢
迈克尔
最佳答案
是的,扇区大小由驱动器制造商确定。
根据维基百科:
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
硬盘驱动器通常带有 512 字节扇区。直到 2011 年 1 月,硬盘制造商一致转向 4k 扇区。
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/
查询设备的扇区大小是不可靠的。驱动器报告错误的扇区大小的情况并不少见。
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
关于kernel - 了解硬盘扇区大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17533474/