我想扩展 Chris Gessler 的回答,并注意没有已知的方法可以使用 Windows Management Instrumentation (WMI) 获取驱动器的 物理 扇区,例如wmic.
鉴于我有一个高级格式驱动器(即它使用每个扇区 4,096 字节而不是 512 字节):
C:\Windows\system32>fsutil fsinfo ntfsinfo d:
NTFS Volume Serial Number : 0xa016d8a616d87eaa
Version : 3.1
Number Sectors : 0x00000000747057ff
Total Clusters : 0x000000000e8e0aff
Free Clusters : 0x000000000e7b2813
Total Reserved : 0x0000000000000000
Bytes Per Sector : 512
Bytes Per Physical Sector : 4096
WMI 的DiskDrive:
wmic:root\cli>diskdrive
Availability BytesPerSector Capabilities CapabilityDescriptions Caption
512 {3, 4, 10} {"Random Access", "Supports Writing", "SMART Notification"} ST1000DM003-9YN162 ATA Device
也不是Partition:
wmic:root\cli>partition get BlockSize, StartingOffset, Name, Index
BlockSize Index Name StartingOffset
512 0 Disk #0, Partition #0 1048576
可以报告基础物理扇区大小。当您意识到它们都报告 Windows 正在使用的扇区大小时,这是有道理的。它是每个扇区 512 字节 - 驱动器恰好内部不同。
这是因为只有 Windows 8 支持使用 4k 扇区。 Windows 7 了解驱动器可能是 4k,并努力将其 4k 集群与硬盘驱动器的底层 4k 扇区。
更新
wmic diskdrive 现在确实在 Bytes per Sector 中显示每个扇区的物理字节:
C:\Windows\system32>wmic
wmic:root\cli>diskdrive
Availability BytesPerSector Capabilities CapabilityDescriptions
4096 {3, 4} {"Random Access", "Supports Writing"}
虽然wmic partition 仍然是错误的。
Windows 10.0.19041.804