[ClusterLabs] 答复: 答复: How to create the stonith resource in virtualbox
Andrei Borzenkov
arvidjaar at gmail.com
Mon Feb 26 06:11:42 EST 2018
On Mon, Feb 26, 2018 at 12:22 PM, 范国腾 <fanguoteng at highgo.com> wrote:
> Hi Marek and all,
>
>
>
> I use the following command to create a stonith resource in
> virtualbox(centos7)which has no /dev/mapper/fence:
>
> pcs stonith create scsi-stonith-device fence_scsi devices=/dev/mapper/fence
> pcmk_monitor_action=metadata pcmk_reboot_action=off pcmk_host_list="node1
> node2" meta provides=unfencing;
>
>
>
>
>
> The stonith resource status could be “started” in 2017 and I think that it
> is because I use the metadata. But when I install a new VM this year and
> create the stonith again using the same command. It always be stopped
> status.
>
>
>
> I try many times and here are current situation:
>
> (1) I created a cluster in 2017 in VM using the following command in
> CENTOS7. The stonith status is started until now.
>
> (2) I created a cluster today in VM using the following command in
> CENTOS7. The stonith status is always stopped.
>
> (3) I created a cluster today in VM using the following command in
> REDHAT7. The stonith status could be started.
>
>
>
> I compare the /usr/sbin/fence_scsi file in different node and it has no
> logic change.
>
>
>
> Why could the Stonith resource could be started? How should I debug it?
>
>
>
> Here is my command:
>
> systemctl stop firewalld;chkconfig firewalld off;
>
>
>
> yum install -y corosync pacemaker pcs gfs2-utils lvm2-cluster *scsi*
> python-clufter;
>
>
>
> pcs cluster auth node1 node2 node3 -u hacluster;pcs cluster setup --name
> cluster_pgsql node1 node2 node3;pcs cluster start --all;pcs property set
> no-quorum-policy=freeze;pcs property set stonith-enabled=true;
>
>
>
> pcs stonith create scsi-stonith-device fence_scsi devices=/dev/mapper/fence
> pcmk_monitor_action=metadata pcmk_reboot_action=off pcmk_host_list="node1
> node2" meta provides=unfencing;
>
>
>
>
>
> Here is the log:
>
> Feb 26 03:55:08 db1 crmd[2215]: notice: Requesting fencing (on) of node db1
>
> Feb 26 03:55:08 db1 stonith-ng[2211]: notice: Client crmd.2215.c5d11cbe
> wants to fence (on) 'db2' with device '(any)'
>
> Feb 26 03:55:08 db1 stonith-ng[2211]: notice: Requesting peer fencing (on)
> of db2
>
> Feb 26 03:55:08 db1 stonith-ng[2211]: notice: Client crmd.2215.c5d11cbe
> wants to fence (on) 'db1' with device '(any)'
>
> Feb 26 03:55:08 db1 stonith-ng[2211]: notice: Requesting peer fencing (on)
> of db1
>
> Feb 26 03:55:08 db1 stonith-ng[2211]: notice: scsi-stonith-device can fence
> (on) db1: static-list
>
> Feb 26 03:55:08 db1 stonith-ng[2211]: notice: scsi-stonith-device can fence
> (on) db1: static-list
>
> Feb 26 03:55:08 db1 fence_scsi: Failed: device "/dev/mapper/fence" does not
> exist
>
It quite clearly tells you what is wrong. You need to create this
device, pacmaker does not do it for you.
More information about the Users
mailing list