如果移除SQL Server的存储设备,Cluster不会给出任何警告,但是当试图对数据库进行操作时(比如创建数据库),就会有如下错误信息:
Cannot use file ‘S:MSSQL10_50.TESTMSSQLDATAtest4.mdf’ 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.CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (Microsoft SQL Server, Error: 5184)
此时,你一定会再次为SQL Cluster添加存储设备,重启服务,Cluster没有给出任何警告。但是问题依旧!
解决方法:
重新挂载或添加刚才移除的存储设备
存储设备上右击“Properties” – “Dependencies”,添加依赖条件“Name: SQLCluster”(该存储依赖于SQL Server群集),确定保存。
在“SQL Server”上右击“Properties” – “Dependencies”,添加依赖条件“AND Sdisk”(该服务依赖于存储设备Sdisk),确定保存。
重启SQL Cluster,恢复正常。