Skip to content

Commit cec1b8c

Browse files
committed
writer review
1 parent 38b6450 commit cec1b8c

2 files changed

Lines changed: 25 additions & 20 deletions

File tree

-7.58 KB
Loading
Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
11
---
2-
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.
44
ms.date: 03/20/2025
55
ms.author: dpless
66
author: dplessMSFT
77
ms.reviewer: mathoma
8-
ms.custom: sap:Azure SQL virtual machine
9-
ms.topic: troubleshooting
8+
ms.custom: sap:Installation, Patching, Upgrade, Uninstall
109
---
11-
# 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
1211

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.
1413

15-
_Applies to:_   SQL Server on Azure VM - Windows, Windows Server 2022
14+
_Applies to:_   SQL Server, SQL Server on Azure VM - Windows
1615

1716
## Symptoms
1817

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:
2019

2120
> 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.
2221
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:
2423

25-
```
24+
```output
2625
Detailed results:
2726
Feature: Database Engine Services
2827
Status: Failed
@@ -33,35 +32,41 @@ Detailed results:
3332
Error description: Could not find the Database Engine startup handle.
3433
```
3534

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+
3637
## Cause
3738

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).
3940

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.
4143
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 8 KB sector size, and you attempt to install SQL Server after deployment, the installation can fail.
4345

4446
> [!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 4 KB sector size.
4648
4749
## Resolution
4850

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 4 KB sector size.
5052

5153
To successfully install SQL Server on your Azure VM, follow these steps:
5254

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.
5456
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+
5661
1. Restart the Azure VM.
5762
1. Reinstall SQL Server.
5863

5964
The following screenshot shows the output of the `fsutil fsinfo sectorinfo` command for the `E:` drive, which has a sector size of 8 KB:
6065

6166
:::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.":::
6267

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 4 KB sector size:
6469

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 4 KB sector size.":::
6671

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 4 KB sector size unless this registry key is removed.

0 commit comments

Comments
 (0)