How can I determine the sector size in windows?

后端 未结 8 556
时光取名叫无心
时光取名叫无心 2020-12-22 23:01

How can I determine the Physical Sector Size (e.g. if i have an Advanced Format drive with 4,096 byte sectors rather than the legacy 512 byte sectors) in Wi

8条回答
  •  执笔经年
    2020-12-22 23:50

    i wanted to expand on Chris Gessler's answer, and note that there is no known way to get the Physical sector of a drive using Windows Management Instrumentation (WMI), e.g. wmic.

    Given that i have an Advanced Format drive (i.e. it uses 4,096 bytes per sector rather than 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
    

    Neither WMI's DiskDrive:

    wmic:root\cli>diskdrive
    Availability  BytesPerSector  Capabilities  CapabilityDescriptions                                       Caption
                  512             {3, 4, 10}    {"Random Access", "Supports Writing", "SMART Notification"}  ST1000DM003-9YN162 ATA Device
    

    nor Partition:

    wmic:root\cli>partition get BlockSize, StartingOffset, Name, Index
    BlockSize  Index  Name                   StartingOffset
    512        0      Disk #0, Partition #0  1048576
    

    can report the underlying physical sector size. It makes sense when you realize they both report the sector size that Windows is using. It is 512 bytes per sector - the drive just happens to be different inside.

    That's because only Windows 8 supports use of 4k sectors. Windows 7 understands that the drive might be 4k, and works to align it's 4k Clusters with the hard-drive's underlying 4k Sectors.

提交回复
热议问题