Wiki.Pilas.Guru

DRBD

  1. DRBD 8.4 Official Manual

  2. Full sync DRBD

  3. Persistent Naming

Blog post

  1. DigitalOcean tutorial - How To Create a High Availability Setup with Corosync, Pacemaker, and Reserved IPs on Ubuntu 14.04
  2. HowToForge - How to Set up Nginx High Availability with Pacemaker, Corosync, and Crmsh on Ubuntu 16.04
  3. Linux Cluster Part 3 - Centos 6 OLD
  4. Setup high availability cluster CentOS 8
  5. Detect failures and ensure high availability - Installing and Configuring Corosync/Pacemaker
  6. Active-Passive Cluster for Near HA Using Pacemaker, DRBD, Corosync and MySQL - No sirve: pcs resource master -> pcs resource promotable
  7. Pacemaker & Corosync Cluster Commands Cheat Sheet

Stack Overflow

  1. Corosync HA preventing split-brain scenario
  2. DRBD replication states

Task

  1. Pacemaker Remove Constraints

Man Pages

  1. drbdadm (Debian)
  2. drbdsetup (Debian)
  3. drbd.conf (Debian)
  4. corosync.conf (Debian)
  5. crm - Man Page
  6. pcs - Man Page
  7. pcsd (Debian)
  8. pcs (Debian)

Resource Agents

  1. ocf_linbit_drbd
  2. ocf_heartbeat_lxc
  3. ocf_pacemaker_ping
  4. ocf_heartbeat_MailTo
    1. High Availability Pacemaker Cluster Monitoring

Official documentation

  1. SUSE Linux Enterprise High Availability 12 SP4
    Administration Guide
  2. Pacemaker Explained
  3. Clusters from Scratch - Pacemaker 2.0
  4. Clusterlabs - Pacemarker documentation
  5. Redhat - Moving Resources Due to Connectivity Changes
  6. Redhat - High Availability Add-On Reference

Tools

  1. clufter - Tool/library for transforming/analyzing cluster configuration formats

Finished drbd.service - DRBD -- please disable. Unless you are NOT using a cluster manager..

docscheatsheet

primitive

El comando primitive describe un recurso. Se puede hacer referencia a él solo una vez en objetos de group, clone o master-slave. Si no se hace referencia a él, se coloca como un recurso único en el CIB.

Las operaciones podrán especificarse de forma anónima, grupal o por referencia:

"Anónimo", como una lista de especificaciones de op. Utilice este método si no necesita hacer referencia al conjunto de operaciones en otro lugar. Esta es la forma más común de definir operaciones.

Si desea reutilizar conjuntos de operations, utilice la palabra clave de operations junto con una identificación para darle un nombre al conjunto de operaciones. Utilice la palabra clave operations y un valor id-ref establecido en la identificación de otro conjunto de operaciones para aplicar el mismo conjunto de operaciones a esta primitiva.

Los atributos de operación que no se reconocen se guardan como atributos de instancia de esa operación. Un ejemplo típico es OCF_CHECK_LEVEL.

Para recursos multiestado, los roles se especifican como role=<role>.

Se puede definir una plantilla para recursos que sean del mismo tipo y que compartan la mayor parte de la configuración. Consulte rsc_template para obtener más información.

Los atributos que contienen valores de tiempo, como el atributo de interval en las operaciones, se configuran como un número simple, que se interpreta como un tiempo en segundos, o utilizando uno de los siguientes sufijos:

  s, sec - time in seconds (same as no suffix)
  
  ms, msec - time in milliseconds
  
  us, usec - time in microseconds
  
  m, min - time in minutes
  
  h, hr - time in hours

Usage:

  primitive <rsc> {[<class>:[<provider>:]]<type>|@<template>}
    [description=<description>]
    [[params] attr_list]
    [meta attr_list]
    [utilization attr_list]
    [operations id_spec]
      [op op_type [<attribute>=<value>...] ...]
  
  attr_list :: [$id=<id>] [<score>:] [rule...]
             <attr>=<val> [<attr>=<val>...]] | $id-ref=<id>
  id_spec :: $id=<id> | $id-ref=<id>
  op_type :: start | stop | monitor

Example:

  primitive apcfence stonith:apcsmart \
    params ttydev=/dev/ttyS0 hostlist="node1 node2" \
    op start timeout=60s \
    op monitor interval=30m timeout=60s

  primitive www8 apache \
    configfile=/etc/apache/www8.conf \
    operations $id-ref=apache_ops

  primitive db0 mysql \
    params config=/etc/mysql/db0.conf \
    op monitor interval=60s \
    op monitor interval=300s OCF_CHECK_LEVEL=10

  primitive r0 ocf:linbit:drbd \
    params drbd_resource=r0 \
    op monitor role=Master interval=60s \
    op monitor role=Slave interval=300s

  primitive xen0 @vm_scheme1 xmfile=/etc/xen/vm/xen0

  primitive mySpecialRsc Special \
    params 3: rule #uname eq node1 interface=eth1 \
    params 2: rule #uname eq node2 interface=eth2 port=8888 \
    params 1: interface=eth0 port=9999

group

The group command creates a group of resources. This can be useful when resources depend on other resources and require that those resources start in order on the same node. A common use of resource groups is to ensure that a server and a virtual IP are located together, and that the virtual IP is started before the server.

Grouped resources are started in the order they appear in the group, and stopped in the reverse order. If a resource in the group cannot run anywhere, resources following it in the group will not start.

group can be passed the "container" meta attribute, to indicate that it is to be used to group VM resources monitored using Nagios. The resource referred to by the container attribute must be of type ocf:heartbeat:Xen, ocf:heartbeat:VirtualDomain or ocf:heartbeat:lxc.

Usage:

  group <name> <rsc> [<rsc>...]
    [description=<description>]
    [meta attr_list]
    [params attr_list]
  
  attr_list :: [$id=<id>] <attr>=<val> [<attr>=<val>...] | $id-ref=<id>

Example:

  group internal_www disk0 fs0 internal_ip apache \
    meta target_role=stopped

  group vm-and-services vm vm-sshd meta container="vm"

ms (master)

The ms command creates a master/slave resource type. It may contain a single primitive resource or one group of resources.

Usage:

  ms <name> <rsc>
    [description=<description>]
    [meta attr_list]
    [params attr_list]
  
  attr_list :: [$id=<id>] <attr>=<val> [<attr>=<val>...] | $id-ref=<id>

Example:

  ms disk1 drbd1 \
    meta notify=true globally-unique=false