# 磁盘扇区

磁盘扇区是磁盘驱动器上最小的可寻址存储单元，是数据被物理写入和读取的固定大小数据块。在硬盘驱动器上，扇区历来容纳512字节的用户数据；自2010年前后起，大多数驱动器已在[高级格式](https://www.edgepedia.org/zh/advanced-format)化（Advanced Format）标准下转向4,096字节（4K）物理扇区，但通常仍向操作系统呈现512字节的逻辑扇区。<sup>[1](https://www.ibm.com/support/pages/understanding-hard-drive-media-defects-white-paper-servers)</sup><sup> • </sup><sup>[2](https://www.seagate.com/blog/advanced-format-4k-sector-hard-drives-master-ti/)</sup>

| 关键事实 | 详情 |
|---|---|
| 定义 | 扇区是磁盘驱动器上最小的可寻址单元，数据即驻留于此；传统扇区长度为512字节<sup>[1](https://www.ibm.com/support/pages/understanding-hard-drive-media-defects-white-paper-servers)</sup> |
| 传统布局 | 每个512字节扇区包含间隙区、同步区、地址标记区、数据区和ECC区<sup>[2](https://www.seagate.com/blog/advanced-format-4k-sector-hard-drives-master-ti/)</sup> |
| 高级格式化 | 2010年前后，业界从512字节扇区迁移至4,096字节扇区，国际磁盘驱动器设备与材料协会将其命名为高级格式化；八个512字节数据区合并为一个4K数据字段<sup>[2](https://www.seagate.com/blog/advanced-format-4k-sector-hard-drives-master-ti/)</sup><sup> • </sup><sup>[3](https://www.seagate.com/files/www-content/product-content/enterprise-performance-savvio-fam/enterprise-performance-15k-hdd/_cross-product/_shared/doc/seagate-fast-format-white-paper-04tp699-1-1701us.pdf)</sup> |
| 效率提升 | 4K结构可回收盘片物理空间的7%至11%，并将ECC字段从50字节提升至100字节<sup>[3](https://www.seagate.com/files/www-content/product-content/enterprise-performance-savvio-fam/enterprise-performance-15k-hdd/_cross-product/_shared/doc/seagate-fast-format-white-paper-04tp699-1-1701us.pdf)</sup> |
| 逻辑与物理 | 512e驱动器在4 KB物理扇区之上报告512字节逻辑扇区；4Kn驱动器则两者均报告4 KB<sup>[4](https://learn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update)</sup> |
| 寻址方式 | 扇区通过CHS（柱面、磁头、扇区）或逻辑块寻址（LBA）进行寻址，LBA 0等同于CHS 0/0/1<sup>[5](https://www.seagate.com/support/disc/manuals/ata/d1153r17.pdf)</sup> |
| CHS字段限制 | 扇区号从1到最多255，磁头号从0到最多15，柱面号从0到最多65,535<sup>[5](https://www.seagate.com/support/disc/manuals/ata/d1153r17.pdf)</sup> |

## 物理结构

硬盘表面沿半径方向被划分为同心磁道，每条磁道又被划分为若干扇区；扇区正是数据驻留之处。<sup>[1](https://www.ibm.com/support/pages/understanding-hard-drive-media-defects-white-paper-servers)</sup> 传统的512字节扇区格式包含五个部分：分隔扇区的间隙区、标记扇区起始并提供时序对齐的同步区、标识扇区编号与位置并提供扇区状态信息的地址标记区、存放用户数据的数据区，以及包含用于修复读写过程中受损数据的纠错码的ECC区。<sup>[2](https://www.seagate.com/blog/advanced-format-4k-sector-hard-drives-master-ti/)</sup>

**扇区大小为何增长。** 随着面密度提高、驱动器容量达到数太字节级别，为应对不断下降的信噪比所需的纠错码变得空间效率低下，512字节扇区日益限制容量和纠错效率。<sup>[2](https://www.seagate.com/blog/advanced-format-4k-sector-hard-drives-master-ti/)</sup> 高级格式化布局保留相同的间隙、同步和地址标记字节，但将八个512字节数据区合并为单个4,096字节数据字段，消除了每个512字节块之间的冗余头部区域，并将ECC字段从50字节扩大到100字节，以支持改进的纠错算法。<sup>[3](https://www.seagate.com/files/www-content/product-content/enterprise-performance-savvio-fam/enterprise-performance-15k-hdd/_cross-product/_shared/doc/seagate-fast-format-white-paper-04tp699-1-1701us.pdf)</sup> 由此得到的格式效率约为97%（4096/(4096 + 115)），而传统布局约为88%（512/(512 + 65)），回收的空间相当于盘片物理面积的7%至11%。<sup>[3](https://www.seagate.com/files/www-content/product-content/enterprise-performance-savvio-fam/enterprise-performance-15k-hdd/_cross-product/_shared/doc/seagate-fast-format-white-paper-04tp699-1-1701us.pdf)</sup> 业界选择4K块长度的部分原因在于，它与处理器及某些操作系统使用的分页大小以及关系数据库系统中标准事务的大小相匹配。<sup>[3](https://www.seagate.com/files/www-content/product-content/enterprise-performance-savvio-fam/enterprise-performance-15k-hdd/_cross-product/_shared/doc/seagate-fast-format-white-paper-04tp699-1-1701us.pdf)</sup>

## 逻辑扇区与物理扇区大小

现代驱动器报告两种大小。逻辑扇区大小是存储设备能够寻址的最小单元，通常为512字节；物理扇区大小是设备能够原子写入的最小单元，可能更大。<sup>[6](https://www.kernel.org/pub/linux/utils/util-linux/v2.30/libblkid-docs/libblkid-Topology-information.html)</sup> 在向4K扇区过渡的过程中出现了两种介质类型：4 KB原生（4Kn），将4 KB同时作为逻辑和物理扇区大小呈现，不设仿真层；以及512字节仿真（512e），将512字节作为逻辑扇区大小呈现，同时提供4 KB物理大小。<sup>[4](https://learn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update)</sup> 微软的支持表列出：512n在所有Windows版本中均受支持，512e自Windows 7 SP1和Windows Server 2008 R2 SP1起受支持（更早版本需安装热修复补丁），4Kn自[Windows 8](https://www.edgepedia.org/zh/windows-8)和[Windows Server 2012](https://www.edgepedia.org/zh/windows-server-2012)起受支持。<sup>[4](https://learn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update)</sup>

**读取-修改-写入。** 512e磁盘只能以其物理扇区为单位进行写入，因此系统发出的512字节写入无法直接写入。驱动器转而执行读取-修改-写入（RMW）循环：它将4 KB物理扇区读入内部缓存，修改缓冲区以纳入更新后的512字节扇区，再将更新后的4 KB缓冲区写回物理扇区。<sup>[7](https://learn.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/storage-io-performance)</sup> 性能代价取决于工作负载，而该循环还有可靠性代价：由于大多数硬盘采用原地更新，一次被中断的覆写可能损坏整个物理扇区，可能丢失其包含的全部八个逻辑扇区，从而使应用程序无法从提交记录中恢复其数据存储。<sup>[4](https://learn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update)</sup> 应用程序通过查询物理扇区大小并使写入与之对齐来避免这两个问题，例如将提交记录填充至物理扇区大小。<sup>[4](https://learn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update)</sup>

## 扇区寻址

传统方案是柱面-磁头-扇区（CHS）寻址，通过柱面号、磁头号和扇区号定位扇区。在ATA标准中，各字段有界限：扇区编号从1到最多255，磁头从0到最多15，柱面从0到最多65,535。<sup>[5](https://www.seagate.com/support/disc/manuals/ata/d1153r17.pdf)</sup> 由于现代驱动器超出这些限制或采用分区记录（每个区每磁道扇区数不同），驱动器在其设备识别数据中报告的几何结构是驱动器执行的逻辑转换；结合DOS的限制和传统IDE寄存器定义，这一转换将DOS可访问容量限制在528 MB。<sup>[8](https://www.seagate.com/support/disc/manuals/ata/1621pma.pdf)</sup>

逻辑块寻址（LBA）用从0开始的单一线性编号取代三段式地址。在ATA下，LBA 0与CHS柱面0、磁头0、扇区1是同一个扇区，且给定逻辑扇区的LBA地址不因当前生效的CHS转换而改变。对于不超过16,514,064的LBA编号，其关系为：

\[ \mathrm{LBA} = ((C \cdot H_{\mathrm{pc}}) + H) \cdot S_{\mathrm{pt}} + S - 1 \]

其中 \( H_{\mathrm{pc}} \) 为每柱面磁头数，\( S_{\mathrm{pt}} \) 为当前转换下每磁道扇区数。<sup>[5](https://www.seagate.com/support/disc/manuals/ata/d1153r17.pdf)</sup> 主机通过设备/磁头寄存器中的LBA位为每条命令选择CHS或LBA，设备必须对所有介质访问命令支持LBA。<sup>[5](https://www.seagate.com/support/disc/manuals/ata/d1153r17.pdf)</sup> 在早期IDE驱动器中，LBA寄存器提供28位地址空间，可处理最多128 GB的数据。<sup>[8](https://www.seagate.com/support/disc/manuals/ata/1621pma.pdf)</sup> 在驱动器内部，硬件将LBA转换为实际物理位置，这使驱动器制造商无需操作系统介入即可优化磁头、柱面和扇区数。<sup>[9](https://booksite.elsevier.com/samplechapters/9780750661256/Chap-01.pdf)</sup>

## 扇区计数与备用容量

扇区算术将容量与扇区数联系起来：一个以512字节扇区格式化的4.5 GB驱动器包含8,789,062个扇区。<sup>[1](https://www.ibm.com/support/pages/understanding-hard-drive-media-defects-white-paper-servers)</sup> 驱动器实际包含的扇区多于标称容量，因为无法制造完美的介质；制造过程中因磁性涂层缺陷或凹坑而发现不可用的扇区会被重新分配到驱动器其他位置的备用扇区，因此驱动器在其整个寿命期内保持标称容量。<sup>[1](https://www.ibm.com/support/pages/understanding-hard-drive-media-defects-white-paper-servers)</sup>

某些驱动器可以在现场更改其逻辑扇区大小。例如，希捷（Seagate）的Exos 7E8支持512E或4KN逻辑扇区格式，并通过设置扇区配置扩展命令在两者之间转换，更改在命令完成时立即生效；出厂默认格式为512E。<sup>[10](https://www.seagate.com/www-content/product-content/enterprise-hdd-fam/enterprise-capacity-3-5-hdd-10tb/_shared/docs/100840703h.pdf)</sup>

## References

1. [Understanding hard drive media defects white paper, IBM](https://www.ibm.com/support/pages/understanding-hard-drive-media-defects-white-paper-servers)
2. [Transition to Advanced Format 4K Sector Hard Drives, Seagate](https://www.seagate.com/blog/advanced-format-4k-sector-hard-drives-master-ti/)
3. [FastFormat Technology Helps Future-Proof Systems, Seagate white paper TP699](https://www.seagate.com/files/www-content/product-content/enterprise-performance-savvio-fam/enterprise-performance-15k-hdd/_cross-product/_shared/doc/seagate-fast-format-white-paper-04tp699-1-1701us.pdf)
4. [Advanced format (4K) disk compatibility update, Microsoft Learn](https://learn.microsoft.com/en-us/windows/compatibility/advanced-format-disk-compatibility-update)
5. [T13/1321D revision 3, ATA/ATAPI-6 draft, Seagate-hosted PDF](https://www.seagate.com/support/disc/manuals/ata/d1153r17.pdf)
6. [Topology information, libblkid Reference Manual, kernel.org](https://www.kernel.org/pub/linux/utils/util-linux/v2.30/libblkid-docs/libblkid-Topology-information.html)
7. [Hyper-V storage I/O performance, Microsoft Learn](https://learn.microsoft.com/en-us/windows-server/administration/performance-tuning/role/hyper-v-server/storage-io-performance)
8. [ATA Technical Reference Manual, Register Addresses and Functions, Seagate](https://www.seagate.com/support/disc/manuals/ata/1621pma.pdf)
9. [Disk addressing, Elsevier sample chapter](https://booksite.elsevier.com/samplechapters/9780750661256/Chap-01.pdf)
10. [Seagate Exos 7E8 SATA Product Manual, Rev. H](https://www.seagate.com/www-content/product-content/enterprise-hdd-fam/enterprise-capacity-3-5-hdd-10tb/_shared/docs/100840703h.pdf)

---
*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Sep 30, 2026; Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 计算机硬件 › Storage devices & memory › Magnetic & mechanical storage › HDD recording technology

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/disk-sector

English original: https://www.edgepedia.org/disk-sector
