[SQL] [Problem] SQL Server Cluster installed on CSV (Cluster Shared Volumes) Notes

[SQL] [Problem] SQL Server Cluster installed on CSV (Cluster Shared Volumes) Notes


Recently when testing the new version of SQL Server 2014, just see MSDN article above describes Deploying SQL Server 2014 with Cluster Shared Volumes of articles, you can make a new version of SQL Server is installed on a shared cluster of sectors, rather than with the traditional as installed on the shared disk, and in the Tech-ed 2014, also has dedicated a program to introduce this part, it seems this should be a way of the future main push, so I decided to set up their own a Lab environment to test to see .

Basically with other previous versions of SQL Server is the same, we must be ready a WSFC (Windows Server Failover Clustering) environment, you can use in order to meet gMSA (Group Managed Service Accounts), so I use to build a Windows Server 2012 the new AD, and will test the VM are installed with Windows Server 2012 R2, completed at the beginning of the preparatory work.

image

After installing, I first LUN part 1 of the first set to "quorum disk" is basically occupied this space does not need much, but my NAS iSCSI LUN cut in the minimum of time to be set 10G, therefore give him 10GB to use. Then we will LUN 2 above, select "add to the cluster shared volumes."

image

After set up, we will find originally shared disk R, will be transformed into "C: ClusterStorageVolumn1" the

image

完成上述步骤之后,我们就可以开始来安装了。基本上安装 SQL Server Cluster ( 在 SQL Server 2012 改称为 SQL Server AlwaysOn Failover Cluster Instances ) 和一般安装 SQL Server 的进程差不多,但要注意安装的时候一开始的选像是不同的。在这个步骤可不要选错了喔~~

image

接下来大部分的步骤都是相同的,我就不再赘述了,因为主要是测试 Cluster 的安装和使用,因此在安装的时候我就只单纯选择数据库引擎服务和管理工具这两个部分

image

接下来会有个比较重要的地方,在这个步骤你要设定一个 “SQL Server 网络名称”,以后你要连接这个 SQL Server 就必须要使用这个名称来连接。

image

这里可以先忽略

image

到这个步骤要稍微注意一下,因为原本我有三个丛集磁盘,但第一个已经分配去当仲裁了,而我是把第二个磁盘设定成为“丛集共享扇区”,因此在这个步骤我要选择安装到丛集磁盘 2 上面。

image

接着在这里要指定刚刚前几个步骤所设定 SQL Server 丛集网络名称所对应的 IP 位址,虽然这个部分是可以设定使用 DHCP,但一般我们都比较常使用固定 IP 来做分配使用。

image

在服务账户的设定上,我个人比较偏号使用 gMSA,这样比较不会有密码被被更改或者是被一值登入而被锁定或者是换密码的问题,如果你不习惯使用 gMSA 的话,那么也可以指定一个网域的使用者账号也是可以的啦。

image

接下来也都没有什么太大的不同

image

接下来要到最后一步要开始安装前,我们可以发现的确 SQL Server 会把数据的目录都安装到 CSV 上面去了。

image

按下“安装”的按钮之后,此时就是考验你设备的等级了,因为我的两个环境是在 Hyper-V 上面的 Guest VM,又是使用普通的 NSA 来当 iSCSI Server,因此整个安装时间大约花上 30mins。

image


当第一个 SQL Server CLuster 节点安装好之后,接下来第 2 个之后的安装步骤就相对简单多了,只是要注意在一开始的安装选项,可不要选错了。

image

接下来大部分都是直接按下“下一步”就可以了,到了这个步骤的时候,要检查一下“丛集网络名称”是否是正确,一般来说如果只有一个 SQL Server 丛集是不会有什么问题的,如果有多个的时候,则要注意一下可别选错了。

image

image

在这里他会自动从 Active 节点上的 SQL Server 设定值给带过来

image

相对第一个节点来说,安装步骤所要设定的东西少了很多,但安装也差不多要花上 20~30 mins 的时间。

image


安装过程算简单,原本以为这样就大功告成了,于是想要挂一个数据库进来测试一下,因此我想透过 SSMS 来还原数据库。

image

很自然的会去选择“加入”来挑选我的备份文件。

image

但悲剧就出现了,居然在这里告诉我权限不足,或者是路径不存在的问题。但看起来这个是默认的目录,在前面安装的过程中,是有建立这个目录,因此应该不会不存在才对。

image

因此决定手动操作先建立一个数据库,然后利用 BACKUP DATABASE 的命令,将数据库备份到那个部分下,看起来都没有问题。但如果在前面的步骤,我们手动输入备份文件的位置,而不要用 GUI 去选择,也都不会有问题,因此到底是什么样的问题造成会有这样的错误呢 ?! 花了一个多月总算找到答案了,原来是 SSMS 的管理工具,并没有考虑到安装 SQL Server Cluster 的时候,有可能没有设定任何共用磁盘,而导致 SSMS 去抓取目录资讯的时候,因为没有取到共用磁盘的资讯,因此就直接送出这样的消息。

既然知道问题了,那我们就可以来做处理了。首先先开启“容错移转丛集管理员”,选择角色下的 “SQL Server”,接着按下鼠标右键,选择“新增存放设备”

image

加入一个丛集磁盘专门给 SQL Server 丛集来使用,后续你不一定要使用他来存放东西,但一定要有一个给 SQL Server 丛集专用的丛集磁盘。

image

Under the case after "OK" in the SQL Server role, you can see there is a new "storage device"

image

Now select the image above the "Additional Resources" → "SQL Server", on which press the right mouse button and select "Properties" → "dependency", will be just the new cluster disk 3 to be added to the conditions of dependency Inside.

image

At this point re-selection process to restore the database, you can find that can be turned on by default SQL Server backup of the file directory, and no error messages.

image

Or to switch to a cluster disk S is not a problem.

image


A seemingly simple question, unexpectedly and repeatedly check for nearly a month, has tested the heavy equipment, the replacement of service accounts, adjust your backup directory permissions, use Backup Device, etc., but that is not successful, then finally found a few a key DMV, only to find the final results of these questions from the DMV. If you want to study a friend, you can check to see results and return the following description of several DMV:

sys.dm_io_cluster_shared_drives

This view returns the name of each shared disk drive disk drive. If the current server instance is not clustered instance, it returns an empty set of data columns

sys.dm_os_cluster_nodes

If the current instance is a failover cluster instance, will return a list of definitions have this failover cluster node execution of the individual, and can determine which node is the current owner

sys.dm_io_cluster_valid_path_names

Returns the SQL Server failover clustering effective implementation of all relevant information shared disk of individuals, including cluster shared volumes.

Original: Large column  [SQL] [Problem] SQL Server Cluster installed on CSV (Cluster Shared Volumes) Notes


Guess you like

Origin www.cnblogs.com/chinatrump/p/11458398.html