Facebook
From Sweltering Meerkat, 1 Year ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 168
  1. pcs cluster cib test_drbd
  2. pcs -f test_drbd property set stonith-enabled=false
  3. pcs -f test_drbd property set no-quorum-policy=stop
  4. pcs -f test_drbd resource defaults resource-stickiness=200
  5. pcs -f test_drbd resource create drbd_res ocf:linbit:drbd \
  6.     drbd_resource=www \
  7.     require_drbd_module_version_lt=10.0.0 \
  8.     op monitor role=Master interval=110 timeout=30 \
  9.     op monitor role=Slave interval=120 timeout=30 \
  10.     op start timeout=120 \
  11.     op stop timeout=60
  12.  
  13.  pcs -f test_drbd resource promotable drbd_res \
  14.     master-max=1 master-node-max=1 \
  15.     clone-max=2 clone-node-max=1 \
  16.     notify=true
  17.    
  18. pcs -f test_drbd resource create mystore_FS Filesystem \
  19.     device="/dev/drbd0" \
  20.     directory="/wp-storage" \
  21.     fstype="ext4"
  22.  
  23. pcs -f test_drbd constraint colocation add mystore_FS with drbd_res-clone INFINITY with-rsc-role=Master
  24.  
  25. pcs -f test_drbd constraint order promote drbd_res-clone then start mystore_FS
  26.  
  27. pcs -f test_drbd resource create health_check ocf:heartbeat:anything binfile=/path/to/shellscript.sh  op monitor interval=5s
  28.  
  29. pcs -f test_drbd constraint colocation add health_check with drbd_res-clone INFINITY with-rsc-role=Master
  30. pcs -f test_drbd constraint order promote drbd_res-clone then start health_check
  31.  
  32. pcs -f test_drbd alert create id=drbd_cleanup_file description="Monitor DRBD events and perform post cleanup" path=/var/lib/pacemaker/drbd_cleanup.sh
  33. pcs -f test_drbd alert recipient add drbd_cleanup_file id=logfile value=/var/log/pacemaker_drbd_file.log
  34. pcs cluster cib-push test_drbd