SQL Server Clustering on Linux(Ubuntu)--> Part 5

Hi Mates,

Welcome to the Final part of the series. In this we will be working on how to move the resources from one node to another node.

Currently my SQL Server is running on ubusqlclnod1nfs. Here is the screenshot for the same.

if you observe the commands what I have run the serverpoperty('servername') shows it is running on ubusqlclnod1nfs. And at the same time @@servername indicating mssqlha.

To move the SQL server from node1 to node2  do make use of below cmd.
sudo pcs  resource move mssqlha ubusqlclnod2nfs

I fired the command on node1 to move the resources & it got failed over to Node2.

In my case as part of part-4 I had given the Failover clustering name for sql as "sriramlinux" so to connect with virtual name we need to edit the /etc/hosts on both the nodes accordingly.

There are lot of things you need to know when it comes to commands
what I made use of in the part-4

sudo pcs cluster cib cfg

CIB :Cluster Information Base. Contains definitions of all cluster options, nodes, resources, their relationships to one another and current status. Synchronizes updates to all cluster nodes.

sudo pcs -f cfg resource create mssqlha ocf:mssql:fci op defaults timeout=60s
sudo pcs -f cfg resource create virtualip ocf:heartbeat:IPaddr2 ip=
sudo pcs -f cfg resource create fs Filesystem device="" directory="/var/opt/mssql/data" fstype="nfs"

OCF: open cluster framework.we can treat OCF resource agents similar to Windows Failover Cluster DLL resources 

A resource agent is an executable that manages a cluster resource. 

Cluster resources can be as diverse as IP addresses, file systems, database services, and entire virtual machines.

Any Open Cluster Framework (OCF) compliant cluster management application is capable of managing resources using the resource agents 

Pacemaker, a cluster manager supporting both the Corosync and Heartbeat cluster messaging frameworks. 

whey we made use of MSSQL & heartbeat?

Because  they are the resources that are available for SQL server.

ocf:mssql:fci-->so now you understood OCF & MSSQL so how about FCI? Below image will help you understand why it is

ocf:heartbeat:IPaddr2--> so OCF & heartbeat are fine so how about Ipaddr2?

I hope now it all makes at least some sense.

Below is the link which would help you in understanding pacemaker commands.


Note: We can make use of CRM command line tool for achieving the same. We need to install Crmsh for the same.

Finally this post comes to end.  Do share your valuable inputs & please feel free to correct me. :)