Solved Cannot install SQL. 2012.. 2014.. 2019


Labonte18

New member
Local time
12:53 AM
Posts
2
OS
Win11
Pretty much every one is coming back with some flavor of this error during install when it attempts to start the SQL Server

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.

fsutil reports this

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


So.. I think.. I'm on the right path of what my problem is here.. It's just.. What can I do about it? it's like writing is happening at 4096 and reading at 32768 which is confusing the hell out of SQL.

There's.. Precious little info about this. Most are regarding people trying to RESTORE a database that was done on another disk with a different sector size. Which is not the problem here.

The only real info I found on it was one report where Dell was issuing a BIOS update to resolve, but, it actually wound up being a 'bad' drive.. See this LocalDB Cannot Start, Strange Error in Log contains "sector size 4096 and is now on a volume with sector size 3072"

That was way back in 2013.. I feel this has something to do with the drive itself, and likely a firmware update needed for the drive. It's a Samsung NVMe 991.. Very new, and I can't find firmware for it at all to try an update. The PC is an HP and there's no BIOS updates for it.

I doubt this is a windows 11 issue, but.. Hey.. It is on win 11. Figure I'd throw it out here and see if anyone had any thoughts different than what I do. I have a feeling i'll probably wind up in some kind of logical hell between Samsung and HP where they pass the buck between each other and then attempt to kick it back to microsoft. I really don't think this is a windows or SQL issue.
 
Windows Build/Version
11

My Computer

System One

  • OS
    Win11

Labonte18

New member
Thread Starter
Local time
12:53 AM
Posts
2
OS
Win11
Might be on to something here.. So.. 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 and reinstalling, because after this, SQL still wouldn't start, but different errors and honestly I don't think it installed properly/fully the first go around anyway.

This page.. SupportArticles-docs/troubleshoot-os-4kb-disk-sector-size.md at main · MicrosoftDocs/SupportArticles-docs

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, then reinstalling.. All is well.

Based on that other page, this seems to be an issue WIn11 specific and.. I'd expect alot of people to encounter this soon.

So.. Just in case. 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
 

My Computer

System One

  • OS
    Win11

jimbo45

Well-known member
Power User
VIP
Local time
4:53 AM
Posts
1,643
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi there
@Labonte18

Thanks for that info.

I'm messing around with "Trial version" of W2K22 SERVER which I want to install on an NVME based disk in the machine -- I'll need the SQL server so I've saved your reg fix if needed.

One problem with W2K22 server -- Can't get an HP M28 laserjet to work on it -- temporary get around though - print to pdf and send to client computer to print. (The laser jet isn't "Wireless capable" and the W11 driver isn't any good on W2K22 Server nor the W10 one).

Cheers
jimbo
 

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
Top Bottom