| 71 | DRBD Master/Master with Pacemaker: |
| 72 | {{{ |
| 73 | echo drbd > /etc/modules-load.d/drbd.conf |
| 74 | pcs resource create drbd-opt ocf:linbit:drbd drbd_resource=drbdopt op monitor interval=60s |
| 75 | pcs resource master drbd-opt-clone drbd-opt master-max=2 master-node-max=1 clone-max=2 clone-node-max=1 notify=true |
| 76 | pcs constraint location drbd-opt-clone prefers a1 a2 |
| 77 | pcs constraint location drbd-opt-clone avoids s1 s2 g1 |
| 78 | }}} |
| 79 | |
| 80 | GFS2 /opt on DRBD: |
| 81 | {{{ |
| 82 | mkfs.gfs2 -p lock_dlm -j 2 -t a-nodes-drbd:opt /dev/drbd1 |
| 83 | pcs resource create gfs2opt Filesystem device="/dev/drbd1" directory="/opt" fstype="gfs2" |
| 84 | pcs constraint colocation add gfs2opt with drbd-opt-clone INFINITY with-rsc-role=Master |
| 85 | pcs constraint colocation add gfs2opt with dlm-clone INFINITY |
| 86 | pcs constraint order promote drbd-opt-clone then start gfs2opt |
| 87 | pcs constraint order dlm-clone then gfs2opt |
| 88 | pcs resource clone gfs2opt |
| 89 | }}} |
| 90 | |