The idiom to use if you have a resource which you want to run on the slave node is similar to the colocation with master case:
<rsc_colocation id="fs_on_drbd0" to="drbd0-partition" to_role="stopped" from="mount-drbd0" score="-infinity"/> <rsc_colocation id="fs_on_drbd0" to="drbd0-partition" to_role="master" from="mount-drbd0" score="-infinity"/>
Translation:
Never run fs_on_drbd0 on a node where drbd0-partition is stopped.
Never run fs_on_drbd0 on a node where drbd0-partition is running as master.
Since the the total set of states for a master/slave resource is {stopped, slave, master}, this only allows the resource to run on a node which is running as slave.
Question:
I don't know how to write the corresponding ordering rule for this case - to ensure that it only runs after being started OR after being demoted from master. Is it necessary? If it isn't necessary, then probably the ordering rule for the master case isn't needed either.
