Handling of Red Hat Cluster Suite

From Bitbull Wiki
Jump to navigation Jump to search

1 cluster configuration

  • rel3 / rel4 / rel5
redhat-config-cluster

2 cluster status query

  • rel3
clustat
clustat -i3 #refresh every 3 seconds
  • re4 / rel5
clustat
clustat -i3 #refresh every 3 seconds
clustat -l #long description
clustat -l -i3 #long and refresh

3 inplace restart of clustered service

  • rel3 / rel4 / rel5
clusvcadm -R clu-httpd

4 stop a clustered service

rel3 / rel4/rel5: clusvcadm -d clu-httpd

5 start a clustered service

  • rel3 / rel4 / rel5
clusvcadm -e clu-httpd 

rel5 is a bit buggy, better use -m

6 start a clustered service on a prefered node

  • rel3 / rel4 / rel5
clusvcadm -e clu-httpd -m clunode-2

switch a clustered service to another member

  • rel3 / rel4 / rel5
clusvcadm -r clu-httpd

rel5 is a bit buggy, better use -m

switch a clustered service to a prefered member

  • rel3 / rel4 / rel5
clusvcadm -r clu-httpd -m clunode-3

7 lock/unlock a cluster

note: prevent from cluster switching

  • rel3 / rel4 / rel5
clusvcadm -l #lock
clusvcadm -u #unlock
clusvcadm -S #show locking state

8 start up rel4 cluster suite first time

all# chkconfig ccsd off
all# chkconfig cman off
all# chkconfig fenced off
all# chkconfig clvmd off
all# chkconfig gfs off
all# chkconfig rgmanager off

all# init 6

all# service ccsd start
all# service cman start
all# service fenced start
all# service clvmd start

# try to mount and ountmount gfs filesystem manualy
all# mount -tgfs /dev/gfsvg/data01 /mnt/test
all# umount /mnt/test

all# service gfs start
all# df -h -tgfs

all# service rgmanager start
# stop all cluster services

all# init 6

#start service my service on each node at the same time
all# service ccsd start
all# service cman start
all# service fenced start
all# service clvmd start

# try to mount and ountmount gfs filesystem manualy
all# mount -tgfs /dev/gfsvg/data01 /mnt/test
all# umount /mnt/test

all# service gfs start
all# df -h -tgfs

all# service rgmanager start
# start all cluster services

9 start up rel5 cluster suite first time

chkconfig --list > /root/chkconfig.log

all# chkconfig --level 2345 rgmanager off
all# chkconfig --level 2345 gfs off
all# chkconfig --level 2345 clvmd off
all# chkconfig --level 2345 cman off
all# chkconfig --level 2345 qdiskd off

all# init 6

#start service on each node at the same time
all# service qdiskd start # if used there
all# service cman start
all# service clvmd start #if CLVM has been used to create clustered volumes

# try to mount and ountmount gfs filesystem manualy
all# mount -tgfs /dev/gfsvg/data01 /mnt/test
all# umount /mnt/test

all# service gfs start #if you are using Red Hat GFS
all# df -h -tgfs

all# service rgmanager start

all# chkconfig --level 2345 rgmanager on
all# chkconfig --level 2345 gfs on #if you are using Red Hat GFS
all# chkconfig --level 2345 clvmd on #if CLVM has been used to create clustered volumes
all# chkconfig --level 2345 cman on
all# chkconfig --level 2345 qdiskd on # if used there
all

still in trouble: go to "cluster faq" at MyLinks