Red Hat Training

A Red Hat training course is available for RHEL 8

27.4. 管理集群中的仲裁设备

您可以使用各种 pcs 命令更改集群中的仲裁设备设置,禁用仲裁设备,以及删除仲裁设备。

27.4.1. 更改仲裁设备设置

您可以使用 pcs quorum device update 命令更改仲裁设备的设置。

警告

要更改仲裁设备模型 的主机 选项 net,请使用 pcs quorum device removepcs quorum device add 命令来正确设置配置,除非旧主机和新主机是同一台机器。

以下命令将仲裁设备算法改为 lms

[root@node1:~]# pcs quorum device update model algorithm=lms
Sending updated corosync.conf to nodes...
node1: Succeeded
node2: Succeeded
Corosync configuration reloaded
Reloading qdevice configuration on nodes...
node1: corosync-qdevice stopped
node2: corosync-qdevice stopped
node1: corosync-qdevice started
node2: corosync-qdevice started

27.4.2. 删除仲裁设备

以下命令删除在集群节点中配置的仲裁设备。

[root@node1:~]# pcs quorum device remove
Sending updated corosync.conf to nodes...
node1: Succeeded
node2: Succeeded
Corosync configuration reloaded
Disabling corosync-qdevice...
node1: corosync-qdevice disabled
node2: corosync-qdevice disabled
Stopping corosync-qdevice...
node1: corosync-qdevice stopped
node2: corosync-qdevice stopped
Removing qdevice certificates from nodes...
node1: Succeeded
node2: Succeeded

删除仲裁设备后,您应该在显示仲裁设备状态时看到以下出错信息。

[root@node1:~]# pcs quorum device status
Error: Unable to get quorum status: corosync-qdevice-tool: Can't connect to QDevice socket (is QDevice running?): No such file or directory

27.4.3. 销毁仲裁设备

以下命令禁用并停止仲裁设备主机上的仲裁设备,并删除其所有配置文件。

[root@qdevice:~]# pcs qdevice destroy net
Stopping quorum device...
quorum device stopped
quorum device disabled
Quorum device 'net' configuration files removed