Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

RedHat 6 Cluster basic commands

Leer en espanol
RedHat 6 Cluster basic commands

Table of contents

View Cluster Status ===

These are the basic commands to control a Red Hat Cluster from command line. View Cluster status, start/stop/restart/move resources and services, etc.

View Cluster Status

text
# clustat
Cluster Status for clstr-app @ Tue Jul 29 01:23:53 2014
Member Status: Quorate
Member Name ID Status

—— —- —- ——

nodo1 1 Online, Local, rgmanager

nodo2 2 Online, rgmanager

/dev/block/8:32 0 Online, Quorum Disk
Service Name Owner (Last) State

——- —- —– —— —–
service:fs_www nodo1 started

service:httpd nodo2 started

Start, stop and restart services

Start a service:

text
# clusvcadm -e httpd
Local machine trying to enable service:httpd…Successservice:httpd is now running on nodo1

Stop a service:

text
# clusvcadm -d httpd
Local machine disabling service:httpd…Success

Restart a service:

text
# clusvcadm -R httpd

Move a service to another node in the Cluster

text
# clusvcadm -r httpd -m nodo2
Member nodo1 trying to enable service:httpd…Successservice:httpd is now running on nodo2

Start and stop the cluster in an orderly manner

To remove a node from the cluster, the first thing we do is move all the services that it has active to another node in the cluster and then stop the corresponding processes in order:

text
# clusvcadm -r INSTANCIA -m NODO

# service rgmanager stop

# service clvmd stop

# service cman stop

Unlock a resource

We check that the service is blocked

text
# clusvcadm -S service:httpd
Resource groups locked

We unlock the resource

text
clusvcadm -u service:httpd
Resource groups unlocked

Once unlocked we can move the resource

text
clusvcadm -r httpd -m nodo02

All the best.

:wq!

Comments