CentOs DRBD Kernel conflicts

2 Comments

Trabajando en la instalacion de un cluster de correo de alta disponibilidad (high availability cluster o HA) con arreglo de disco en red (DRBD – network raid-1) sobre Linux CentOS.

Durante la instalacion del software tuve unos problemas o conflictos de version al instalar el modulo drbd del Kernel, al parecer el manejo de dependencias de yum esta en pañales comparado con el de apt, por alguna razon extraña la imagen actualizada del kernel tenia conflictos con los modulos del drbd. A continuacion comparto con ustedes mi solucion;

Para instalar el heartbeat, con la aplicacion del drbd y el respectivo modulo del kernel tecleamos;

[root@mail01 ~]# yum install heartbeat drbd kmod-drbd
Total download size: 17 M
Is this ok [y/N]: Y
Downloading Packages:
(1/8): heartbeat-2.1.3-3. 100% |=========================| 1.7 MB    01:45
(2/8): kernel-2.6.18-53.1 100% |=========================|  13 MB    07:51
(3/8): kmod-drbd-8.0.11-1 100% |=========================| 797 kB    00:17
(4/8): heartbeat-pils-2.1 100% |=========================| 213 kB    00:04
(5/8): drbd-8.0.11-1.el5. 100% |=========================| 134 kB    00:02
(6/8): heartbeat-stonith- 100% |=========================| 311 kB    00:06
(7/8): PyXML-0.8.4-4.i386 100% |=========================| 1.1 MB    01:09
(8/8): drbd82-8.2.5-1.el5 100% |=========================| 141 kB    00:04
Running Transaction Test
Finished Transaction Test

Varias lineas despues, luego de resolver dependencias;

Transaction Check Error:
package kernel-2.6.18-53.1.19.el5 (which is newer than kernel-2.6.18-53.1.14.el5) is already installed
file /etc/drbd.conf conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /etc/rc.d/init.d/drbd conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /sbin/drbdadm conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /sbin/drbdmeta conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /sbin/drbdsetup conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /usr/share/man/man5/drbd.conf.5.gz conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /usr/share/man/man8/drbd.8.gz conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /usr/share/man/man8/drbdadm.8.gz conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /usr/share/man/man8/drbddisk.8.gz conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /usr/share/man/man8/drbdmeta.8.gz conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos
file /usr/share/man/man8/drbdsetup.8.gz conflicts between attempted installs of drbd82-8.2.5-1.el5.centos and drbd-8.0.11-1.el5.centos

Error Summary
-------------

Despues de leer bien el error, decidi borrar la version actualizada del kernel y regresar asi a la anterior.

[root@mail01 ~]# yum erase kernel-2.6.18-53.1.19.el5
Running Transaction
Removing  : kernel                       ######################### [1/1]

Removed: kernel.i686 0:2.6.18-53.1.19.el5
Complete!

Despues del downgrade del kernel, no recuerdo bien, pero les recomiendo reiniciar para asi arrancar con el kernel viejo. Ya que estemos corriendo la version del kernel de CentOS deseada, procedemos a instalar el modulo del DRBD, tecleando;

[root@mail01 ~]# yum install heartbeat kmod-drbd
Installed: heartbeat.i386 0:2.1.3-3.el5.centos kmod-drbd.i686 0:8.0.11-1.2.6.18_53.1.14.el5
Dependency Installed: PyXML.i386 0:0.8.4-4 drbd.i386 0:8.0.11-1.el5.centos heartbeat-pils.i386 0:2.1.3-3.el5.centos heartbeat-stonith.i386 0:2.1.3-3.el5.centos kernel.i686 0:2.6.18-53.1.14.el5
Complete!

Iniciando DRBD

Ahora que ya tenemos insertado el modulo en el kernel correcto, probemos ejecutar el servicio del DRBD.

[root@mail01 ~]# service drbd start
/etc/drbd.conf:20: in resource r0, on mail01 { ... } ... on mail02 { ... }:
There are multiple host sections for the peer.
Maybe misspelled local host name 'mail02.guatewireless.org'?
/etc/drbd.conf:20: in resource r0, there is no host section for this host.
Missing 'on mail02.guatewireless.org {...}' ?
Starting DRBD resources:    /etc/drbd.conf:20: in resource r0, on mail01 { ... } ... on mail02 { ... }:
There are multiple host sections for the peer.
Maybe misspelled local host name 'mail02.guatewireless.org'?
/etc/drbd.conf:20: in resource r0, there is no host section for this host.
Missing 'on mail02.guatewireless.org {...}' ?
Can not load the drbd module.

El error de Can not load the drbd module no es para asustarse, simplemente el servicio del DRBD no puede encontrar o resolver el nombre del mail02. Editamos el archivo /etc/hosts y agregamos mail01 y mail02 para que lo pueda resolver.

Con el cambio anterior reiniciamos el servidor y probamos hacer un ping. Si contesta existosamente, ya podemos levantar el servidio del DRBD, tecleando;

[root@mail01 ~]# service drbd start

--==  Thank you for participating in the global usage survey  ==--
The server's response is:

In the future drbdadm will only contact usage.drbd.org when you update
DRBD or when you use 'drbdadm create-md'. Of course it will continue
to ask you for confirmation as long as 'usage-count' is at its default
value of 'ask'.

Just press [enter] to continue:

Listo...
Starting DRBD resources:    [ d(r0) s(r0) n(r0) ].

Para ver si el DRBD esta funcionando correctamente

[root@node1 etc]# watch -n 1 cat /proc/drbd
version: 8.0.11 (api:86/proto:86)
GIT-hash: b3fe2bdfd3b9f7c2f923186883eb9e2a0d3a5b1b build by buildsvn@c5-i386-build, 2008-03-09 10:26:33

 1: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---
    ns:1064988 nr:0 dw:13160 dr:1413581 al:103 bm:480 lo:0 pe:0 ua:0 ap:0
        resync: used:0/31 hits:66066 misses:295 starving:0 dirty:0 changed:295
        act_log: used:0/257 hits:3187 misses:111 starving:0 dirty:8 changed:103

Mas info | Centos HA-Drbd

2 Replies to “CentOs DRBD Kernel conflicts”

  1. Para una version mas actualizada de Centos si estamos corriendo el kernel 2.6.18-92.1.13.el5 es necesario removerlo

    yum erase kernel-2.6.18-92.1.13.el5

    En lugar de kernel-2.6.18-53.1.19.el5, como dice en el articulo.

Deja tus preguntas o comentarios