# Created by Diego Julian Remolina # Systems Support Specialist III # Institute for Bioengineering and Bioscience # Georgia Institute of Technology # Last edited: 11/16/2005 drbd needs to be updated (re-compiled) everytime a new kernel is installed. In order to update drbd you need to follow these steps: 1. Make sure there were not protocol or api changes so that you can do changes in the secondary, then let it sync and then bring the primary down. ON THE SECONDARY (aragorn): 2. Update the system so that the new kernels get installed up2date -u -f 3. Extract the sources in /usr/src: cd /usr/src tar -xzf /path/to/drbd-0.7.14.tar.gz 4. Find out what the new kernel is so that you can build drbd for that kernel: root@aragorn drbd-0.7.14]# ls /usr/src/kernels/ 2.6.9-22.EL-hugemem-i686 2.6.9-22.EL-i686 2.6.9-22.EL-smp-i686 2.6.9-5.0.5.EL-i686 Since 2.6.9-22 is the latest kernel, then we want to build the package for the smp kernel. 5. Now you are ready to build for your new kernel: make rpm KDIR=/usr/src/kernels/2.6.9-22.0.1.EL-i686 make rpm KDIR=/usr/src/kernels/2.6.9-22.0.1.EL-smp-i686 6. Install the rpms located in dist/RPMS/{arch}/ - Stop current drbd /etc/init.d/drbd stop - Remove module in case is still loaded rmmod drbd - Remove drbd-OLDVERSION rpms, except the drbd km rpm so that you keep the module in case you need to fall back to the old kernel rpm -Fvh --force dist/RPMS/i386/drbd-* 7. Reboot the server. NOW THE PRIMARY 8. Copy the rpms from the secondary to the primary. DO NOT INSTALL THEM YET. /tmp is a good location. 9. Stop heartbeat on the primary and make sure the secondary took over Usually nfs4 needs the /etc/init.d/rpcidmapd restart for the clients to keep working. 10. Update the primary: up2date -u -f 11. Remove old rpms and install new ones: cd /tmp rpm -Fvh --force drbd-*.rpm 13. Reboot the primary and make sure it comes back up and takes over correctly.