Upgrading DRBD is a fairly simple process. This section will cover the process of upgrading from 8.3.x to 8.4.x, however this process should work for all upgrades.
Due to the number of changes between the 8.3 and 8.4 branches we have created separate repositories for each. Perform this repository update on both servers.
Edit your /etc/yum.repos.d/linbit.repo file to reflect the following changes.
[drbd-8.4] name=DRBD 8.4 baseurl=http://packages.linbit.com/<hash>/8.4/rhel6/<arch> gpgcheck=0
![]() | Note |
---|---|
You will have to populate the <hash> and <arch> variables. The <hash> is provided by LINBIT support services. |
Edit /etc/apt/sources.list to reflect the following changes.
deb http://packages.linbit.com/<hash>/8.4/debian squeeze main
![]() | Note |
---|---|
You will have to populate the <hash> variable. The <hash> is provided by LINBIT support services. |
Next you will want to add the DRBD signing key to your trusted keys.
# gpg --keyserver subkeys.pgp.net --recv-keys 0x282B6E23 # gpg --export -a 282B6E23 | apt-key add -
Lastly perform an apt-get update so Debian recognizes the updated repo.
apt-get update
Before you begin make sure your resources are in sync. The output of cat /proc/drbd should show UpToDate/UpToDate.
bob# cat /proc/drbd version: 8.3.12 (api:88/proto:86-96) GIT-hash: e2a8ef4656be026bbae540305fcb998a5991090f build by buildsystem@linbit, 2011-10-28 10:20:38 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----- ns:0 nr:33300 dw:33300 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
Now that you know the resources are in sync, start by upgrading the secondary node. This can be done manually or if you’re using Pacemaker put the node in standby mode. Both processes are covered below. If you’re running Pacemaker do not use the manual method.
bob# /etc/init.d/drbd stop
Put the secondary node into standby mode. In this example bob is secondary.
bob# crm node standby bob
![]() | Note |
---|---|
You can watch the status of your cluster using crm_mon -rf or watch cat /proc/drbd until it shows "Unconfigured" for your resources. |
Now update your packages with either yum or apt.
bob# yum upgrade
bob# apt-get upgrade
Once the upgrade is finished will now have the latest DRBD 8.4 kernel module and drbd-utils on your secondary node, bob. Start DRBD.
bob# /etc/init.d/drbd start
# crm node online bob
The output of cat /proc/drbd on bob should show 8.4.x and look similar to this.
version: 8.4.1 (api:1/proto:86-100) GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by buildsystem@linbit, 2011-12-20 12:58:48 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----- ns:0 nr:12 dw:12 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
![]() | Note |
---|---|
On the primary node, alice, cat /proc/drbd will still show the prior version, until you upgrade it. |
At this point the cluster has two different versions of DRBD. Stop any service using DRBD and then DRBD on the primary node, alice, and promote bob. Again this can be done either manually or via the Pacemaker shell.
alice # umount /dev/drbd/by-res/r0 alice # /etc/init.d/drbd stop bob # drbdadm primary r0 bob # mount /dev/drbd/by-res/r0/0 /mnt/drbd
Please note that the mount command now references /0 which defines the volume number of a resource. See Section A.1, “Volumes” for more information on the new volumes feature.
# crm node standby alice
![]() | Warning |
---|---|
This will interrupt running services by stopping them and migrating them to the secondary server, bob. |
At this point you can safely upgrade DRBD by using yum or apt.
alice# yum upgrade
alice# apt-get upgrade
Once the upgrade is complete you will now have the latest version of DRBD on alice and can start DRBD.
alice# /etc/init.d/drbd start
alice# crm node online alice
![]() | Note |
---|---|
Services will still be located on bob and will remain there until you migrate them back. |
Both servers should now show the latest version of DRBD in a connected state.
version: 8.4.1 (api:1/proto:86-100) GIT-hash: 91b4c048c1a0e06777b5f65d312b38d47abaea80 build by buildsystem@linbit, 2011-12-20 12:58:48 0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r----- ns:0 nr:12 dw:12 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:0
DRBD 8.4 is backward compatible with the 8.3 configs however some syntax has changed. See Section A.2, “Changes to the configuration syntax” for a full list of changes. In the meantime you can port your old configs fairly easily by using drbdadm dump all command. This will output both a new global config followed by the new resource config files. Take this output and make changes accordingly.