Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # create temp config file in order to have atomic commit of config
- pcs cluster cib ha_cfg
- # define DRBD resources
- pcs -f ha_cfg resource create dvl_drbd ocf:linbit:drbd drbd_resource=dvlstorage op monitor interval=30s
- # define DRBD master/slave sets
- pcs -f ha_cfg resource master dvl_drbdms dvl_drbd master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true
- # define iSCSI targets
- pcs -f ha_cfg resource create dvl_tgt ocf:heartbeat:iSCSITarget \
- params implementation="tgt" iqn="iqn.2016-04.net.customer:dvlstorage" tid=1 \
- op start interval="0" timeout="60" op stop interval="0" timeout="60" op monitor interval="30" timeout="60"
- # define iSCSI luns
- pcs -f ha_cfg resource create dvl_tgtlun ocf:heartbeat:iSCSILogicalUnit \
- params implementation="tgt" target_iqn="iqn.2016-04.net.customer:dvlstorage" lun=1 path=/dev/drbd/dvl \
- op start interval="0" timeout="60" op stop interval="0" timeout="60" op monitor interval="30" timeout="60"
- # define floating IPs
- pcs -f ha_cfg resource create dvl_floatip ocf:heartbeat:IPaddr2 ip=10.177.4.105 cidr_netmask=32 op monitor interval=30s
- # define resource groups and order/constraints
- pcs -f ha_cfg resource group add dvl_resources dvl_tgt dvl_tgtlun dvl_floatip
- pcs -f ha_cfg constraint colocation add started dvl_resources with master dvl_drbdms INFINITY
- pcs -f ha_cfg constraint order promote dvl_drbdms then start dvl_resources
- # merge
- pcs cluster cib-push ha_cfg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement