<div dir="ltr">Hi,<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 28, 2017 at 8:09 PM, Chris Adams <span dir="ltr"><<a href="mailto:linux@cmadams.net" target="_blank">linux@cmadams.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">It creates, but any time anything tries to fence (manually or by<br>
rebooting a node), I get errors in /var/log/messages.  Trying to<br>
manually fence a node gets:<br>
<br>
# pcs stonith fence node2 --off<br>
Error: unable to fence 'node2'<br>
Command failed: No such device<br>
<br>
Another issue I run into is that fence_mpath tries to access/write to<br>
/var/run/cluster/mpath.<wbr>devices, but nothing else creates that directory<br>
(and it seems that fence_mpath tries to read from it before writing it<br>
out).<br></blockquote><div><br></div><div>File mpath.devices is created during 'unfence' (ON) action, it is very similar to fence_scsi where unfence is required as well. </div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Anybody using fence_mpath as a STONITH device with pacemaker/corosync on<br>
CentOS 7?<br></blockquote><div><br></div><div>This is my testing scenario:</div><div><br></div><div><pre class="gmail-bz_comment_text gmail-bz_wrap_comment_text" id="gmail-comment_text_18" style="font-size:medium;white-space:pre-wrap;word-wrap:break-word;width:50em;color:rgb(0,0,0)">1) working multipath
2) add name to the multipath device [for every node]
  * multipath -l (will get you WWID of device)
  * in /etc/multipath.conf
  * uncomment multipaths, multipath section and set WWID & alias
  * in this example [yellow]
3) on each node:
  * add reservation_key 0x123 (where 0x123 is a value unique for each node)
  * in this example [0x123, 0x456]
4) on each node; restart multipathd and check if you have /dev/mapper/yellow

node63:

[root@host-063 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 123
Status: OFF
[root@host-063 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 456
Status: OFF
------
node63:

[root@host-063 ~]# fence_mpath -d /dev/mapper/yellow -o on -k 123
Success: Powered ON
[root@host-063 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 123
Status: ON
[root@host-063 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 456
Status: OFF
------
node64:

[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 123
Status: ON
[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 456
Status: OFF
------
node64:
(attempt to fence machine without node itself being unfenced)

[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o off -k 123
Failed: Cannot open file "/var/run/cluster/mpath.devices"
-----
node64:

[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o on -k 456
Success: Powered ON
[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 123
Status: ON
[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 456
Status: ON
[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o off -k 123
Success: Powered OFF
[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 123
Status: OFF
[root@host-064 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 456
Status: ON</pre></div><div> m,</div></div></div></div>