sho*_*ner 47 sector hard-drive windows-7
如何在Windows 7中确定物理扇区大小(例如,如果我有一个具有4,096字节扇区的高级格式驱动器而不是传统的512字节扇区)?
我知道通过单击文件并获取属性我们可以找到NTFS 群集大小,但这与硬盘驱动器的扇区大小不同.
注意:我们询问Windows 7,因为它(和Windows Vista SP1)了解4096高级格式化硬盘的存在.
Chr*_*ler 61
你想要fsutil.确保以管理员身份运行命令提示符.
C:\Windows\system32>fsutil fsinfo ntfsinfo c:
NTFS Volume Serial Number : 0xf4ca5d7cca5d3c54
Version : 3.1
Number Sectors : 0x00000000378fd7ff
Total Clusters : 0x0000000006f1faff
Free Clusters : 0x00000000000e8821
Total Reserved : 0x0000000000000910
Bytes Per Sector : 512
Bytes Per Physical Sector : 512
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length : 0x00000000196c0000
Mft Start Lcn : 0x00000000000c0000
Mft2 Start Lcn : 0x000000000097ffff
Mft Zone Start : 0x000000000051f920
Mft Zone End : 0x000000000051f9a0
RM Identifier: 0652C3D3-7AA9-11DA-ACAC-C80AA9F2FF32
Run Code Online (Sandbox Code Playgroud)
Ian*_*oyd 28
我想扩展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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
也不是Partition:
wmic:root\cli>partition get BlockSize, StartingOffset, Name, Index
BlockSize Index Name StartingOffset
512 0 Disk #0, Partition #0 1048576
Run Code Online (Sandbox Code Playgroud)
可以报告基础物理扇区的大小.当您意识到它们都报告Windows正在使用的扇区大小时,这是有意义的.这是每扇区512个字节-驱动器恰好是不同的内部.
那是因为只有Windows 8支持使用 4k扇区.Windows 7了解驱动器可能是4k,并且可以将其4k 群集与硬盘驱动器的底层4k 扇区对齐.
Gre*_*gor 27
Windows 10更新:
现在有一个sectorInfo子命令可以提供更好的信息:
C:\>fsutil fsinfo sectorInfo C:
LogicalBytesPerSector : 512
PhysicalBytesPerSectorForAtomicity : 4096
PhysicalBytesPerSectorForPerformance : 4096
FileSystemEffectivePhysicalBytesPerSectorForAtomicity : 4096
Device Alignment : Aligned (0x000)
Partition alignment on device : Aligned (0x000)
Performs Normal Seeks
Trim Not Supported
Run Code Online (Sandbox Code Playgroud)
小智 13
如果您想以编程方式使用它,则需要从结构中发送IOCTL_DISK_GET_DRIVE_GEOMETRY_EX和使用Geometry.BytesPerSectorDISK_GEOMETRY_EX
您可以从命令行使用wmic:
C:\Windows\System32\wmic partition get BlockSize, StartingOffset, Name, Index
BlockSize Index Name StartingOffset
512 0 Disk #0, Partition #0 32256
512 1 Disk #0, Partition #1 370195176960
Run Code Online (Sandbox Code Playgroud)
该BlockSize是驱动器的扇区大小。
小智 5
电源外壳:
$wql = "SELECT Label, Blocksize, Name FROM Win32_Volume WHERE FileSystem='NTFS'"
Get-WmiObject -Query $wql -ComputerName '.' | Select-Object Label, Blocksize, Name
Run Code Online (Sandbox Code Playgroud)
输出示例:
Label Blocksize Name
----- --------- ----
OSDisk 4096 C:\
Windows RE Tools 4096 \\?\Volume{b042c778-cd66-4381-9312-3f4311321675}\
PS C:\>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
150226 次 |
| 最近记录: |