<div dir="ltr"><div><div><div><div><div>Hi Klaus,<br><br></div>Thank you for your quickly reply.<br><br></div>Below is my crm_resource output :<br></div><div># crm_resource --resource ora_fs -query-xml<br></div><div>ora_fs (ocf::heartbeat:Filesystem):    Started <a href="http://node2.albertlab.com">node2.albertlab.com</a><br>xml:<br>&lt;primitive class=&quot;ocf&quot; id=&quot;ora_fs&quot; provider=&quot;heartbeat&quot; type=&quot;Filesystem&quot;&gt;<br>  &lt;instance_attributes id=&quot;ora_fs-instance_attributes&quot;&gt;<br>    &lt;nvpair id=&quot;ora_fs-instance_attributes-device&quot; name=&quot;device&quot; value=&quot;/dev/mapper/volgroup-lvgroup&quot;/&gt;<br>    &lt;nvpair id=&quot;ora_fs-instance_attributes-directory&quot; name=&quot;directory&quot; value=&quot;/oradata&quot;/&gt;<br>    &lt;nvpair id=&quot;ora_fs-instance_attributes-fstype&quot; name=&quot;fstype&quot; value=&quot;ext4&quot;/&gt;<br>  &lt;/instance_attributes&gt;<br>  &lt;operations&gt;<br>    &lt;op id=&quot;ora_fs-start-interval-0s&quot; interval=&quot;0s&quot; name=&quot;start&quot; timeout=&quot;60&quot;/&gt;<br>    &lt;op id=&quot;ora_fs-stop-interval-0s&quot; interval=&quot;0s&quot; name=&quot;stop&quot; timeout=&quot;60&quot;/&gt;<br>    &lt;op id=&quot;ora_fs-monitor-interval-20&quot; interval=&quot;20&quot; name=&quot;monitor&quot; timeout=&quot;40&quot;/&gt;<br>  &lt;/operations&gt;<br>&lt;/primitive&gt;<br><br></div><div>I checked the document about &#39;on-fail&#39; operation, you&#39;re right, my filesystem resource behavior work correctly , it failover to another node to &#39;restart&#39; the resource. so, if i add the on-fail parameter for &quot;move to another node and fence the node itself&quot; purpose as below, am i right ?<br></div><div><br># pcs resource op remove ora_fs monitor<br># pcs resource op add ora_fs monitor interval=20 timeout=40 on-fail=fence<br></div><div><br></div><div>I&#39;m curios about why only my &#39;filesystem&#39; resource will not trigger stonith, but when &#39;vip&#39; resource fail, the resource located host will be triggered reboot immediately. (stonith : <span style="font-weight:bold">fence_ipmilan</span>)<br></div><br></div>here is my &#39;ora_vip&#39; resource output<br></div># crm_resource --resource ora_vip --query-xml<br>ora_vip        (ocf::heartbeat:IPaddr2):       Started <a href="http://node2.albertlab.com">node2.albertlab.com</a><br>xml:<br>&lt;primitive class=&quot;ocf&quot; id=&quot;ora_vip&quot; provider=&quot;heartbeat&quot; type=&quot;IPaddr2&quot;&gt;<br>  &lt;instance_attributes id=&quot;ora_vip-instance_attributes&quot;&gt;<br>    &lt;nvpair id=&quot;ora_vip-instance_attributes-ip&quot; name=&quot;ip&quot; value=&quot;192.168.11.10&quot;/&gt;<br>    &lt;nvpair id=&quot;ora_vip-instance_attributes-cidr_netmask&quot; name=&quot;cidr_netmask&quot; value=&quot;24&quot;/&gt;<br>  &lt;/instance_attributes&gt;<br>  &lt;operations&gt;<br>    &lt;op id=&quot;ora_vip-start-interval-0s&quot; interval=&quot;0s&quot; name=&quot;start&quot; timeout=&quot;20s&quot;/&gt;<br>    &lt;op id=&quot;ora_vip-stop-interval-0s&quot; interval=&quot;0s&quot; name=&quot;stop&quot; timeout=&quot;20s&quot;/&gt;<br>    &lt;op id=&quot;ora_vip-monitor-interval-10s&quot; interval=&quot;10s&quot; name=&quot;monitor&quot; timeout=&quot;20s&quot;/&gt;<br>  &lt;/operations&gt;<br>&lt;/primitive&gt;<br><br><div><div><div>thanks a lot.<br></div><div><div><div><div><div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 2, 2017 at 9:17 PM, Klaus Wenninger <span dir="ltr">&lt;<a href="mailto:kwenning@redhat.com" target="_blank">kwenning@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 05/02/2017 02:57 PM, Ken Gaillot wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; Upstream documentation on fencing in Pacemaker is available at:<br>
&gt;<br>
&gt; <a href="http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#idm139683949958512" rel="noreferrer" target="_blank">http://clusterlabs.org/doc/en-<wbr>US/Pacemaker/1.1-pcs/html-<wbr>single/Pacemaker_Explained/<wbr>index.html#idm139683949958512</a><br>
&gt;<br>
&gt; Higher-level tools such as crm shell and pcs make it easier; see their<br>
&gt; man pages and other documentation for details.<br>
&gt;<br>
&gt;<br>
&gt; On 05/01/2017 10:35 PM, Albert Weng wrote:<br>
&gt;&gt; Hi All,<br>
&gt;&gt;<br>
&gt;&gt; My environment :<br>
&gt;&gt; (1) two node (active/passive) pacemaker cluster<br>
&gt;&gt; (2) SAN storage attached, add resource type &quot;filesystem&quot;<br>
&gt;&gt; (3) OS : RHEL 7.2<br>
&gt;&gt;<br>
&gt;&gt; In old version of RHEL cluster, when attached SAN storage path lost(ex.<br>
&gt;&gt; filesystem fail),<br>
&gt;&gt; active node will trigger fence device to reboot itself.<br>
&gt;&gt;<br>
&gt;&gt; but when i use pacemaker on RHEL cluster, when i remove fiber cable on<br>
&gt;&gt; active node, all resources failover to passive node normally, but active<br>
&gt;&gt; node doesn&#39;t reboot.<br>
<br>
</span>That is the default on-fail behavior of pacemaker-operations (==restart -<br>
either on the node itself or another node - except for stop where it is<br>
fence).<br>
Using the on-fail behavior fence as well for start &amp; monitor should give<br>
you the desired behavior as I got it from your description.<br>
<br>
Regards,<br>
Klaus<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
&gt;&gt;<br>
&gt;&gt; how to trigger fence reboot action when SAN filesystem lost?<br>
&gt;&gt;<br>
&gt;&gt; Thank a lot~~~<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Kind regards,<br>
&gt;&gt; Albert Weng<br>
&gt;&gt;<br>
&gt;&gt; &lt;<a href="https://www.avast.com/sig-email?utm_medium=email&amp;utm_source=link&amp;utm_campaign=sig-email&amp;utm_content=webmail" rel="noreferrer" target="_blank">https://www.avast.com/sig-<wbr>email?utm_medium=email&amp;utm_<wbr>source=link&amp;utm_campaign=sig-<wbr>email&amp;utm_content=webmail</a>&gt;<br>
&gt;&gt;      不含病毒。<a href="http://www.avast.com" rel="noreferrer" target="_blank">www.avast.com</a><br>
&gt; ______________________________<wbr>_________________<br>
&gt; Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
&gt; <a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
&gt;<br>
&gt; Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
&gt; Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
&gt; Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
<br>
<br>
______________________________<wbr>_________________<br>
Users mailing list: <a href="mailto:Users@clusterlabs.org">Users@clusterlabs.org</a><br>
<a href="http://lists.clusterlabs.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.clusterlabs.org/<wbr>mailman/listinfo/users</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" rel="noreferrer" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" rel="noreferrer" target="_blank">http://www.clusterlabs.org/<wbr>doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://bugs.clusterlabs.org" rel="noreferrer" target="_blank">http://bugs.clusterlabs.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Kind regards,<br>Albert Weng</div>
</div></div></div></div></div></div></div></div></div></div></div>