# pcs resource create ClusterIP ocf:heartbeat:IPaddr2 ip=192.168.0.251 cidr_netmask=24 op monitor interval=20s
Примечание
# pcs resource standards
lsb
ocf
service
systemd
Список доступных поставщиков сценариев ресурсов OCF:
# pcs resource providers
heartbeat
pacemaker
redhat
Список всех агентов ресурсов, доступных для определённого поставщика OCF:
# pcs resource agents ocf:heartbeat
aliyun-vpc-move-ip
anything
AoEtarget
apache
asterisk
…
Xinetd
zabbixserver
ZFS
# pcs status
Cluster name: newcluster
Cluster Summary:
* Stack: corosync
* Current DC: node02 (version 2.1.2-alt1-ada5c3b36) - partition with quorum
* Last updated: Mon Jun 20 15:36:19 2022
* Last change: Mon Jun 20 15:35:55 2022 by root via cibadmin on node01
* 3 nodes configured
* 1 resource instance configured
Node List:
* Online: [ node01 node02 node03 ]
Full List of Resources:
* ClusterIP (ocf::heartbeat:IPaddr2): Started node01
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
# pcs cluster stop node01
node01: Stopping Cluster (pacemaker)...
node01: Stopping Cluster (corosync)...
ClusterIP начнёт работать на node02 (переключение произойдёт автоматически). Проверка статуса на узле node02:
# pcs status
Cluster name: newcluster
Cluster Summary:
* Stack: corosync
* Current DC: node02 (version 2.1.2-alt1-ada5c3b36) - partition with quorum
* Last updated: Mon Jun 20 15:58:38 2022
* Last change: Mon Jun 20 15:35:55 2022 by root via cibadmin on node01
* 3 nodes configured
* 1 resource instance configured
Node List:
* Online: [ node02 node03 ]
* OFFLINE: [ node01 ]
Full List of Resources:
* ClusterIP (ocf:heartbeat:IPaddr2): Started node02
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled