0

Cannot use file 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\Template Data\master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 32768. Move the file to a volume with a sector size that is the same as or smaller than the original sector size.

That's the error. fsutil output looks like

C:\windows\system32>fsutil fsinfo sectorinfo c:
LogicalBytesPerSector : 512
PhysicalBytesPerSectorForAtomicity : 32768
PhysicalBytesPerSectorForPerformance : 32768
FileSystemEffectivePhysicalBytesPerSectorForAtomicity : 4096
Device Alignment : Aligned (0x000)
Partition alignment on device : Aligned (0x000)
No Seek Penalty
Trim Supported
Not DAX capable
Not Thinly-Provisioned

Other versions of MS SQL Server return similar errors. Only thing I've found on this was about 10 years ago someone hit it and Microsoft determined Dell was releasing a BIOS update for it. But.. 10 years ago and this is an HP with a Samsung 991 NVMe drive.

mustaccio
  • 28,207
  • 24
  • 60
  • 76
Jason Hanna
  • 11
  • 1
  • 2

1 Answers1

1

Might be on to something here...I had to do some registry changes and now I can see:

LogicalBytesPerSector : 512
PhysicalBytesPerSectorForAtomicity : 4096
PhysicalBytesPerSectorForPerformance : 4096
FileSystemEffectivePhysicalBytesPerSectorForAtomicity : 4096
Device Alignment : Aligned (0x000)
Partition alignment on device : Aligned (0x000)
No Seek Penalty
Trim Supported
Not DAX capable
Not Thinly-Provisioned

I'm removing SQL Server and reinstalling, because after this, SQL Server still wouldn't start, but with different errors and honestly, I don't think it installed properly/fully the first go around anyway.

This page has some info about the sector sizes. Under Resolutions there's a registry entry that you can use to force it back to a 4k max sector size. I've added that, rebooted, and I get the above.

After uninstalling SQL Server, then reinstalling, all is well.

Based on that other link, this seems to be an issue specific to Windows 11 and I'd expect a lot of people to encounter this soon.

Pasting the registry entry here just in case that other site/post goes poof.

REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f
Paul White
  • 94,921
  • 30
  • 437
  • 687
Jason Hanna
  • 11
  • 1
  • 2