1

Currently I'm trying to test DRBD 9 (drbd-9.0.21-1 & drbd-utils-9.13.0) on Oracle Linux 6 system (the same for production), and it's isolated from outside network, so using yum is out of question (and I can't upgrade the distro since it will be used on the running production). Currently, I'm building it using the tarball.

The documentation doesn't mention anything about required packages and versions, so, I execute make and fetching the needed rpms and using this Centos 6 guide and this Centos 7 guide packages.

Finally, I use this Centos 6 guide (I know the DRBD version there is 8.4, but I have to make do with it since there's no other guide on my case, and this Centos 7 guide is pretty similar, without drbdmanage, which it got replaced with linstor recently) to build it.

I can run make kmp-rpm for DRBD9 and ./configure for drbd-utils just fine, but when I run make rpm for the dbrd-utils, it gives me this error (I run this as root):

RPM build errors:
    %defattr doesn't define directory mode so file mode defined in %defattr is used for directory: /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/lib/drbd
    File not found: /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/usr/sbin/drbdmon
    %defattr doesn't define directory mode so file mode defined in %defattr is used for directory: /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/usr/lib/drbd
    %defattr doesn't define directory mode so file mode defined in %defattr is used for directory: /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/var/lib/drbd
    %defattr doesn't define directory mode so file mode defined in %defattr is used for directory: /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/var/run/drbd
    File not found by glob: /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/usr/share/man/man8/drbdmon-*
make: *** [rpm] Error 1


# ls /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/lib/
drbd  udev

# ls /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/usr/sbin/
drbdadm  drbdmeta  drbdsetup

# ls /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/usr/lib/
debug  drbd  ocf

# ls /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/var/lib/
drbd

# ls /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/var/run/
drbd

# ls /root/rpmbuild/BUILDROOT/drbd-9.13.0-1.el6.x86_64/usr/share/man/man8/
drbd-8.3.8.gz     drbdadm-8.4.8.gz   drbdmeta-8.3.8.gz   drbdsetup-8.4.8.gz
drbd-8.4.8.gz     drbdadm-9.0.8.gz   drbdmeta-8.4.8.gz   drbdsetup-9.0.8.gz
drbd-9.0.8.gz     drbddisk-8.3.8.gz  drbdmeta-9.0.8.gz
drbdadm-8.3.8.gz  drbddisk-8.4.8.gz  drbdsetup-8.3.8.gz

From my understanding, it couldn't find drbdmon. Is there any way to solve this? Am I missing a something or is it not possible to build DRBD 9 on EL6?

10
  • This might be useful : build-install-from-source.
    – harrymc
    Dec 6, 2020 at 12:35
  • @harrymc I couldn't find the +configure+ script and couldn't execute autoconf from the expanded tarball (no input file) Dec 7, 2020 at 2:24
  • @harrymc Building a rpm package also doesn't work with that guide since there's no configure file. I think that guide is outdated since it's intended for version 8.4.0, and the file in wget http://oss.linbit.com/drbd/8.4/drbd-8.4.0.tar.gz doesn't exists anymore. Dec 7, 2020 at 2:44
  • The current stable version is drbd-9.0.25-2. Linbit recommends using their tarballs rather than github. It is also said that make alone is enough for compiling version 9.
    – harrymc
    Dec 7, 2020 at 8:31
  • But I can make the rpm for drbd just fine, the problem is I couldn't make the rpm for drbd-utils, which right now I've tried using various versions with the same error (couldn't find drbdmon). I found this guide, I will try it later and see if it works (although it's not building the rpm). Dec 7, 2020 at 8:39

1 Answer 1

0

I'm finally able to build the drbd-utils by using newer version of gcc. The built-in gcc version of my oracle linux is 4.4, which doesn't have C++11.

I'm using this guide to use newer gcc temporarily in the shell.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .