Saturday, August 29, 2009

DRBD packages in CentOS 4 and CentOS 5 to be updated

The DRBD packages in CentOS 4 and CentOS 5 will soon be updated. Each CentOS version has two DRBD versions.

CentOS 4 DRBD

Version 0.7.25
CentOS 4 currently contains DRBD 0.7.25 (which it was released with) and the newer DRBD 8.2.6. There will be 2 upgrades to CentOS 4. The first is that a new kernel module for DRBD 0.7.25 will be released that is kABI based. This means that you will be able to use it on multiple kernels, and not need to reinstall it. The packages will be kmod-drbd-0.7.25-4.el4 and should be a direct replacement for the current kmods if you are using version 0.7.25 of DRBD.

I recommend that if you are using this version if DRBD, you upgrade it to DRBD 8.3.2 or higher instead. The upgrade from DRBD 0.7.x to DRBD 8.3.x is not trivial, however there is no longer any support for DRBD 0.7.x from Linbit, so I would recommend and upgrade after CentOS releases the 8.3.x version discussed below, that you upgrade to 8.3.x.

Here is an article from Florian Haas on upgrading from version 0.7 to 8.2 (or greater) DRBD.

Version 8.3.x
Currently CentOS 4 also contains version 8.2.6 of DRBD with newer versions of DRBD in the Testing Repo.

Linbit, the upstream provider of DRBD, has released a new 8.3.x tree and they are no longer maintaining the 8.2.x tree. The upgrade from 8.2.x to 8.3.x is not hard and can be done live, so CentOS will release a version 8.3.x DRBD update that replaces 8.2.x

If you planning new DRBD installations, please use 8.3.2 or later versions and not 8.2.x or 0.7.25 versions.

Upgrading from 8.2.x to 8.3.x
When upgrading from DRBD from 8.2.x to 8.3.x (and even when doing a 8.3.x to another newer 8.3.x) you should handle this upgrade a little differently than normal machine updates. Here is a basic outline of how to do the upgrade:

1. Login to your Secondary Node. Verify this is your secondary node with the command service drbd status.

2. Upgrade everything expect your kernel, DRBD and heartbeat. You likely (or at least should) have heartbeat, drbd, kmod-drbd and kernel excluded from your current updates. If you do, then just a the command yum upgrade. If you do not have the above files excluded, this command should work:

yum --exclude="kernel* heartbeat* drbd* kmod-drbd*" upgrade

3. Turn off heartbeat on the secondary node with the command service heartbeat stop. Check your primary node, it should still be running heartbeat and DRBD. The secondary node should only be running DRBD.

4. Turn off DRBD with the command service drbd stop. At this point, you do not have DRBD running on the secondary node.

5. Remove the current kmod that you have installed ... this command should do it: rpm -e kmod-drbd82. (substitute drbd83 for drbd82 if you are doing an inplace upgrade of drbd83)

6. Install the latest CentOS kernel on your machine. If you remove the exclusions in your CentOS-Base.repo file, you can do this with the command yum upgrade kernel\*

7. Install the upgraded drbd83 and kmod-drbd83 with the command yum install drbd83 kmod-drbd83. Note: you may need to substitute upgrade for install if this is an inplace upgrade of drbd83.

8. You will now likely need to reboot on the new kernel, but you do not want drbd and heartbeat to start up on the reboot, so for now do these commands chkconfig heartbeat off AND chkconfig drbd off. Reboot your secondary node machine and log back into it.

9. At this point, you should be running the new kernel and have the new drbd installed. Try starting the drbd with the command service drbd start. Now check the drbd status with the command service drbd status ... the secondary node should be up and running in secondary mode. Once it is also consistent, you should be able to start heartbeat with the command service heartbeat start. Check your /etc/log/ha-log to verify heartbeat is back in secondary mode. Also check heartbeat is running with service heartbeat status

10. If everything is working, turn on heartbeat and drbd to start on boot with the commands:

chkconfig drbd on
chkconfig heartbeat on


11. You should now have your secondary DRBD node back to normal. You should be able to now to login to your primary node and turn off heartbeat on it and have the secondary node pick up as primary using the command service heartbeat stop on your primary node.

12. You should now have your Normal SECONDARY NODE as your current primary and normal primary node as a DRBD secondary with heartbeat turned off. If that is the case, you should be able to upgrade the primary node using steps 2-11 above (skipping step 3) ... substituting primary node for secondary node in the instructions.

Note: When you start heartbeat on the normal primary node, all the loads will move from the secondary mode to the primary mode, so make sure DRBD is running properly before restarting heatbeat on the primary node.

CentOS 5 DRBD

Version 8.0.16
CentOS 5 currently contains DRBD 8.0.x (which it was released with) and DRBD newer 8.2.6.

DRBD 8.0.x is the stable tree, and if you want to use it, it is currently supported. Version 8.0.16 will be released as part of this update. The basic steps to upgrade will be the same as in the procedure above, substituting drbd and drbd-kmod for drbd82 or drbd83.

As long as LinBit supports the 8.0.x tree, CentOS will do the same.

Version 8.3.x
All of the information in the CentOS 4 Version 8.3.x section is applicable to CentOS 5 as well.

The upgrade outline is also the same.

The updates should be released in the next week, so be looking for them on or before Saturday, September 5th, 2009.

No comments:

Post a Comment