[ClusterLabs] Question about fence_mpath

Marek Grac mgrac at redhat.com
Tue May 2 04:37:47 EDT 2017


Hi,

On Fri, Apr 28, 2017 at 8:09 PM, Chris Adams <linux at cmadams.net> wrote:

> It creates, but any time anything tries to fence (manually or by
> rebooting a node), I get errors in /var/log/messages.  Trying to
> manually fence a node gets:
>
> # pcs stonith fence node2 --off
> Error: unable to fence 'node2'
> Command failed: No such device
>
> Another issue I run into is that fence_mpath tries to access/write to
> /var/run/cluster/mpath.devices, but nothing else creates that directory
> (and it seems that fence_mpath tries to read from it before writing it
> out).
>

File mpath.devices is created during 'unfence' (ON) action, it is very
similar to fence_scsi where unfence is required as well.


Anybody using fence_mpath as a STONITH device with pacemaker/corosync on
> CentOS 7?
>

This is my testing scenario:

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 at host-063 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 123
Status: OFF
[root at host-063 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 456
Status: OFF
------
node63:

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

[root at host-064 ~]# fence_mpath -d /dev/mapper/yellow -o status -k 123
Status: ON
[root at 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 at host-064 ~]# fence_mpath -d /dev/mapper/yellow -o off -k 123
Failed: Cannot open file "/var/run/cluster/mpath.devices"
-----
node64:

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

 m,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20170502/38e045d6/attachment-0003.html>


More information about the Users mailing list