corosync

/etc/corosync/corosync.conf

# Please read the openais.conf.5 manual page

totem {
         version: 2

         # How long before declaring a token lost (ms)
         token: 3000

         # How many token retransmits before forming a new configuration
         token_retransmits_before_loss_const: 10

         # How long to wait for join messages in the membership protocol (ms)
         join: 60

         # How long to wait for consensus to be achieved before starting a new round of membership configuration (ms)
         consensus: 3600

         # Turn off the virtual synchrony filter
         vsftype: none

         # Number of messages that may be sent by one processor on receipt of the token
         max_messages: 20

         # Limit generated nodeids to 31-bits (positive signed integers)
         clear_node_high_bit: yes

         # Disable encryption
         secauth: off

         # How many threads to use for encryption/decryption
         threads: 0

         # Optionally assign a fixed node id (integer)
         # nodeid: 1234

         # This specifies the mode of redundant ring, which may be none, active, or passive.
         rrp_mode: none

         interface {
                 # The following values need to be set based on your environment
                 ringnumber: 0
                 bindnetaddr: 10.11.12.2
                 mcastaddr: 226.94.1.1
                 mcastport: 5405
         }
}

amf {
         mode: disabled
}

service {
         # Load the Pacemaker Cluster Resource Manager
         ver:       0
         name:      pacemaker
}
service {
         ver:       0
         name:      openais_ckpt
}
aisexec {
         user:   root
         group:  root
}

logging {
         fileline: off
         to_stderr: yes
         to_logfile: no
         to_syslog: yes
         syslog_facility: daemon
         debug: off
         timestamp: on
         logger_subsys {
                 subsys: AMF
                 debug: off
                 tags: enter|leave|trace1|trace2|trace3|trace4|trace6
         }
}

/etc/drbd.d/plutoCL.res

resource  plutoCL {
         startup {
                 become-primary-on both;
         }
         net {
                 allow-two-primaries;
                 after-sb-0pri discard-zero-changes;
                 after-sb-1pri discard-secondary;
                 after-sb-2pri disconnect;
         }
         on plutone {
                 device  /dev/drbd0;
                 disk    /dev/sda10;
                 address 10.11.12.1:7789;
                 meta-disk internal;
         }
         on pluto {
                 device  /dev/drbd0;
                 disk    /dev/sda10;
                 address 10.11.12.2:7789;
                 meta-disk internal;
         }
}

/etc/ocfs2/cluster.conf

cluster:
         name = plutoCL
         node_count = 2

node:
         ip_port = 7777
         ip_address = 10.11.12.1
         number = 0
         name = plutone
         cluster = plutoCL

node:
         ip_port = 7777
         ip_address = 10.11.12.2
         number = 1
         name = pluto
         cluster = plutoCL

property stonith-enabled=false

primitive resDRBD ocf:linbit:drbd \
params drbd_resource="plutoCL" \
operations $id="resDRBD-operation" \
op monitor interval="20" role="Master" timeout="20" \
op monitor interval="30" role="Slave"  timeout="20" \
op start timeout="240s" \
op stop timeout="100s"
ms msDRBD resDRBD meta resource-stickines="100" notify="true" master-max="2" interleave="true"

primitive resDLM ocf:pacemaker:controld op monitor interval="120s" op start timeout="90s" op stop timeout="100s"
clone cloneDLM resDLM meta globally-unique="false" interleave="true"

colocation colDLMDRBD inf: cloneDLM msDRBD:Master
order ordDRBDDLM 0: msDRBD:promote cloneDLM

primitive resO2CB ocf:pacemaker:o2cb op monitor interval="120s" op start timeout="90s" op stop timeout="100s"
clone cloneO2CB resO2CB meta globally-unique="false" interleave="true"
colocation colO2CBDLM inf: cloneO2CB cloneDLM
order ordDLMO2CB 0: cloneDLM cloneO2CB

primitive resFS ocf:heartbeat:Filesystem params device="/dev/drbd0" directory="/srv" fstype="ocfs2" op monitor interval="120s" timeout="40s" op start timeout="60s" op stop timeout="60s"
clone cloneFS resFS meta interleave="true" ordered="true"
colocation colFSO2CB inf: cloneFS cloneO2CB
order ordO2CBFS 0: cloneO2CB cloneFS

appunti
ricorda openvais per il blocco openais_ckpt

la formattazione con ocfs2 deve essere fatta sul cluster montatato da pacemaker se no, non funge.

This entry was posted in Gnu/Linux. Bookmark the permalink.

Lascia un Commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *

*

È possibile utilizzare questi tag ed attributi XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>