How to install cluster Pacemaker on linux CentOS 7 for SQL Server High Availability

How to install cluster Pacemaker on linux CentOS 7 for SQL Server High Availability

How to Install cluster pacemaker on linux CentOS 7 for SQL Server High Availability video explains below Validating Nodes IP address Disable firewall and SELINUX (for Installation Only) -- Not Recommended for Prod Installing pacemaker Configuring Cluster User, i.e. hacluster Starting and Enabling Pacemaker services Adding members node to cluster Creating and starting cluster Confuring cluster resources a) Virtual IP of the cluster b) Apache Services -httpd-- Just to test the failover cluster Create Constraint of cluster resources Test Fail-over Script used in this video: #How to create Pacemaker Cluster on Linux CentoS 7 # IP Configuration verification of all possible nodes # installing httpd to verify in the end of cluster on both nodes yum install httpd -y # Disable SELINUX and Firewall vi /etc/sysconfig/selinux Change SELINUX=enforcing to Permissive and save the file on both nodes and setenforce 0 systemctl stop firewalld systemctl disable firewalld # Install Pacemaker software on both nodes yum install pacemaker pcs fence-agents-all -y # Once installed, you will see user created named hacluster - we need reset the password for this user on both nodes tail /etc/passwd --- To see if user is created passwd hacluster # Start and Enable PaceMaker Services on both nodes systemctl start pcsd systemctl enable pcsd # Add membership of the cluster using hacluster username pcs cluster auth TBSLinuxNode1 TBSLinuxNode2 -u hacluster # Create Cluster named "LinuxSQLCluster" in my case pcs cluster setup --name LinuxSQLCluster TBSLinuxNode1 TBSLinuxNode2 # View Configuration of the Cluster on both nodes Cat /etc/corosync/corosync.conf #Start the cluster pcs cluster start --all #Check the status of the cluster and enable the cluster pcs status pcs cluster enable -all # Configure the resources of the cluster a) Virtual IP of the cluster pcs resource create VirtIP IPAddr ip=192.168.1.102 cidr_netmask=24 op monitor interval=60 b) apache services (To check the failover, not necessary for SQL Server) pcs resource create Httpd apache Configuration="/etc/httpd/conf/httpd.conf" op monitor interval=60s -- # Check the status again to see if resources are configured right and you will notice both resources are created and in stopped state # Let's create Constraint and Policies on the cluster pcs constraint colocation add Httpd with VirtIP INFINITY pcs property set stonith-enabled=false pcs property set no-quorum-policy=ignore pcs property set default-resource-stickiness="INFINITY" # Check the status again to see if resources are online pcs status # Check virtual IP on active node ip a # Now let's create an HTML page to see where which node our resources are running vi /var/www/html/index.html #Type anything for example Hey I am TBSClusterNode1 (if creating on TBSLinuxNode1 in my case) etc. and save it on each node # Now let's view the page using IE or any browser # Let's failover the cluster and recheck the html page file we just created pcs cluster stop TBSLinuxNode1 (If it is running on node1, if node2, stop cluster services on that node)

How to Install cluster pacemaker on Linux CentOS 7 for SQL Server High Availability



4 comments:

  1. I was very pleased to find this site. I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post. This is extremely helpful info!! Very good work. Everything is very interesting to learn and easy to understand. Thank you for giving me the information.
    Thesis writing service

    ReplyDelete
  2. This is an excellent and detailed guide on setting up a Pacemaker cluster on CentOS 7 for SQL Server High Availability. The step-by-step instructions make the process easy to follow, even for those who may be new to clustering. The breakdown of commands, from validating IP addresses to configuring failover constraints, ensures a smooth setup and minimizes errors.
    Such well-structured tutorials are invaluable for system administrators dealing with high-availability environments. After long hours of configuring servers, sometimes you need a break. A great way to unwind is by visiting https://starcasino.it.com/ , where you can enjoy exciting games and test your luck.
    Thanks for sharing this informative guide—it’s a great resource for anyone working with Linux clusters!

    ReplyDelete