Editando
Pacemaker
(sección)
De jagfloriano.com
Ir a la navegación
Ir a la búsqueda
Advertencia:
no has iniciado sesión. Tu dirección IP se hará pública si haces cualquier edición. Si
inicias sesión
o
creas una cuenta
, tus ediciones se atribuirán a tu nombre de usuario, además de otros beneficios.
Comprobación antispam. ¡
No
rellenes esto!
== Pacemaker == === Instalación === PACEMAKER RHEL9 <syntaxhighlight lang="bash"> [root@nodo1 ~]# subscription-manager repos \ --enable=rhel-9-for-x86_64-highavailability-rpms Repository 'rhel-9-for-x86_64-highavailability-rpms' is enabled for this system. [root@nodo2 ~]# subscription-manager repos \ --enable=rhel-9-for-x86_64-highavailability-rpms Repository 'rhel-9-for-x86_64-highavailability-rpms' is enabled for this system. </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo1 ~]# dnf install -y pacemaker pcs fence-agents-all lvm2 [root@nodo2 ~]# dnf install -y pacemaker pcs fence-agents-all lvm2 </syntaxhighlight> === Configuración Cluster === <syntaxhighlight lang="bash"> [root@nodo1 ~]# systemctl enable --now pcsd Created symlink /etc/systemd/system/multi-user.target.wants/pcsd.service → /usr/lib/systemd/system/pcsd.service. [root@nodo1 ~]# [root@nodo2 ~]# systemctl enable --now pcsd Created symlink /etc/systemd/system/multi-user.target.wants/pcsd.service → /usr/lib/systemd/system/pcsd.service. [root@nodo2 ~]# </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo1 ~]# passwd hacluster Changing password for user hacluster. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@nodo1 ~]# [root@nodo2 ~]# passwd hacluster Changing password for user hacluster. New password: Retype new password: passwd: all authentication tokens updated successfully. [root@nodo2 ~]# </syntaxhighlight> <syntaxhighlight lang="bash"> root@nodo1 ~]# firewall-cmd --add-service=high-availability --permanent success [root@nodo1 ~]# firewall-cmd --reload success [root@nodo1 ~]# [root@nodo2 ~]# firewall-cmd --add-service=high-availability --permanent success [root@nodo2 ~]# firewall-cmd --reload success </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo1 ~]# pcs host auth nodo1 nodo2 Username: hacluster Password: nodo1: Authorized nodo2: Authorized [root@nodo1 ~]# [root@nodo2 ~]# pcs host auth nodo1 nodo2 Username: hacluster Password: nodo1: Authorized nodo2: Authorized [root@nodo2 ~]# </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo2 ~]# pcs cluster setup iscsi-cluster nodo1 nodo2 No addresses specified for host 'nodo1', using 'nodo1' No addresses specified for host 'nodo2', using 'nodo2' Destroying cluster on hosts: 'nodo1', 'nodo2'... nodo1: Successfully destroyed cluster nodo2: Successfully destroyed cluster Requesting remove 'pcsd settings' from 'nodo1', 'nodo2' nodo2: successful removal of the file 'pcsd settings' nodo1: successful removal of the file 'pcsd settings' Sending 'corosync authkey', 'pacemaker authkey' to 'nodo1', 'nodo2' nodo2: successful distribution of the file 'corosync authkey' nodo2: successful distribution of the file 'pacemaker authkey' nodo1: successful distribution of the file 'corosync authkey' nodo1: successful distribution of the file 'pacemaker authkey' Sending 'corosync.conf' to 'nodo1', 'nodo2' nodo2: successful distribution of the file 'corosync.conf' nodo1: successful distribution of the file 'corosync.conf' Cluster has been successfully set up. [root@nodo2 ~]# </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo2 ~]# pcs status Error: error running crm_mon, is pacemaker running? crm_mon: Connection to cluster failed: Connection refused </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo2 ~]# pcs cluster start --all nodo1: Starting Cluster... nodo2: Starting Cluster... </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo2 ~]# pcs cluster enable --all nodo1: Cluster Enabled nodo2: Cluster Enabled </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo2 ~]# pcs status Cluster name: iscsi-cluster WARNINGS: No stonith devices and stonith-enabled is not false error: Resource start-up disabled since no STONITH resources have been defined error: Either configure some or disable STONITH with the stonith-enabled option error: NOTE: Clusters with shared data need STONITH to ensure data integrity warning: Node nodo1 is unclean but cannot be fenced warning: Node nodo2 is unclean but cannot be fenced error: CIB did not pass schema validation Errors found during check: config not valid Cluster Summary: * Stack: unknown (Pacemaker is running) * Current DC: NONE * Last updated: Sat Jan 3 00:28:04 2026 on nodo2 * Last change: Sat Jan 3 00:27:58 2026 by hacluster via hacluster on nodo2 * 2 nodes configured * 0 resource instances configured Node List: * Node nodo1: UNCLEAN (offline) * Node nodo2: UNCLEAN (offline) Full List of Resources: * No resources Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo2 ~]# pcs property set stonith-enabled=false </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo2 ~]# pcs status Cluster name: iscsi-cluster Cluster Summary: * Stack: corosync (Pacemaker is running) * Current DC: nodo2 (version 2.1.10-1.el9-5693eaeee) - partition with quorum * Last updated: Sat Jan 3 00:34:35 2026 on nodo2 * Last change: Sat Jan 3 00:34:28 2026 by root via root on nodo2 * 2 nodes configured * 0 resource instances configured Node List: * Online: [ nodo1 nodo2 ] Full List of Resources: * No resources Daemon Status: corosync: active/enabled pacemaker: active/enabled pcsd: active/enabled [root@nodo2 ~]# </syntaxhighlight> === Configuración LVM === ==== Crear VG con el disco compartido: ==== <syntaxhighlight lang="bash"> [root@nodo1 ~]# pvcreate /dev/sdb Physical volume "/dev/sdb" successfully created. </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo1 ~]# vgcreate vg_shared /dev/sdb Physical volume "/dev/sdb" successfully created. Volume group "vg_shared" successfully created </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo1 ~]# lvcreate -n lv_data -l 100%FREE vg_shared Logical volume "lv_data" created. </syntaxhighlight> <syntaxhighlight lang="bash"> [root@nodo1 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 rhel lvm2 a-- <19.00g 0 /dev/sdb vg_shared lvm2 a-- 39.96g 0 [root@nodo1 ~]# [root@nodo2 ~]# pvs PV VG Fmt Attr PSize PFree /dev/sda2 rhel lvm2 a-- <19.00g 0 /dev/sdb vg_shared lvm2 a-- 39.96g 0 [root@nodo2 ~]# </syntaxhighlight>
Resumen:
Ten en cuenta que todas las contribuciones a jagfloriano.com pueden ser editadas, modificadas o eliminadas por otros colaboradores. Si no deseas que las modifiquen sin limitaciones, no las publiques aquí.
Al mismo tiempo, asumimos que eres el autor de lo que escribiste, o lo copiaste de una fuente en el dominio público o con licencia libre (véase
Jagfloriano.com:Derechos de autor
para más detalles).
¡No uses textos con copyright sin permiso!
Cancelar
Ayuda de edición
(se abre en una ventana nueva)
Menú de navegación
Acciones de página
Página
Discusión
Leer
Editar
Historial
Page actions
Página
Discusión
Más
Herramientas
Herramientas personales
No has accedido
Discusión
Contribuciones
Crear una cuenta
Acceder
Navegación
Página principal
Linux
Ansible
Labs
Buscar
Herramientas
Lo que enlaza aquí
Cambios relacionados
Páginas especiales
Información de la página