Upload
hadiep
View
214
Download
1
Embed Size (px)
Citation preview
DRBD
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
DRBD
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
Node health flags
node alice
node bob
property no-quorum-policy="ignore" \
stonith-enabled="false" \
node-health-strategy="migrate-on-red”
Node health flags
node alice
node bob
property no-quorum-policy="ignore" \
stonith-enabled="false" \
node-health-strategy="migrate-on-red”
alice:~$ crm_attribute --node alice --name '#health-temp’ --update 'red' --lifetime reboot
migration threshold
primitive p_mysql ocf:heartbeat:mysql \
[…]
meta migration-threshold=“3”
alice:~$ crm resource cleanup p_mysql
DRBD
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
DRBD
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
DRBD
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
resource monitoring
primitive p_ip ocf:heartbeat:IPaddr2 \
params ip=192.168.122.120 \
op monitor interval=20s timeout=10s
resource monitoring
primitive p_vm-staging ocf:heartbeat:VirtualDomain \
params config="/etc/libvirt/qemu/staging.cfg”
resource monitoring
primitive p_vm-staging ocf:heartbeat:VirtualDomain \
params config="/etc/libvirt/qemu/staging.cfg” \
op monitor interval="60s" timeout=“30s”
DRBD
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
DRBD monitoring
primitive p_drbd-backup ocf:linbit:drbd \
params drbd_resource="backup" \
op monitor interval="30s" role="Slave" \
op monitor interval=”25s" role="Master"
DRBD resource level fencing
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
Storage SAN DRBD
GlusterFS Ceph
Corosync
Pacemaker
MySQL RA
Cluster Messaging
Application Interface
Cluster Resource Management
Storage SAN DRBD
GlusterFS Ceph
Corosync
Pacemaker
MySQL RA
Cluster Messaging
Application Interface
Cluster Resource Management
DRBD, the DRBD logo and LINBIT are registered trademarks of LINBIT Information Technologies GmbH. hastexo is not affiliated with the trademark owner.
CRMd (Cluster Resource Manager)
LRMd
MySQL RA
MySQL
LRMd (Local Resource Manager)
Application
Resource Agent (API)
Pacemaker
CRMd (Cluster Resource Manager)
LRMd
MySQL RA
MySQL
LRMd (Local Resource Manager)
Application
Resource Agent (API)
Pacemaker
asterisk
asterisk_monitor {
[…]
ocf_run asterisk –rcx 'core show channels count’
if [ $rc -ne 0 ]; then
ocf_log err "Failed to connect to the Asterisk PBX”
return $OCF_ERR_GENERIC
fi
[…]
}
Asterisk (2)
asterisk_monitor {
[…]
if [ -n "$OCF_RESKEY_monitor_sipuri" ]; then
ocf_run sipsak -s "$OCF_RESKEY_monitor_sipuri”
rc=$?
case "$rc" in
1|2) return $OCF_ERR_GENERIC;;
3) return $OCF_NOT_RUNNING;;
esac
fi
}
VirtualDomain (libvirt)
for script in ${OCF_RESKEY_monitor_scripts}; do script_output="$($script 2>&1)” script_rc=$?
if [ ${script_rc} -ne ${OCF_SUCCESS} ]; then # A monitor script returned a non-success exit # code. Stop iterating over the list of scripts, log a # warning message, and propagate $OCF_ERR_GENERIC.
ocf_log warn "Monitor command \"${script}\" for domain ${DOMAIN_NAME} returned ${script_rc} w/ output: ${script_output}” rc=$OCF_ERR_GENERIC break else
ocf_log debug "Monitor command \"${script}\" for domain ${DOMAIN_NAME} completed successfully with output: ${script_output}”
fi done
VirtualDomain (libvirt)
primitive p_vm-staging ocf:heartbeat:VirtualDomain \
params config="/etc/libvirt/qemu/staging.cfg” \
op monitor interval="60" timeout="60”
VirtualDomain (libvirt)
primitive p_vm-staging ocf:heartbeat:VirtualDomain \
params config="/etc/libvirt/qemu/staging.cfg” \
monitor_scripts=“/usr/local/bin/mymon.sh” \
op monitor interval="60" timeout=“30”