[ClusterLabs] start service after filesystemressource

Andrei Borzenkov arvidjaar at gmail.com
Fri Nov 20 14:45:53 UTC 2015


20.11.2015 16:38, haseningo at gmx.de пишет:
> Hi,
> I want to start several services after the drbd ressource an the filessystem is
> avaiable. This is my current configuration:
> node $id="184548773" host-1 \
>           attributes standby="on"
> node $id="184548774" host-2 \
>           attributes standby="on"
> primitive collectd lsb:collectd \
>           op monitor interval="10" timeout="30" \
>           op start interval="0" timeout="120" \
>           op stop interval="0" timeout="120"
> primitive failover-ip1 ocf:heartbeat:IPaddr \
>           params ip="192.168.6.6" nic="eth0:0" cidr_netmask="32" \
>           op monitor interval="10s"
> primitive failover-ip2 ocf:heartbeat:IPaddr \
>           params ip="192.168.6.7" nic="eth0:1" cidr_netmask="32" \
>           op monitor interval="10s"
> primitive failover-ip3 ocf:heartbeat:IPaddr \
>           params ip="192.168.6.8" nic="eth0:2" cidr_netmask="32" \
>           op monitor interval="10s"
> primitive res_drbd_export ocf:linbit:drbd \
>           params drbd_resource="hermes"
> primitive res_fs ocf:heartbeat:Filesystem \
>           params device="/dev/drbd0" directory="/mnt" fstype="ext4"
> group mygroup failover-ip1 failover-ip2 failover-ip3 collectd
> ms ms_drbd_export res_drbd_export \
>           meta notify="true" master-max="1" master-node-max="1" clone-max="2"
> clone-node-max="1"
> location cli-prefer-collectd collectd inf: host-1
> location cli-prefer-failover-ip1 failover-ip1 inf: host-1
> location cli-prefer-failover-ip2 failover-ip2 inf: host-1
> location cli-prefer-failover-ip3 failover-ip3 inf: host-1
> location cli-prefer-res_drbd_export res_drbd_export inf: hermes-1
> location cli-prefer-res_fs res_fs inf: host-1
> colocation c_export_on_drbd inf: mygroup res_fs ms_drbd_export:Master
> order o_drbd_before_services inf: ms_drbd_export:promote res_fs:start
> property $id="cib-bootstrap-options" \
>           dc-version="1.1.10-42f2063" \
>           cluster-infrastructure="corosync" \
>           stonith-enabled="false" \
>           no-quorum-policy="ignore" \
>           last-lrm-refresh="1447686090"
> #vim:set syntax=pcmk
> I don't found the right way, to order the startup of new services (example
> collectd), after the /mnt is mounted.

Just order them after res_fs, same as you order res_fs after 
ms_drbd_export. Or may be I misunderstand your question?





More information about the Users mailing list