Hi,

On Fri, Apr 28, 2017 at 8:09 PM, Chris Adams <[email protected]> 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@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

 m,
_______________________________________________
Users mailing list: [email protected]
http://lists.clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org

Reply via email to