How can I determine the sector size on an external hard drive?

Run wmic partition get BlockSize, StartingOffset, Name, Index from a Windows Command Prompt. The output looks like:

BlockSize  Index  Name                   StartingOffset
512        0      Disk #0, Partition #0  1048576
512        1      Disk #0, Partition #1  105906176
512        0      Disk #1, Partition #0  32256

Where block size is the drive's sector size. It unfortunately doesn't list the drive letter.

Also as I understand the article, the drive will still list that it has 512 byte sectors even though internally it uses 4kb sectors. So the only way may be to get the drive's spec sheet.


I just verified this with WMIC on my windows XP box. This is the query:

C:\>wmic DISKDRIVE get bytespersector, caption  
BytesPerSector  Caption  
512             WDC WD1600AAJS-60M0A0  
4096            TrekStor HDD USB Device

The newer Toshiba external disk is reported as 4096 bytes.


I know that you dont use linux, but just for the record:

smartctl -i /dev/...

shows

Sector Size:      512 bytes logical/physical

Windows XP works just fine with modern drives that have 4096 bytes per physical sector. The main issue is that a drive with 4096 bytes per physical sector and 512 bytes per logical sector (512-byte emulation or "512e") will perform sub-optimally if the partitions aren't aligned with physical sectors. Windows XP's built-in partitioning tools don't do the proper alignment for these modern drives. To partition a drive with proper alignment, do the partitioning in a newer operating system, or using a modern 3rd-party tool or a tool provided by the hard drive vendor. This is advised regardless of whether the drive uses 512 or 4096 bytes per physical sector.

You can check the alignment of existing partitions using msinfo32 (Windows XP and later):

  • msinfo32.exe > Components > Storage > Disks > Partition Starting Offset (make sure it's a multiple of the physical sector size, or a multiple of 1,048,576 bytes for SSDs)

There are three different sector sizes of concern: a drive's physical sector size, a drive's logical sector size, and the logical sector size presented to the host computer. The logical sector size presented to the host computer can be different from a drive's logical sector size if the drive is connected via a bridge that does sector size translation. External USB drives often do translation from 512 bytes per logical sector at the SATA interface with the drive inside the enclosure to 4096 bytes per logical sector at the USB interface with the host computer. This translation enables Windows XP to use more than 2 TB of a drive.

fsutil in Windows 10 can tell you a drive's physical sector size and the logical sector size presented to the host computer:

C:> fsutil fsinfo sectorInfo c:
LogicalBytesPerSector :                                 512
PhysicalBytesPerSectorForAtomicity :                    4096
PhysicalBytesPerSectorForPerformance :                  4096
FileSystemEffectivePhysicalBytesPerSectorForAtomicity : 4096
Device Alignment :                                      Aligned (0x000)
Partition alignment on device :                         Aligned (0x000)

To get the logical & physical sector sizes of a SATA drive behind a USB bridge, you can pass a SMART query through the bridge to the SATA drive using smartctl (included in the GSmartControl package for Windows):

C:\Program Files\GSmartControl> smartctl -a -d sat pd11
smartctl 6.5 2016-05-07 r4318 [i686-w64-mingw32-xp-sp3] (sf-6.5-1)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Green
...
Sector Sizes:     512 bytes logical, 4096 bytes physical

None of Windows XP's built-in tools can get the physical sector size of a drive. You need to use smartctl or a similar tool to query the drive.

To get the logical sector size of a drive as presented to the host computer:

  • msinfo32.exe > Components > Storage > Disks > Bytes/Sector. (works in Windows XP and later)
  • wmic DISKDRIVE get bytespersector, caption (Works in Windows XP only)
  • fsutil fsinfo ntfsinfo c: ("Bytes per sector". Works in Windows XP and later)
  • fsutil fsinfo sectorInfo c: ("LogicalBytesPerSector". Works in Windows 10 and later)

Many external USB Western Digital drives over 2 TB can be configured for Windows XP compatibility by changing the logical sector size presented to the host computer.


You can do this via a command prompt. Open up CMD (Windows+r then type cmd) and run chkdsk driveletter: chkdsk c: It will be listed as x bytes in each allocation unit.

alt text