RH Cluster suite

From Tuxunix
Jump to: navigation, search


  • Réseau
IP Port Number
Port Number Protocol Compenent
5404, 5405 UDP corosync/cman (Cluster Manager)
11111 TCP ricci (propagates updated cluster information)
21064 TCP dlm (Distributed Lock Manager)
16851 TCP modclusterd
  • Stockage :

San ou SCSI + Quorum


#> yum install rgmanager ricci ccs
  • Init du password pour ricci
#> passwd ricci
  • Création du quorum :
#> mkqdisk -c /dev/mapper/mpathXX -l QUORUM-DISK
  • Info quorum :
#> mkqdisk -L -d
mkqdisk v0.6.0
       Magic:                eb7a62c2
       Label:                QUROUM-DISK
       Created:              Tue Mar 24 11:53:17 2015
       Host:                 srv1
       Kernel Sector Size:   512
       Recorded Sector Size: 512



vi /etc/lvm/lvm.conf

modifier les lignes :

filter = [ "a|/dev/cciss/.*|", "a|/dev/mapper/mpath.*|", "r|.*|" ]
volume_list = [ "rootvg", "vg_projet", "@<cluster node name>" ]
dracut --force
filter = [ "a|/dev/cciss/.*|", "a|/dev/mapper/mpath.*|", "r|.*|" ]
volume_list = [ "rootvg", "vg_projet", "@<cluster node name>" ]
dracut --force

Vérification de la conf :

[root@srv1 ~]# egrep "^[ ]*locking_type|^[ ]*volume_list|^[ ]*filter =" /etc/lvm/lvm.conf
filter = [ "a|/dev/cciss/.*|", "a|/dev/mapper/mpath.*|", "r|.*|" ]
locking_type = 1
volume_list = [ "rootvg", "vg_projet", "@<cluster node name>" ]

Fichier Hosts

[root@psu789 ~]# cat /etc/hosts localhost.localdomain localhost
X.X.X.X srv1 

X.X.X.X srv1-cl
X.X.X.X srv2-cl

Fichier Cluster

<cluster config_version="4" name="<Cluster name>">
    <logging logfile_priority="info" syslog_priority="notice"/>
              <clusternode name="<serveur 1>-cl" nodeid="1">
                        <method name="fence_par_<serveur 1>-cons">
                             <device name="<serveur 1>-cons"/>
         <clusternode name="<serveur 2>-cl" nodeid="2">
                   <method name="fence_par_<serveur 2>-cons">
                        <device name="<serveur 2>-cons"/>
    <cman expected_votes="3"/>
         <fencedevice agent="fence_ilo" delay="10" ipaddr="<ip console serveur 1>" lanplus="1" login="<user console>" name="<serveur 1>-cons" passwd="<passwd user console>" power_wait="4"/>
         <fencedevice agent="fence_ilo" delay="1" ipaddr="<ip console serveur 2>" lanplus="1" login="<user console>" name="<serveur 2>-cons" passwd="<passwd user console>" power_wait="4"/>
         <failoverdomain name="<Cluster name>" nofailback="1" ordered="0" restricted="0">
              <failoverdomainnode name="<serveur 1>-cl"/>
              <failoverdomainnode name="<serveur 2>-cl"/>
    <service autostart="0" domain="<Cluster name>" exclusive="0" name="<>" recovery="relocate">
              <lvm name="lvm_<>" vg_name="<vg name>"/>
              <fs device="/dev/<vg name>/<lv name>" force_fsck="0" force_unmount="1" fstype="ext4" mountpoint="<point de montage>" name="<nom lv user friendly>" options="" self_fence="0"/>
              <ip address="<ip package>" monitor_link="1"/>
    <totem token="60000"/>
    <quorumd allow_kill="0" interval="3" label="<label Quorum Disk>" reboot="0" tko="8" votes="1"/>



#> clustat
Cluster Status for CL-TEST @ Tue Mar 24 17:01:17 2015
Member Status: Quorate

Member Name                                              ID   Status
------ ----                                              ---- ------
srv1-cl                                                    1 Online, Local
srv2-cl                                                    2 Online
/dev/dm-18                                                 0 Online, Quorum Disk


#> cman_tool status
Version: 6.2.0
Config Version: 4
Cluster Name: CL-TEST
Cluster Id: 8638
Cluster Member: Yes
Cluster Generation: 8
Membership state: Cluster-Member
Nodes: 2
Expected votes: 3
Quorum device votes: 1
Total votes: 3
Node votes: 1
Quorum: 2
Active subsystems: 9
Flags: Dirty
Ports Bound: 0 178
Node name: srv1-cl
Node ID: 1
Multicast addresses:
Node addresses:


#> /sbin/fence_tool -h
fence_tool <join|leave|dump|dumpconfig|readconfig> [options]

 join             Join the default fence domain
 leave            Leave default fence domain
 dump             Dump debug buffer from fenced

 -m <n>           Delay join up to n seconds for all nodes in cluster.conf
                  to be cluster members
 -w               Wait for join to complete
 -V               Print program version information, then exit
 -h               Print this help, then exit
 -t <n>           Maximum time in seconds to wait
 -Q               Fail if cluster is not quorate, don't wait


  • Les votes :

1 noeud = 1 vote

1 quorum = 1 vote