Skip to content

Commit dd52582

Browse files
committed
minor updates
1 parent b625ac5 commit dd52582

1 file changed

Lines changed: 34 additions & 38 deletions

File tree

support/sql/database-engine/database-file-operations/troubleshoot-os-4kb-disk-sector-size.md

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Troubleshooting operating system disk sector size greater than 4 KB
33
description: This article troubleshoots SQL Server installation or startup failures related to some new storage devices and device drivers exposing a disk sector size greater than the supported 4-KB sector size.
4-
ms.date: 03/04/2025
4+
ms.date: 03/07/2025
55
ms.custom: sap:File, Filegroup, Database Operations or Corruption
66
ms.reviewer: dplessMSFT, briancarrig, suresh-kandoth, rdorr, jopilov
77
author: WilliamDAssafMSFT
@@ -111,56 +111,52 @@ Additionally, be aware of the Windows support policy for file system and storage
111111
112112
## Resolutions
113113

114-
- Currently, the `ForcedPhysicalSectorSizeInBytes` registry key is required to successfully install SQL Server when using modern storage platforms, such as NVMe, that provide a sector size larger than 4 KB. This Windows operating system registry key forces the sector size to be emulated as 4 KB. To add the `ForcedPhysicalSectorSizeInBytes` registry key, use the [Registry Editor](#registryeditor) or run commands as described in the [PowerShell as Administrator](#powershellasadmin) section. You must reboot the device after adding the registry key in order for this change to take effect. There is no need to add Trace Flag 1800 for this scenario.
114+
- Currently, the `ForcedPhysicalSectorSizeInBytes` registry key is required to successfully install SQL Server when using modern storage platforms, such as NVMe, that provide a sector size larger than 4 KB. This Windows operating system registry key forces the sector size to be emulated as 4 KB. To add the `ForcedPhysicalSectorSizeInBytes` registry key, use [Registry Editor](#registry-editortabregistry-editor) or run commands as described in the [Command Prompt](#command-prompttabcommand-prompt) or [PowerShell](#powershelltabpowershell) section. You must reboot the device after adding the registry key for this change to take effect. There is no need to add Trace Flag 1800 for this scenario.
115115

116-
> [!IMPORTANT]
117-
> This section contains steps that tell you how to modify the Windows registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see the [How to back up and restore the registry in Windows](../../../windows-server/performance/windows-registry-advanced-users.md#back-up-the-registry) article.
116+
> [!IMPORTANT]
117+
> This section contains steps that tell you how to modify the Windows registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, see the [How to back up and restore the registry in Windows](../../../windows-server/performance/windows-registry-advanced-users.md#back-up-the-registry) article.
118118
119-
#### [Registry editor](#tab/registry-editor)
119+
#### [Registry Editor](#tab/registry-editor)
120120

121-
<a id="registryeditor"></a>
121+
1. Run Registry Editor as an administrator.
122+
1. Navigate to `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device`.
123+
1. Select **Edit** > **New** > **Multi-String value** and name it as `ForcedPhysicalSectorSizeInBytes`.
124+
1. Right click the name, select **Modify**, and type `* 4095` in the **Value data** field.
125+
1. Select **OK** and close Registry Editor.
122126

123-
**Registry Editor**
124-
125-
1. Navigate to `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device`.
126-
1. On the **Edit** menu, point to **New**, and then select **Multi-String value**. Name it `ForcedPhysicalSectorSizeInBytes`.
127-
1. Modify the new value, type in `* 4095`. Select **OK** and close the Registry editor.
128-
129-
#### [Command prompt](#tab/command-prompt)
130-
131-
<a id="commandpromptadmin"></a>**Command Prompt as Administrator**
127+
#### [Command Prompt](#tab/command-prompt)
132128

133-
1. Add the key.
134-
135-
```console
136-
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f
137-
```
129+
1. Run Command Prompt as an administrator.
130+
1. Run the following command to add the key:
138131

139-
2. Validate if the key was added successfully.
132+
```console
133+
REG ADD "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes" /t REG_MULTI_SZ /d "* 4095" /f
134+
```
140135

141-
```console
142-
REG QUERY "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v "ForcedPhysicalSectorSizeInBytes"
143-
```
136+
1. Run the following command to validate if the key was added successfully:
144137

145-
#### [PowerShell](#tab/PowerShell)
146-
147-
<a id="powershellasadmin"></a>**PowerShell as Administrator**
138+
```console
139+
REG QUERY "HKLM\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" /v
140+
"ForcedPhysicalSectorSizeInBytes"
141+
```
148142

149-
1. Add the key.
143+
#### [PowerShell](#tab/PowerShell)
150144

151-
```Powershell
152-
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "ForcedPhysicalSectorSizeInBytes" -PropertyType MultiString -Force -Value "* 4095"
153-
```
145+
1. Run PowerShell as an administrator.
146+
1. Run the following command to add the key:
154147

155-
2. Validate if the key was added successfully.
148+
```Powershell
149+
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "ForcedPhysicalSectorSizeInBytes" -PropertyType MultiString -Force -Value "* 4095"
150+
```
156151

157-
```Powershell
158-
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "ForcedPhysicalSectorSizeInBytes"
159-
```
152+
1. Run the following command to validate if the key was added successfully:
160153

161-
---
154+
```Powershell
155+
Get-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\stornvme\Parameters\Device" -Name "ForcedPhysicalSectorSizeInBytes"
156+
```
157+
---
162158

163-
- If you do not add the registry key, and if you have multiple drives on this system, you can specify a different location for the database files after installation of SQL Server is complete. Make sure that drive reflects a supported sector size when querying the `fsutil` commands. SQL Server currently supports sector storage sizes of 512 bytes and 4096 bytes.
159+
- If you don't add the registry key and you have multiple drives on this system, you can specify a different location for the database files after the installation of SQL Server is complete. Make sure that drive reflects a supported sector size when querying the `fsutil` commands. SQL Server currently supports sector storage sizes of 512 bytes and 4,096 bytes.
164160

165161
## More information
166162

@@ -187,7 +183,7 @@ The following table provides a comparison of the sector sizes reported by the op
187183
| `Not DAX capable` | `Not DAX capable` |
188184
| `Not Thinly-Provisioned` | `Not Thinly-Provisioned` |
189185
190-
## Related content
186+
## More information
191187

192188
- [SQL Server storage types for data files](/sql/sql-server/install/hardware-and-software-requirements-for-installing-sql-server-2019?view=sql-server-ver16&preserve-view=true#StorageTypes)
193189
- [KB3009974 - FIX: Slow synchronization when disks have different sector sizes for primary and secondary replica log files in SQL Server AG and Logshipping environments](https://support.microsoft.com/topic/kb3009974-fix-slow-synchronization-when-disks-have-different-sector-sizes-for-primary-and-secondary-replica-log-files-in-sql-server-ag-and-logshipping-environments-ed181bf3-ce80-b6d0-f268-34135711043c)

0 commit comments

Comments
 (0)