Pacemaker / Corosync / DRBD Cheatsheet

Monitor the status:


Migrate all resources to another node:

crm resource migrate rg_main <fqdn_node_name>

Take node offline and online (be careful, this sets a ‘prefer’ to the other node to force a transition, which may or may not get removed afterwards):

crm node standby
crm node online

Start and stop all resources (warning, this will take them completely offline, NOT migrate):

crm resource stop rg_main
crm resource start rg_main

Show configuration:

crm configure show

If resources are stuck in ‘(unmanaged) FAILED’ state, e.g. due to a failed stop action, you can clear it out:

crm_resource -P
crm resource cleanup rg_main

Be careful — this could trigger a migration if the stuck resources were preventing one. Make sure you’re ready for one.

Monitor the cluster status along with fail counts:

crm_mon --failcount

One-shot status output:

crm status

Check DRBD status:

cat /proc/drbd

DRBD split-brain cleanup on secondary node:

drbdadm disconnect main
drbdadm -- --discard-my-data connect main

DRBD split-brain cleanup on primary node:

drbdadm disconnect main
drbdadm primary main
drbdadm connect main

Scheduler optimizing on large arrays (untested):

echo deadline > /sys/block/sdb/queue/scheduler
echo 0 >  /sys/block/sdb/queue/iosched/front_merges
echo 150 > /sys/block/sdb/queue/iosched/read_expire
echo 1500 > /sys/block/sdb/queue/iosched/write_expire

No Comments.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Anti-Spam Quiz: