pcs cluster setup --start --name nfs-server-cluster storage1 storage2 --force
pcs cluster enable --all
pcs resource create Storage Filesystem device=/dev/drbd_vg/drbd_lv directory=/storage fstype=xfs --group HA-GROUP
pcs resource create NFSService nfsserver nfs_shared_infodir=/storage --group HA-GROUP
pcs resource create VIP IPaddr2 ip=192.168.117.111 cidr_netmask=24 --group HA-GROUP
pcs resource create NFSNotify nfsnotify source_host=192.168.117.111 --group HA-GROUP
pcs constraint order Storage then NFSService
pcs constraint order NFSService then NFSExport
pcs constraint order NFSExport then VIP
pcs constraint order set NFSNotify require-all=true
pcs cluster setup --start --name nfs-server-cluster storage1 storage2 --force
pcs cluster cib drbd_cfg
pcs -f drbd_cfg resource create Data ocf:linbit:drbd drbd_resource=r0 op monitor timeout="10" interval="10" role="Slave" op monitor timeout="10" interval="5" role="Master"
pcs -f drbd_cfg resource create Storage Filesystem device="/dev/drbd0" directory="/storage" fstype="xfs" op monitor interval="30s"
pcs -f drbd_cfg resource master DataSync Data master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true
pcs -f drbd_cfg resource create NFS-Server nfsserver nfs_shared_infodir=/storage op monitor interval="30s"
pcs -f drbd_cfg resource group add HA-GROUP Storage NFS-Server
pcs -f drbd_cfg constraint colocation add HA-GROUP DataSync NFS-Server INFINITY with-rsc-role=Master
pcs -f drbd_cfg constraint order promote DataSync then start Storage
pcs -f drbd_cfg constraint order promote Storage then start NFS-Server
pcs -f drbd_cfg resource create ping_check ocf:pacemaker:ping host_list="192.168.117.1" multiplier="1000" dampen=10s op monitor interval=5s
pcs -f drbd_cfg resource clone ping_check globally-unique=false
pcs cluster cib-push drbd_cfg
pcs property set stonith-enabled=false
pcs resource create NFS-Server nfsserver nfs_shared_infodir=/storage op monitor interval="30s" --group HA-GROUP
# pcs status
pcs property set stonith-enabled=false
pcs cluster setup --start --name nfs-server-cluster storage1 storage2 --force
pcs cluster enable --all
pcs cluster cib drbd_cfg
pcs -f drbd_cfg resource create SharedFS Filesystem device=/dev/drbd_vg/drbd_lv directory=/storage fstype=xfs
pcs -f drbd_cfg resource create NFSService nfsserver nfs_shared_infodir=/storage
pcs -f drbd_cfg resource create VIP IPaddr2 ip=192.168.117.111 cidr_netmask=24
pcs -f drbd_cfg resource create NFSNotify nfsnotify source_host=192.168.117.111
pcs -f drbd_cfg resource group add nfsresourcegroup SharedFS NFSService VIP NFSNotify
pcs cluster cib cib-push drbd_cfg
pcs -f drbd_cfg constraint order SharedFS then NFSService
pcs -f drbd_cfg constraint order NFSService then NFSExport
pcs -f drbd_cfg constraint order NFSExport then VIP
pcs -f drbd_cfg constraint order set NFSNotify require-all=true
pcs cluster cib cib-push drbd_cfg
pcs property set stonith-enabled=false
# pcs status
댓글