OpenVZ Forum


Home » General » Support » Building DRBD 8.3.4 against OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7
Building DRBD 8.3.4 against OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7 [message #38234] Tue, 01 December 2009 09:16 Go to next message
triangle
Messages: 6
Registered: May 2009
Junior Member
I am failing to build a DRBD 8.3.4 RPM packet on a system running the OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7.

Building the DRBD 8.3.4 RPM packet on the same system running the CentOS kernel 2.6.18-164.2.1.el5 works fine.

The DRBD source code is taken from http://oss.linbit.com/drbd/8.3/drbd-8.3.4.tar.gz

My questions:
- Are there any hints to make DRBD 8.3.4 compile successfully on 2.6.18-164.2.1.el5.028stab066.7?
- Is it safe to use the DRBD 8.3.4 userland tools built on the CentOS kernel 2.6.18-164.2.1.el5 on the 2.6.18-164.2.1.el5.028stab066.7-based OpenVZ host?

Thanks for your help! David

These kernel-related packages are installed on the system:

[root@hostname drbd-8.3.4]# rpm -qa | grep kernel
kernel-headers-2.6.18-164.6.1.el5
ovzkernel-devel-2.6.18-164.2.1.el5.028stab066.7
kernel-devel-2.6.18-164.6.1.el5
kernel-2.6.18-164.2.1.el5
ovzkernel-2.6.18-164.2.1.el5.028stab066.7
kernel-2.6.18-164.6.1.el5
kernel-devel-2.6.18-164.2.1.el5
[root@hostname drbd-8.3.4]#

Here are the details about the failing build process:

[root@hostname drbd-8.3.4]# uname -a
Linux hostname.domain.net 2.6.18-164.2.1.el5.028stab066.7 #1 SMP Thu Nov 26 06:53:20 MSK 2009 i686 i686 i386 GNU/Linux
[root@hostname drbd-8.3.4]#

[root@hostname drbd-8.3.4]# pwd
/tmp/drbd-8.3.4
[root@hostname drbd-8.3.4]# make rpm
checking for presence of 8\.3\.4 in various changelog files

debian/changelog needs update [ignored]

make -C drbd drbd_buildtag.c
make[1]: Entering directory `/tmp/drbd-8.3.4/drbd'
make[1]: Leaving directory `/tmp/drbd-8.3.4/drbd'
make -C documentation doc
make[1]: Entering directory `/tmp/drbd-8.3.4/documentation'
make[1]: Nothing to be done for `doc'.
make[1]: Leaving directory `/tmp/drbd-8.3.4/documentation'
test -e .filelist
ln -sf drbd/linux/drbd_config.h drbd_config.h
rm -f drbd-8.3.4
ln -s . drbd-8.3.4
for f in $(<.filelist) ; do [ -e $f ] && continue ; echo missing: $f ; exit 1; done
grep debian .filelist >/dev/null 2>&1 && _DEB=-debian || _DEB="" ; \
tar --owner=0 --group=0 -czf - -T .filelist > drbd-8.3.4$_DEB.tar.gz
rm drbd-8.3.4
mkdir -p dist/BUILD \
dist/RPMS \
dist/SPECS \
dist/SOURCES \
dist/TMP \
dist/install \
dist/SRPMS
[ -h dist/SOURCES/drbd-8.3.4.tar.gz ] || \
ln -s /tmp/drbd-8.3.4/drbd-8.3.4.tar.gz \
/tmp/drbd-8.3.4/dist/SOURCES/drbd-8.3.4.tar.gz
if test drbd.spec.in -nt dist/SPECS/drbd.spec ; then \
sed -e "s/^\(Version:\).*/\1 8.3.4/;" \
-e "s/^\(Packager:\).*/\1 root@hostname.domain.net/;" < drbd.spec.in \
> dist/SPECS/drbd.spec ; \
fi
rpmbuild -bb \
--define "_topdir /tmp/drbd-8.3.4/dist" \
--define "buildroot /tmp/drbd-8.3.4/dist/install" \
--define "kernelversion 2.6.18-164.2.1.el5.028stab066.7" \
--define "kdir /lib/modules/2.6.18-164.2.1.el5.028stab066.7/build" \
\
/tmp/drbd-8.3.4/dist/SPECS/drbd.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.54854
+ umask 022
+ cd /tmp/drbd-8.3.4/dist/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /tmp/drbd-8.3.4/dist/BUILD
+ rm -rf drbd-8.3.4
+ /bin/gzip -dc /tmp/drbd-8.3.4/dist/SOURCES/drbd-8.3.4.tar.gz
+ tar -xvvf -
-rw-rw-r-- root/root 875 2008-11-24 11:43:32 drbd-8.3.4/.gitignore
drwxr-xr-x Creating directory: drbd-8.3.4
-rw-rw-r-- root/root 17990 2008-11-24 11:43:32 drbd-8.3.4/COPYING
-rw-rw-r-- root/root 26897 2009-10-06 14:34:41 drbd-8.3.4/ChangeLog
-rw-rw-r-- root/root 7054 2009-05-26 14:49:07 drbd-8.3.4/Makefile
-rw-rw-r-- root/root 425 2009-05-26 14:49:07 drbd-8.3.4/README
-rw-rw-r-- root/root 191 2009-05-26 14:49:07 drbd-8.3.4/benchmark/Makefile
drwxr-xr-x Creating directory: drbd-8.3.4/benchmark
-rw-rw-r-- root/root 95 2007-10-22 17:38:27 drbd-8.3.4/benchmark/README
-rw-rw-r-- root/root 10173 2009-07-27 10:47:42 drbd-8.3.4/benchmark/dm.c
-rw-rw-r-- root/root 8639 2009-07-27 10:47:42 drbd-8.3.4/benchmark/io-latency-test.c
-rw-rw-r-- root/root 2293 2009-08-26 15:27:50 drbd-8.3.4/documentation/Makefile
drwxr-xr-x Creating directory: drbd-8.3.4/documentation
-rw-rw-r-- root/root 2860 2008-11-24 11:43:32 drbd-8.3.4/documentation/Makefile.lang
-rw-rw-r-- root/root 2018 2009-08-26 15:27:50 drbd-8.3.4/documentation/aspell.en.per
-rw-rw-r-- root/root 68148 2009-09-29 10:03:16 drbd-8.3.4/documentation/drbd.conf.xml
-rw-rw-r-- root/root 3522 2009-08-26 15:27:50 drbd-8.3.4/documentation/drbd.xml
-rw-rw-r-- root/root 18425 2009-08-26 15:27:50 drbd-8.3.4/documentation/drbdadm.xml
-rw-rw-r-- root/root 3176 2009-08-26 15:27:50 drbd-8.3.4/documentation/drbddisk.xml
-rw-rw-r-- root/root 7163 2009-08-26 15:27:50 drbd-8.3.4/documentation/drbdmeta.xml
-rw-rw-r-- root/root 70034 2009-09-29 10:03:19 drbd-8.3.4/documentation/drbdsetup.xml
-rw-rw-r-- root/root 28845 2009-10-06 14:34:36 drbd-8.3.4/drbd.spec.in
-rw-rw-r-- root/root 1734 2009-09-29 10:35:31 drbd-8.3.4/drbd/Kconfig
drwxr-xr-x Creating directory: drbd-8.3.4/drbd
-rw-rw-r-- root/root 7565 2009-09-07 12:21:47 drbd-8.3.4/drbd/Makefile
-rw-rw-r-- root/root 362 2009-08-26 15:27:50 drbd-8.3.4/drbd/Makefile-2.6
-rw-rw-r-- root/root 4932 2009-07-27 10:47:43 drbd-8.3.4/drbd/cn_queue.c
-rw-rw-r-- root/root 12046 2009-10-06 13:32:41 drbd-8.3.4/drbd/connector.c
-rw-rw-r-- root/root 41271 2009-09-14 16:04:52 drbd-8.3.4/drbd/drbd_actlog.c
-rw-rw-r-- root/root 37380 2009-08-26 15:27:50 drbd-8.3.4/drbd/drbd_bitmap.c
-rw-rw-r-- root/root 77793 2009-09-14 16:04:52 drbd-8.3.4/drbd/drbd_int.h
-rw-rw-r-- root/root 106310 2009-09-14 16:44:36 drbd-8.3.4/drbd/drbd_main.c
-rw-rw-r-- root/root 67642 2009-10-05 14:52:03 drbd-8.3.4/drbd/drbd_nl.c
-rw-rw-r-- root/root 7485 2009-08-26 15:27:50 drbd-8.3.4/drbd/drbd_proc.c
-rw-rw-r-- root/root 124900 2009-09-14 16:04:52 drbd-8.3.4/drbd/drbd_receiver.c
-rw-rw-r-- root/root 37373 2009-08-26 15:27:50 drbd-8.3.4/drbd/drbd_req.c
-rw-rw-r-- root/root 10346 2009-08-26 15:27:50 drbd-8.3.4/drbd/drbd_req.h
-rw-rw-r-- root/root 4243 2009-08-26 15:27:50 drbd-8.3.4/drbd/drbd_strings.c
-rw-rw-r-- root/root 21430 2009-09-29 09:51:14 drbd-8.3.4/drbd/drbd_tracing.c
-rw-rw-r-- root/root 2655 2009-07-27 10:47:43 drbd-8.3.4/drbd/drbd_tracing.h
-rw-rw-r-- root/root 11513 2009-07-27 10:47:43 drbd-8.3.4/drbd/drbd_vli.h
-rw-rw-r-- root/root 41241 2009-09-14 16:04:52 drbd-8.3.4/drbd/drbd_worker.c
-rw-rw-r-- root/root 16844 2009-08-26 15:27:50 drbd-8.3.4/drbd/drbd_wrappers.h
-rw-rw-r-- root/root 4091 2009-07-27 10:47:42 drbd-8.3.4/drbd/linux/connector.h
drwxr-xr-x Creating directory: drbd-8.3.4/drbd/linux
-rw-rw-r-- root/root 9923 2009-10-05 14:52:03 drbd-8.3.4/drbd/linux/drbd.h
-rw-rw-r-- root/root 3059 2009-10-06 14:32:17 drbd-8.3.4/drbd/linux/drbd_config.h
-rw-rw-r-- root/root 3881 2009-09-29 09:51:14 drbd-8.3.4/drbd/linux/drbd_limits.h
-rw-rw-r-- root/root 4068 2009-07-28 16:26:11 drbd-8.3.4/drbd/linux/drbd_nl.h
-rw-rw-r-- root/root 2772 2009-07-27 10:47:43 drbd-8.3.4/drbd/linux/drbd_tag_magic.h
-rw-rw-r-- root/root 26 2009-07-27 10:47:42 drbd-8.3.4/drbd/linux/hardirq.h
-rw-rw-r-- root/root 12315 2009-07-27 10:47:43 drbd-8.3.4/drbd/linux/lru_cache.h
-rw-rw-r-- root/root 133 2009-07-27 10:47:43 drbd-8.3.4/drbd/linux/memcontrol.h
-rw-rw-r-- root/root 611 2009-07-27 10:47:42 drbd-8.3.4/drbd/linux/mutex.h
-rw-rw-r-- root/root 19 2009-07-27 10:47:43 drbd-8.3.4/drbd/linux/tracepoint.h
-rw-rw-r-- root/root 14754 2009-08-26 15:27:50 drbd-8.3.4/drbd/lru_cache.c
-rw-rw-r-- root/root 5379 2009-08-26 15:27:50 drbd-8.3.4/scripts/Makefile
drwxr-xr-x Creating directory: drbd-8.3.4/scripts
-rw-rw-r-- root/root 755 2009-06-09 13:33:03 drbd-8.3.4/scripts/README
-rwxrwxr-x root/root 5651 2009-10-05 14:52:03 drbd-8.3.4/scripts/adjust_drbd_config_h.sh
-rwxrwxr-x root/root 8047 2009-05-26 14:49:07 drbd-8.3.4/scripts/block-drbd
-rwxrwxr-x root/root 16152 2009-09-07 12:21:47 drbd-8.3.4/scripts/crm-fence-peer.sh
-rwxrwxr-x root/root 5607 2009-06-09 13:33:03 drbd-8.3.4/scripts/drbd
-rwxrwxr-x root/root 6250 2009-06-09 13:33:03 drbd-8.3.4/scripts/drbd-overview.pl
-rw-rw-r-- root/root 23759 2009-08-26 15:27:50 drbd-8.3.4/scripts/drbd.conf
-rw-rw-r-- root/root 3380 2008-11-24 11:43:33 drbd-8.3.4/scripts/drbd.gentoo
-rw-rw-r-- root/root 1420 2009-05-26 14:49:07 drbd-8.3.4/scripts/drbd.metadata.rhcs
-rw-rw-r-- root/root 24297 2009-10-05 09:42:05 drbd-8.3.4/scripts/drbd.ocf
-rw-rw-r-- root/root 649 2009-06-09 13:33:03 drbd-8.3.4/scripts/drbd.rules
-rwxrwxr-x root/root 3353 2009-05-26 14:49:07 drbd-8.3.4/scripts/drbd.sh.rhcs
-rw-rw-r-- root/root 4514 2009-05-26 14:49:07 drbd-8.3.4/scripts/drbdadm.bash_completion
-rwxrwxr-x root/root 2141 2009-05-26 14:49:07 drbd-8.3.4/scripts/drbddisk
-rw-rw-r-- root/root 1117 2009-05-26 14:49:07 drbd-8.3.4/scripts/drbdupper
-rwxrwxr-x root/root 334 2008-11-24 11:43:33 drbd-8.3.4/scripts/get_uts_release.sh
-rwxrwxr-x root/root 3526 2009-08-26 15:27:50 drbd-8.3.4/scripts/notify.sh
-rwxrwxr-x root/root 3015 2008-11-24 11:43:33 drbd-8.3.4/scripts/outdate-peer.sh
-rw-rw-r-- root/root 5455 2009-08-26 15:27:50 drbd-8.3.4/scripts/patch-kernel
-rw-rw-r-- root/root 2732 2009-05-26 14:49:07 drbd-8.3.4/scripts/pretty-proc-drbd.sh
-rwxrwxr-x root/root 2099 2009-05-26 14:49:07 drbd-8.3.4/scripts/snapshot-resync-ta
...

Re: Building DRBD 8.3.4 against OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7 [message #38242 is a reply to message #38234] Tue, 01 December 2009 14:27 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

Hi,

in this OpenVZ Version, drbd is upgraded to 8.3.4 in the prebuild kernel package -> please see changelog at:

http://wiki.openvz.org/Download/kernel/rhel5/028stab066.7

Only load the drbd linux kernel module on your hardware node.

Bye,
Thorsten
Re: Building DRBD 8.3.4 against OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7 [message #38258 is a reply to message #38242] Wed, 02 December 2009 09:52 Go to previous messageGo to next message
triangle
Messages: 6
Registered: May 2009
Junior Member
Hmm... Is your answer really correct or do I get something wrong?

The OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7 contains - as expected - only the kernel module of DRBD:

[root@hostname ~]# rpm --query --filesbypkg ovzkernel-2.6.18-164.2.1.el5.028stab066.7 | grep drbd
ovzkernel /lib/modules/2.6.18-164.2.1.el5.028stab066.7/kernel/drivers/ block/drbd
ovzkernel /lib/modules/2.6.18-164.2.1.el5.028stab066.7/kernel/drivers/ block/drbd/drbd.ko
[root@hostname ~]#

The DRBD userland tools (such as /sbin/drbdadm) are obviously provided by another package. When running the OpenVZ kernel 2.6.18-128.1.1.el5.028stab062.3 (which contains DRBD 8.3.0 kernel code)
I am using the package drbd-8.3.0-3 to get these tools:

[root@hostname ~]# rpm --query --filesbypkg drbd-8.3.0-3
drbd /etc/drbd.conf
drbd /etc/ha.d/resource.d/drbddisk
drbd /etc/ha.d/resource.d/drbdupper
drbd /etc/rc.d/init.d/drbd
drbd /etc/xen/scripts/block-drbd
drbd /sbin/drbdadm
drbd /sbin/drbdmeta
drbd /sbin/drbdsetup
drbd /usr/lib/drbd/notify-out-of-sync.sh
drbd /usr/lib/drbd/notify-split-brain.sh
drbd /usr/lib/drbd/notify.sh
drbd /usr/lib/drbd/outdate-peer.sh
drbd /usr/lib/drbd/snapshot-resync-target-lvm.sh
drbd /usr/lib/drbd/unsnapshot-resync-target-lvm.sh
drbd /usr/sbin/drbd-overview.pl
drbd /usr/share/cluster/drbd.metadata
drbd /usr/share/cluster/drbd.sh
drbd /usr/share/doc/drbd-8.3.0
drbd /usr/share/doc/drbd-8.3.0/COPYING
drbd /usr/share/doc/drbd-8.3.0/README
drbd /usr/share/doc/drbd-8.3.0/drbd.conf
drbd /usr/share/doc/drbd-8.3.0/file.list
drbd /usr/share/man/man5/drbd.conf.5.gz
drbd /usr/share/man/man8/drbd.8.gz
drbd /usr/share/man/man8/drbdadm.8.gz
drbd /usr/share/man/man8/drbddisk.8.gz
drbd /usr/share/man/man8/drbdmeta.8.gz
drbd /usr/share/man/man8/drbdsetup.8.gz
drbd /var/lib/drbd
[root@hostname ~]#

BTW: The RPM package drbd-8.3.0-3 built fine against the OpenVZ kernel 2.6.18-128.1.1.el5.028stab062.3.

Please correct me if I am misunderstanding something. Otherwise, I am still looking for some advise related to my original question.

Thanks, David
Re: Building DRBD 8.3.4 against OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7 [message #38259 is a reply to message #38258] Wed, 02 December 2009 12:00 Go to previous messageGo to next message
jleg
Messages: 1
Registered: December 2009
Junior Member
[quote title=triangle wrote on Wed, 02 December 2009
BTW: The RPM package drbd-8.3.0-3 built fine against the OpenVZ kernel 2.6.18-128.1.1.el5.028stab062.3.

Please correct me if I am misunderstanding something. Otherwise, I am still looking for some advise related to my original question.

Thanks, David[/quote]

Hm, didn't check drbd 8.3.4, but for the *current* version 8.3.6 there's the define "HAVE_LINUX_BYTEORDER_SWABB_H" which drbd should set properly:
- obviously your build fails because of missing "linux/swab.h"
- either your drbd does not find it there (because it's missing, or more likely it is "linux/byteorder/swap.h"), and/or drbd fails to set HAVE_LINUX_BYTEORDER_SWABB_H correctly

The latter probably could be fixed by editing drbd_config.h manually...

jleg
Re: Building DRBD 8.3.4 against OpenVZ kernel 2.6.18-164.2.1.el5.028stab066.7 [message #38260 is a reply to message #38258] Wed, 02 December 2009 13:11 Go to previous message
curx
Messages: 739
Registered: February 2006
Location: Nürnberg, Germany
Senior Member

reHi,

OpenVZ ver. // drbd ver.

028stab066.7 // 8.3.4
028stab064.8 // 8.3.0
028stab064.7 // -"-
028stab064.4 // -"-
028stab062.3 // -"-
(...)

> The DRBD userland tools (such as /sbin/drbdadm) are obviously
> provided by another package. When running the OpenVZ kernel
> 2.6.18-128.1.1.el5.028stab062.3 (which contains DRBD 8.3.0
> kernel code)

=> you need to install the drbd usertools v8.3.4 with OpenVZ Linux kernel 028stab066.7

Bye,
Thorsten
Previous Topic: /proc/stat oddity
Next Topic: wiki down?
Goto Forum:
  


Current Time: Wed Jul 24 00:16:25 GMT 2024

Total time taken to generate the page: 0.02438 seconds