You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: SQL Server installation fails with sector size error on Azure VM
3
-
description: This article provides a resolution for the problem that occurs when you try to install a SQL Server instance on Windows Server 2022 on an Azure virtual machine (VM).
2
+
title: SQL Server Installation Fails with Sector Size Error on Azure VM
3
+
description: This article provides a resolution for the error (Cannot use file 'master.mdf' because it was originally formatted with sector size 4096) that occurs when you try to install a SQL Server instance on an Azure virtual machine (VM) running Windows.
# Error (Cannot use file 'master.mdf' because it was originally formatted with sector size 4096) and SQL Server installation fails on a Windows Server 2022 Azure VM
10
+
# SQL Server installation fails with sector size error on a Windows Server 2022 Azure virtual machine
12
11
13
-
This article helps you resolve a problem that occurs when you try to _manually_ install SQL Server to a Windows Server 2022 Microsoft Azure virtual machine (VM).
12
+
This article helps you resolve a problem that occurs when you try to manually install a SQL Server instance on a Microsoft Azure virtual machine (VM) running Windows.
14
13
15
-
_Applies to:_ SQL Serveron Azure VM - Windows, Windows Server 2022
14
+
_Applies to:_ SQL Server, SQL Server on Azure VM - Windows
16
15
17
16
## Symptoms
18
17
19
-
When you try to install a SQL Server instance on a Windows Server 2022 Microsoft Azure virtual machine (VM), the installation fails and you receive the following error message in the SQL Server error log when the engine tries to start during the installation:
18
+
When you try to install a SQL Server instance on an Azure virtual machine (VM) running Windows, the installation fails, and you receive the following error message in the SQL Server error log when the engine tries to start during the installation:
20
19
21
20
> Cannot use file '...\master.mdf' because it was originally formatted with sector size 4096 and is now on a volume with sector size 8192. Move the file to a volume with a sector size that is the same as or smaller than the original sector size.
22
21
23
-
In this situation, you can see the following additional information in the Summary.txt log file in the SQL Server setup folder:
22
+
Additionally, you can see the following information in the **Summary.txt** log file in the SQL Server setup folder:
24
23
25
-
```
24
+
```output
26
25
Detailed results:
27
26
Feature: Database Engine Services
28
27
Status: Failed
@@ -33,35 +32,41 @@ Detailed results:
33
32
Error description: Could not find the Database Engine startup handle.
34
33
```
35
34
35
+
This issue can occur for on-premises installations but is more likely to be encountered when installing SQL Server on Microsoft Azure virtual machine (VM).
36
+
36
37
## Cause
37
38
38
-
NVMe is a communication protocol that facilitates faster and more efficient data transfer between servers and storage systems by using nonvolatile memory (NVMe). With NVMe, data can be transferred at the highest throughput and with the fastest response times.
39
+
This issue occurs due to the sector size configuration of the disk on certain Azure virtual machines. Some of the latest Azure VM generations (such as Da/Ea/Fav6) have an NVMe-only storage interface and require an OS image that supports NVMe. However, these latest Azure VM generations deploy with a default sector size of 8 KB, which isn't currently supported by SQL Server. SQL Server currently supports disks with a standard native [sector sizes of 512 bytes and 4 KB](/sql/sql-server/install/hardware-and-software-requirements-for-installing-sql-server-2022#StorageTypes).
39
40
40
-
Some of the newest Azure VM generations (such as Da/Ea/Fav6) have an NVMe-only storage interface and require an OS image that supports NVMe. However, these latest Azure VM generations deploy with a default sector size of 8 KB, which isn't currently supported by SQL Server. SQL Server currently supports disks with a standard native [sector sizes of 512 bytes and 4 KB](/sql/sql-server/install/hardware-and-software-requirements-for-installing-sql-server-2022#StorageTypes).
41
+
> [!NOTE]
42
+
> NVMe is a communication protocol that facilitates faster and more efficient data transfer between servers and storage systems by using nonvolatile memory (NVMe). With NVMe, data can be transferred at the highest throughput and with the fastest response times.
41
43
42
-
If an Azure virtual machine was deployed using the 8-KB sector size, and you attempt to install SQL Server after deployment, the installation can fail.
44
+
If an Azure virtual machine was deployed using the 8KB sector size, and you attempt to install SQL Server after deployment, the installation can fail.
43
45
44
46
> [!NOTE]
45
-
> This scenario only occurs when you are _manually_ installing SQL Server on an Azure VM, and not when you deploy a SQL Server VM from Azure Marketplace. The Azure Marketplace images are preconfigured to use the 4-KB sector size.
47
+
> This scenario only occurs when you manually install SQL Server on an Azure VM, and not when you deploy a SQL Server VM from Azure Marketplace. The Azure Marketplace images are preconfigured to use the 4KB sector size.
46
48
47
49
## Resolution
48
50
49
-
To resolve this problem, you must reinstall SQL Server after forcing the Azure VM to use the 4-KB sector size.
51
+
To resolve this problem, you need to reinstall SQL Server after forcing the Azure VM to use the 4KB sector size.
50
52
51
53
To successfully install SQL Server on your Azure VM, follow these steps:
52
54
53
-
1. If you've already installed SQL Server, then uninstall SQL Server. Otherwise, skip to the next step.
55
+
1. If you've already installed SQL Server, uninstall SQL Server. Otherwise, skip to the next step.
54
56
1. Add the [ForcedPhysicalSectorSizeInBytes](../database-engine/database-file-operations/troubleshoot-os-4kb-disk-sector-size.md#resolutions) registry key.
55
-
1. Verify the sector size is 4 KB by running the following command in an elevated command prompt: `fsutil fsinfo sectorinfo <volume pathname>`
57
+
1. Verify the sector size is 4 KB by running the following command in an elevated command prompt:
58
+
59
+
`fsutil fsinfo sectorinfo <volume pathname>`
60
+
56
61
1. Restart the Azure VM.
57
62
1. Reinstall SQL Server.
58
63
59
64
The following screenshot shows the output of the `fsutil fsinfo sectorinfo` command for the `E:` drive, which has a sector size of 8 KB:
60
65
61
66
:::image type="content" source="media/sql-installation-fails-error-azure-vm/8k-sector-size-example.png" alt-text="Screenshot of command prompt output of 8k sector size.":::
62
67
63
-
The following screenshot shows the output of the `fsutil fsinfo sectorinfo` command for the `E:` drive after updating the registry key to use the 4-KB sector size:
68
+
The following screenshot shows the output of the `fsutil fsinfo sectorinfo` command for the `E:` drive after updating the registry key to use the 4KB sector size:
64
69
65
-
:::image type="content" source="media/sql-installation-fails-error-azure-vm/4k-sector-size-example.png" alt-text="Screenshot of command prompt output of 4-KB sector size.":::
70
+
:::image type="content" source="media/sql-installation-fails-error-azure-vm/4k-sector-size-example.png" alt-text="Screenshot of command prompt output of 4KB sector size.":::
66
71
67
-
The `ForcedPhysicalSectorSizeInBytes` registry key is an OS-level setting, meaning that all drives currently attached, and those attached in the future, use the 4-KB sector size unless this registry key is removed.
72
+
The `ForcedPhysicalSectorSizeInBytes` registry key is an OS-level setting, meaning that all drives currently attached, and those attached in the future, use the 4KB sector size unless this registry key is removed.
0 commit comments