Changes

Jump to: navigation, search

HA cluster with DRBD and Heartbeat

3,457 bytes added, 08:56, 4 August 2006
How to do OpenVZ kernel updates when it contains a new DRBD version
== How to do OpenVZ kernel updates when it contains a new DRBD version ==
 As mentioned above, it is important to use the correct version of the DRBD userspace tools. When an OpenVZ kernel contains a new DRBD version, it is important that the DRBD API version of the userspace tools matches the API version of the DRBD module that is included in the OpenVZ kernel. The API versions can be found at http://svn.drbd.org/drbd/branches/drbd-0.7/ChangeLog. The best way is to always use the version of the DRBD userspace tools that matches the version of the DRBD module that is included in the OpenVZ kernel. In this example the initial cluster installed contained OpenVZ kernel 2.6.8-022stab078.10, which contains the DRBD module 0.7.17. The steps below should the update procedure to OpenVZ kernel 2.6.8-022stab078.14, which contains the DRBD module 0.7.20.In the first step build the DRBD userspace tools version 0.7.20 on your buildmachine. Then stop Heartbeat and DRBD on the passive node (Ihint: you can use 'cat /proc/drbd'll to get a hint which node is active and which one is passive):<pre>[root@ovz-node2 ~]# cat /proc/drbdversion: 0.7.17 (api:77/proto:74)SVN Revision: 2093 build by phil@mescal, 2006-03-06 15:04:12 0: cs:Connected st:Secondary/Primary ld:Consistent ns:60 nr:136 dw:196 dr:97 al:3 bm:3 lo:0 pe:0 ua:0 ap:0[root@ovz-node2 ~]# /etc/init.d/heartbeat stopStopping High-Availability services: [ OK ][root@ovz-node2 ~]# cat /proc/drbdversion: 0.7.17 (api:77/proto:74)SVN Revision: 2093 build by phil@mescal, 2006-03-06 15:04:12 0: cs:Connected st:Secondary/Primary ld:Consistent ns:60 nr:136 dw:196 dr:97 al:3 bm:3 lo:0 pe:0 ua:0 ap:0[root@ovz-node2 ~]# /etc/init.d/drbd stopStopping all DRBD resources.[root@ovz-node2 ~]# cat /proc/drbdcat: /proc/drbd: No such file or directory[root@ovz-node2 ~]#</pre>Then install the new kernel and the DRBD userspace tools on this node:<pre>[root@ovz-node2 ~]# rpm -ihv ovzkernel-2.6.8-022stab078.14.i686.rpmwarning: ovzkernel-2.6.8-022stab078.14.i686.rpm: V3 DSA signature: NOKEY, key ID a7a1d4b6Preparing... ########################################### [100%] 1:ovzkernel ########################################### [100%][root@ovz-node2 ~]# rpm -Uhv drbd-0.7.20-1.i386.rpmPreparing... ########################################### [100%] 1:drbd ########################################### [100%]/sbin/serviceStopping all DRBD resources.[root@ovz-node2 ~]#</pre>Now set the new kernel as default kernel in /etc/grub.conf and then reboot this node. After the reboot, the new DRBD version is visible:<pre>[root@ovz-node2 ~]# cat /proc/drbdversion: 0.7.20 (api:79/proto:74)SVN Revision: 2260 build by phil@mescal, 2006-07-04 15:18:57 0: cs:Connected st:Secondary/Primary ld:Consistent ns:0 nr:28 dw:28 dr:0 al:0 bm:2 lo:0 pe:0 ua:0 ap:0[root@ovz-node2 ~]#</pre> To update this part soonthe other node, switch-over the services to make the current active node the passive node. Execute the following on the still active node (it could be that the hb_standby command is located in /usr/lib/heartbeat):<pre>[root@ovz-node1 ~]# /usr/lib64/heartbeat/hb_standby2006/08/03_21:09:41 Going standby [all].[root@ovz-node1 ~]#</pre> Now do the same steps on the new passive node to update it: stop Heartbeat and DRBD, install the new kernel and the new DRBD userspace tools, set the new kernel as default kernel in /etc/grub.conf and reboot the node.
== How to do updates of vzctl, vzctl-lib, and vzquota ==
21
edits

Navigation menu