[ClusterLabs] dont (re)start a ressource if there is already running

Stefan Krueger Shadow_7 at gmx.net
Wed Nov 1 11:30:44 EDT 2017


I've a configuration where 2nfs servers are running on different nodes and if one node goes down move a ressources to the other one, but dont try to restart the ressource, because it is already running.

My config looks like this:
node 1084815873: zfs-serv1
node 1084815874: zfs-serv2
primitive HA_IP-Serv1 IPaddr2 \
        params ip= cidr_netmask=16 \
        op monitor interval=20 timeout=30 on-fail=restart nic=bond0 \
        meta target-role=Started
primitive HA_IP-Serv2 IPaddr2 \
        params ip= cidr_netmask=16 \
        op monitor interval=10s nic=bond0
primitive nc_storage ZFS \
        params pool=nc_storage importargs="-d /dev/disk/by-partlabel/"
primitive nfs-serv1 systemd:nfs-server \
        op monitor interval=5s
primitive nfs-serv2 systemd:nfs-server \
        op monitor interval=5s
primitive vm_storage ZFS \
        params pool=vm_storage importargs="-d /dev/disk/by-partlabel/"
colocation compl_zfs-serv1 +inf: HA_IP-Serv1 nc_storage nfs-serv1
colocation compl_zfs-serv2 +inf: HA_IP-Serv2 vm_storage nfs-serv2
order start_serv1 nfs-serv1:start nc_storage:start HA_IP-Serv1:start symmetrical=false
order start_serv2 nfs-serv2:start vm_storage:start HA_IP-Serv2:start symmetrical=false
order stop_serv1 HA_IP-Serv1:stop nfs-serv1:stop nc_storage:stop symmetrical=false
order stop_serv2 HA_IP-Serv2:stop nfs-serv2:stop vm_storage:stop symmetrical=false
property cib-bootstrap-options: \
        have-watchdog=false \
        dc-version=1.1.16-94ff4df \
        cluster-infrastructure=corosync \
        cluster-name=debian \
        no-quorum-policy=ignore \
        default-resource-stickiness=100 \
        stonith-enabled=false \

So is it possible to check if the ressource nfs is already running on the other node?

best regards

More information about the Users mailing list