On Dec 10, 2007, at 11:31 AM, Remigiusz Stachura wrote:
Hello,
could you explain with more details fencing according to operations on
multi state resources.I have reboots triggered by failures of my drbd
resource only with operations: <op id="drbd0_mon_1" name="monitor"
interval="10s" timeout="5s" role="Master" on_fail="fence"/>.
The rest of operations when resource in master state fails doesn't
work.
How should be done <operations/>, which cause reboot after demote
drbd resource?
How should be done <operations/>, which cause reboot after failure
drbd resource
("not running" - you can see drbd resource in hb_gui in this state
after failure).
Below is my multi state resource with tested <operations>.
for every failed action that you want to cause a fencing operation,
you need to add an entry for it in <operations> and set: on_fail="fence"
just like you did for monitor, but replace "monitor" with (for
example) "demote"
keep in mind though, that any failed action will normally result in
the resource being asked to stop.
if a stop action fails, the default response is to fence the node
(provided stonith is enabled)
<master_slave id="ms-drbd0">
<meta_attributes id="ma-ms-drbd0">
<attributes>
<nvpair id="ma-ms-drbd0-1" name="clone_max" value="2"/>
<nvpair id="ma-ms-drbd0-2" name="clone_node_max"
value="1"/>
<nvpair id="ma-ms-drbd0-3" name="master_max" value="1"/>
<nvpair id="ma-ms-drbd0-4" name="master_node_max"
value="1"/>
<nvpair id="ma-ms-drbd0-5" name="notify" value="yes"/>
<nvpair id="ma-ms-drbd0-6" name="globally_unique"
value="false"/>
<nvpair id="ma-ms-drbd0-7" name="target_role"
value="started"/>
</attributes>
</meta_attributes>
<primitive id="drbd0" class="ocf" provider="heartbeat" type="drbd">
<instance_attributes id="ia-drbd0">
<attributes>
<nvpair id="ia-drbd0-1" name="drbd_resource"
value="drbd0"/>
</attributes>
</instance_attributes>
<operations>
<op id="dummy-resource-stop-drbd0" name="stop"
on_fail="fence"/>
<op id="drbd0_mon_0" name="monitor" interval="12s"
timeout="5s"
on_fail="fence"/>
<op id="drbd0_mon_1" name="monitor" interval="10s"
timeout="5s"
role="Master" on_fail="fence"/>
</operations>
</primitive>
</master_slave>
thanks
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems