NetWorker: SQL database restore on cluster fails: "Cannot use file '<path>' for clustered server"
Summary:
A NetWorker Module for Microsoft (NMM) SQL database restore fails with error: nsrsqlrc: Cannot use file '' for clustered server. Only formatted files on which the cluster
resource of the server has a dependency can be used. Either the disk resource is missing from the cluster group, or the SQL Server cluster resource lacks a dependency on it.
...
Symptoms
A NetWorker Module for Microsoft (NMM) SQL database restore fails with error:
nsrsqlrc: Cannot use file ‘<path>’ for clustered server. Only formatted files on which the cluster resource of the server has a dependency can be used. Either the disk resource containing the file is not present in the cluster group or the cluster resource of the Sql Server does not have a dependency on it.
For example:
The file F:\TestRestore\mdd_restore.mdf is the Destination location on a Cluster Drive (Volume)
Cause
The root cause of the issue is related to the cluster volume of the destination path and Microsoft Failover Cluster resource for SQL Server.
The SQL Server Cluster Resource Group is missing a dependency for the disk that corresponds to the restore destination path.
Resolution
To resolve this issue, the SQL Server database administrator should follow the Microsoft guidelines for the SQL Server cluster resource and disk dependency.
- Cluster Disk Dependency: See this Microsoft article:
- Create databases or change disk file locations on a shared cluster drive on which SQL Server was not originally installed
The goal is to add a dependency for the SQL Server resource to depend on the Cluster volume which is the destination for the database restore.
The Steps in the above article are shared below.
To add a disk dependency to SQL Server, the shared cluster disk must be in the same group as SQL Server resources in Cluster Administrator.
To move the shared cluster disk, select the disk you want to move to the SQL Server group, and then right-click that resource. Click Change Group. After the disk is in the same group in which the SQL Server resource resides, follow these steps to add it as a SQL Server dependency:
- Open the Cluster Administrator.
- Ensure that all the hard drive resources that contain SQL Server databases are in the same group as the SQL Server resource.
- Right-click the SQL Server resource, and then bring the resource into an Offline state by selecting Bring Offline.
- Right-click the SQL Server resource, and then select Properties.
- Select the Dependencies tab.
- Select Modify to add the disk to the dependencies list for that resource.
- Bring the SQL Server resource back online, and then put the SQL Server files on that shared cluster disk