pasted from some URL as posted on DRBD-user:
/ 2006-05-09 08:53:38 -0400 \ Diego Julian Remolina: You can find my upgrade notes in the following page: https://services.ibb.gatech.edu/wiki/index.php/Howto:Updates:DRBD They are a bit RHEL specific, but the procedure should be very similar with other distros.
DRBD needs to be updated or re-compiled everytime a new kernel is installed. This guide is only for minor version upgrades. Make sure there have not been any API or Protocol changes. In order to update drbd you need to follow these steps:
1. Find and download the latest version of the DRBD packages. Use the 0.7.X series as the newer 0.8.X series is not yet stable.
cd /home/sysadm/src/drbd mkdir 0.7.17 && cd !$ wget http://oss.linbit.com/drbd/0.7/drbd-0.7.17.tar.gz
2. Extract the sources in /usr/src:
cd /usr/src tar -xzf /path/to/drbd-0.7.17.tar.gz cd drbd-0.7.17
3. Find out what is the version of the new kernel so that you can build drbd for that kernel:
root@aragorn drbd-0.7.17]# ls /usr/src/kernels/ 2.6.9-22.0.2.EL-x86_64 2.6.9-22.EL-smp-x86_64 2.6.9-34.EL-smp-x86_64 2.6.9-34.EL-x86_64Since 2.6.9-34 is the latest kernel, then we want to build the package first for the regular kernel and then for the smp kernel. If you use the hugemem kernel then you will need to build for that one too.
4. Build DRBD for all the new kernels:
make rpm KDIR=/usr/src/kernels/2.6.9-34.EL-x86_64 make rpm KDIR=/usr/src/kernels/2.6.9-34.EL-smp-x86_64
5. Install the rpms located in dist/RPMS/{arch}/
Stop Heartbeat and make sure the other server took over correctly. Stop drbd to make sure you can upgrade without your server going into a bad state that can result in an unwanted reboot.
/etc/init.d/drbd stopRemove module to make sure drbd is not in use any longer (stopping drbd usually removes the module, this is just to doduble check).
rmmod drbdUpdate the new drbd packages:
rpm -Fvh --force dist/RPMS/x86_64/drbd-0.7.17-1.x86_64.rpm rpm -Fvh --force dist/RPMS/x86_64/drbd-debuginfo-0.7.14-1.x86_64.rpmNow install the rpms with the drbd kernel modules:
rpm -ivh dist/RPMS/x86_64/drbd-km*.rpm
6. Copy the files to the appropriate rpms folder in /home/sysadm/src in order to make them available when updating the other servers.
mkdir -p /usr/src/drbd-0.7.17/dist/RPMS/x86_64 cp dist/RPMS/x86_64/*.rpm /usr/src/drbd-0.7.17/dist/RPMS/x86_64/
7. You are ready to reboot the server with the new kernel. DRBD should work correctly now.