drbd自从kernel3.1 成为内核一部分,但是rhel 6 没有drbd支持,因此我们自己可以打包rpm。
1、下载drbd 源码包
- mkdir -p ~/rpmbuild/SOURCES
- cd ~/rpmbuild/SOURCES/
- wget http://oss.linbit.com/drbd/8.4/drbd-8.4.3.tar.gz
2、编译
- tar zxvf drbd-8.4.3.tar.gz
- cd drbd-8.4.3
- ./configure --enable-spec --with-km
- rpmbuild -ba drbd.spec
- rpmbuild -ba drbd-km.spec
3、编译获得的SRPM包
- drbd-8.4.3-2.el6.src.rpm
- drbd-km-8.4.3-2.el6.src.rpm
编译获得的RPM包
- drbd-8.4.3-2.el6.x86_64.rpm
- drbd-bash-completion-8.4.3-2.el6.x86_64.rpm
- drbd-debuginfo-8.4.3-2.el6.x86_64.rpm
- drbd-heartbeat-8.4.3-2.el6.x86_64.rpm
- drbd-km-2.6.32_358.2.1.el6.x86_64-8.4.3-2.el6.x86_64.rpm
- drbd-km-debuginfo-8.4.3-2.el6.x86_64.rpm
- drbd-pacemaker-8.4.3-2.el6.x86_64.rpm
- drbd-udev-8.4.3-2.el6.x86_64.rpm
- drbd-utils-8.4.3-2.el6.x86_64.rpm
- drbd-xen-8.4.3-2.el6.x86_64.rpm
4、安装drbd rpm包
- rpm -ivh drbd-8.4.3-2.el6.x86_64.rpm drbd-km-2.6.32_358.2.1.el6.x86_64-8.4.3-2.el6.x86_64.rpm
5、检查并加载内核模块
- modprobe -l |grep drbd
- modporbe drbd
- lsmod |grep drbd
缺点:每次内核升级,需要重新编译drbd的SRPM包。
默认编译会产生很多个子包,并且有依赖关系,于是自己编译打包的一份drbd srpm,欢迎下载
http://down.51cto.com/data/705710