dsccommunity / dsccommunity/SqlServerDsc
SqlSetup: Fails for Sql Server Failover Cluster Instance when using Azure Files for Data and Log Storage
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 385
- Forks
- 224
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
We are setting a SQL Server Failover Cluster in Azure with VMs. We are wanting to use an Azure Storage Account setup as a FileShare.
This is very similar to the setup defined in the Microsoft Docs here:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-portal-sql-create-failover-cluster-premium-file-share
The SqlServer DSC block is as follows:
SqlSetup ConfigureSqlServerWithAlwaysOn
{
SourcePath = $Node.SqlSetupSourceFiles
ForceReboot = $true;
Action = "InstallFailoverCluster"
SQLSvcAccount = $SQLServicecreds
InstanceName = $Node.SqlInstanceName
Features = $Node.SqlSetupFeatures
SQLCollation = $Node.SqlCollation
SecurityMode = $Node.SqlSecurityMode
SQLTempDBDir = $Node.SqlUserTempDbDataDir
SQLTempDBLogDir = $Node.SqlUserTempDbLogsDir
SQLBackupDir = $Node.SqlUserBackupDir
SQLUserDBDir = $Node.SqlUserDbDir
SQLUserDBLogDir = $Node.SqlUserLogsDir
InstallSQLDataDir = $Node.SqlUserDbDir
ProductKey = $Node.SqlProductKey
SQMReporting = $true
ErrorReporting = $true
# SAPwd =
AgtSvcAccount = $SQLServicecreds
SQLSysAdminAccounts = $Node.SqlSysAdminAccounts
UpdateEnabled = $Node.SqlUpdateEnabled
FailoverClusterGroupName = $Node.SqlClusterGroupName
FailoverClusterNetworkName = $Node.SqlClusterNetworkName
FailoverClusterIPAddress = $Node.SqlClusterIpAddress
# PsDscRunAsCredential = $DomainCreds
DependsOn = "[Computer]DomainJoin","[WindowsFeature]FailoverClusterTools"
}
We are using configuration data an extract is shown below:
SqlUserDbDir = '\\lthtuksppmdevsdcluster.file.core.windows.net\sqldata\Data'
SqlUserLogsDir = '\\lthtuksppmdevsdcluster.file.core.windows.net\sqllogs\Logs'
SqlUserTempDbDataDir = '\\lthtuksppmdevsdcluster.file.core.windows.net\sqldata\TempDb'
SqlUserTempDbLogsDir = '\\lthtuksppmdevsdcluster.file.core.windows.net\sqllogs\TempDb'
SqlUserBackupDir = '\\lthtuksppmdevsdcluster.file.core.windows.net\sqldata\backup'
So the SqlSetup section when running fails with the following:
VERBOSE: [ppmazsdsql-sql1]: LCM: [ End Set ] [[SqlSetup]ConfigureSqlServerWithAlwaysOn] in 0.3030 seconds.
PowerShell DSC resource MSFT_SqlSetup failed to execute Set-TargetResource functionality with error message: System.Exception: Unable to map the specified paths to valid cluster storage.
Drives mapped: .
An extract of the logs are shown below:
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] The feature 'ADV_SSMS' is already installed so it will not be installed again.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Found assigned parameter 'InstallSQLDataDir'. Adding path '\\lthtuksppmdevsdcluster.file.core
.windows.net\sqldata\Data' to list of paths that required cluster drive.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Found assigned parameter 'SQLUserDBDir'. Adding path '\\lthtuksppmdevsdcluster.file.core.wind
ows.net\sqldata\Data' to list of paths that required cluster drive.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Found assigned parameter 'SQLUserDBLogDir'. Adding path '\\lthtuksppmdevsdcluster.file.core.w
indows.net\sqllogs\Logs' to list of paths that required cluster drive.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Found assigned parameter 'SQLTempDBDir'. Adding path '\\lthtuksppmdevsdcluster.file.core.wind
ows.net\sqldata\TempDb' to list of paths that required cluster drive.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Found assigned parameter 'SQLTempDBLogDir'. Adding path '\\lthtuksppmdevsdcluster.file.core.w
indows.net\sqllogs\TempDb' to list of paths that required cluster drive.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Found assigned parameter 'SQLBackupDir'. Adding path '\\lthtuksppmdevsdcluster.file.core.wind
ows.net\sqldata\backup' to list of paths that required cluster drive.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT
* FROM MSCluster_ResourceGroup WHERE Name = 'Available Storage','queryDialect' = WQL,'namespaceName' = root/MSCluster'.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Perform operation 'Enumerate Associated CimInstances' with following parameters, ''sourceRole
' = ,'sourceInstance' = MSCluster_ResourceGroup (Name = "Available Storage"),'associationClassName' = MSCluster_ResourceGroupToResource,'namespaceName' = root/MSCluster,'resultClassName' = MS
Cluster_Resource,'resultRole' = '.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Operation 'Query CimInstances' complete.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Operation 'Enumerate Associated CimInstances' complete.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Perform operation 'Enumerate CimInstances' with following parameters, ''namespaceName' = root
/MSCluster,'className' = MSCluster_ClusterSharedVolume'.
VERBOSE: [ppmazsdsql-sql1]: [[SqlSetup]ConfigureSqlServerWithAlwaysOn] Operation 'Enumerate CimInstances' complete.
VERBOSE: [ppmazsdsql-sql1]: LCM: [ End Set ] [[SqlSetup]ConfigureSqlServerWithAlwaysOn] in 0.3030 seconds.
PowerShell DSC resource MSFT_SqlSetup failed to execute Set-TargetResource functionality with error message: System.Exception: Unable to map the specified paths to valid cluster storage.
Drives mapped: .
+ CategoryInfo : InvalidOperation: (:) [], CimException
+ FullyQualifiedErrorId : ProviderOperationExecutionFailure
+ PSComputerName : ppmazsdsql-sql1
So I understand what it is saying that Sql Setup cannot find the file share as part of a Cluster Disk, which is correct.
Am I missing something but this configuration should be ok. When setting this up via the SQL Server Setup UI a warning is displayed but you can continue. Is there a way to override and Force the installation to continue?
Thanks for your help.
Cheers
Simon
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the MSFT_SqlSetup resource and the SqlSetup configuration shown in the issue, then trace the path-mapping logic behind the “Unable to map the specified paths” error. Compare its behavior with the SQL Server Setup UI for Azure Files and determine whether an override is supported. Done means the resource can either install with these UNC paths or clearly documents the supported limitation and workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, sql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100