Академический Документы
Профессиональный Документы
Культура Документы
Ahora vamos a crear el cluster llamado prueba y registro de los nodos al cluster.
https://nodename:2224
Creacin de Particin
[root@nodo2~]# pvscan
PV /dev/sdc VG vgcluster lvm2 [400.00 GiB / 0 free]
PV /dev/sdb1 VG vg_data lvm2 [80.00 GiB / 10.00 GiB free]
PV /dev/sda2 VG vg_root lvm2 [49.80 GiB / 5.80 GiB free]
Total: 3 [529.79 GiB] / in use: 3 [529.79 GiB] / in no VG: 0 [0 ]
[root@nodo2~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "vgcluster" using metadata type lvm2
Found volume group "vg_data" using metadata type lvm2
Found volume group "vg_root" using metadata type lvm2
Logical Volume Scan para ver si se replica lo creado en el nodo Nodo2
[root@nodo2~]# lvscan
ACTIVE '/dev/vgcluster/lvcomun' [400.00 GiB] inherit
ACTIVE '/dev/vg_data/lv_var' [10.00 GiB] inherit
ACTIVE '/dev/vg_data/lv_apachelogs' [30.00 GiB] inherit
ACTIVE '/dev/vg_data/lv_apache24' [10.00 GiB] inherit
ACTIVE '/dev/vg_data/lv_apachedocs' [10.00 GiB] inherit
ACTIVE '/dev/vg_data/lv_tmp' [10.00 GiB] inherit
ACTIVE '/dev/vg_root/lv_root' [35.00 GiB] inherit
ACTIVE '/dev/vg_root/lv_home' [5.00 GiB] inherit
ACTIVE '/dev/vg_root/lv_swap' [4.00 GiB] inherit
Revisamos que el LVM pueda ser montado en los dos nodos
Creacin de ipvirtual
Ping a la ip virtual
nodo1> ping 10.4.43.183
PING 10.4.43.183 (192.168.203.190) 56(84) bytes of data.
64 bytes from 10.4.43.183 : icmp_seq=1 ttl=64 time=0.084 ms
64 bytes from 10.4.43.183: icmp_seq=2 ttl=64 time=0.090 ms
nodo1> pcs status
Cluster name: cl_imetdp
Last updated: Tue Nov 16 14:30:58 2016
Last change: Mon Nov 15 14:41:51 2016
Stack: corosync
Current DC: nodo2 (2) - partition with quorum
Version: 1.1.12-a14efad
2 Nodes configured
1 Resources configured
PCSD Status:
nodo1: Online
nodo2: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
Instalamos el servidor web
Instale el servidor Apache en ambos nodos.
Agregue el contenido al final del archivo en todos los nodos del clster.
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
Creacin Filesystem
nodo1> cd /var/www
nodo1> vi index.html
<html>
<body>Hola a todos</body>
</html>
PCSD Status:
nodo1: Online
nodo2: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
Creacin Servidor apache
Cree un recurso apache que supervisar el estado del servidor apache y mover el
recurso a otro nodo en caso de cualquier fallo.
PCSD Status:
nodo1: Online
nodo2: Online
Daemon Status:
corosync: active/enabled
pacemaker: active/enabled
pcsd: active/enabled
Administracion
Movamos los recursos de nodo1 a nodo2 En este caso, no necesitamos mover cada uno
de los recursos manualmente. Slo necesitamos mover el grupo de recursos.
utilizar crm_mon para supervisar el estado del clster en tiempo real. Control + C
para terminar
nodo1> crm_mon
Archivo de configuracin
Habilitamos el stonith
nodo1> pcs property set stonith-enabled=true
https://access.redhat.com/solutions/82333
https://access.redhat.com/solutions/917813
https://www.mankier.com/8/fence_vmware_soap
Administracion Web
https://nodo1:2224
De forma predeterminada, no habr ningn clster agregado al portal. Dado que
tenemos un clster configurado, vamos a agregar a esta interfaz web. Haga clic en el
enlace "+ Aadir existente".
Introduzca una de las direcciones IP del nodo del clster y haga clic en "Agregar existente".
Este proceso automticamente extraer la informacin del clster a la interfaz web.