i am trying to query the physical sector size of my drive using fsutil
:
C:\Windows\system32>fsutil fsinfo ntfsinfo c:
NTFS Volume Serial Number : 0x78cc11b2cc116c1e
Version : 3.1
Number Sectors : 0x000000003a382fff
Total Clusters : 0x00000000074705ff
Free Clusters : 0x00000000022fc29b
Total Reserved : 0x00000000000007d0
Bytes Per Sector : 512
Bytes Per Physical Sector : <Not Supported>
Bytes Per Cluster : 4096
Bytes Per FileRecord Segment : 1024
Clusters Per FileRecord Segment : 0
Mft Valid Data Length : 0x00000000305c0000
Mft Start Lcn : 0x00000000000c0000
Mft2 Start Lcn : 0x0000000003a382ff
Mft Zone Start : 0x0000000006951940
Mft Zone End : 0x0000000006951c80
RM Identifier: 19B22CBE-570D-19DE-9C72-CD758F800DDC
You can see that the Bytes Per Physical Sector
value is Not Supported:
Bytes Per Physical Sector : <Not Supported>
In the KB Article Microsoft support policy for 4K sector hard drives in Windows, Microsoft says:
If fsutil.exe continues to display "Bytes Per Physical Sector : <Not Supported>" after you apply the latest storage driver and the required hotfixes, make sure that the following registry path exists:
HKLM\CurrentControlSet\Services\<miniport’s service name>\Parameters\Device\ Name: EnableQueryAccessAlignment Type: REG_DWORD Value: 1: Enable
The only thing i don't know is what my Miniport's service name
is.
What is my miniport's service name.
i know that my SATA drives are in AHCI
mode, and AHCI uses the msahci
driver service:
Is that my miniport service? "MSAHCI"?
Bonus Chatter
The following script can detect if your partitions are not correctly aligned on a 4,096 byte boundary:
CheckHardDriveAlignment.vbs
:
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_DiskPartition")
For Each objItem in ColItems
offset = (objitem.startingoffset / 4096)
If Clng(offset) = offset then
wscript.echo objitem.DeviceID & ": startingOffset=" & objitem.startingoffset & " is a multiple of 4,096 bytes. The partition IS aligned correctly."
Else
wscript.echo objitem.DeviceID & ": startingOffset " & objitem.startingoffset & " is NOT a multiple of 4,096 bytes. The partition is NOT aligned correctly. (It's off by " & objitem.startingoffset Mod 4096 & " bytes)"
End If
Next
Which is only important if you have an Advanced Format (i.e. 4,096 byte per sector) drive. If the drive was partitioned in Windows Vista SP1 or later then it will already be aligned correctly (Windows, starting with Vista SP1, understands AF drives). You can use an Hitachi tool to correct alignment issues if the drive was partitioned by Windows XP, or suffered PartitionMagic or a clone operation.
See also
- Hitachi - Advanced Format Technology Brief
- RMPrepUSB - Advanced Format (4K sector) hard disks
- Microsoft support policy for 4K sector hard drives in Windows
- OSR Online - Advance Disk Format support in Storport Virtual Mniport diver
- Default cluster size for NTFS, FAT, and exFAT
- Wikipedia - Advanced Format