[DRBD-user] compiling 8.3.6, sane configure defaults

Eelco Jepkema eelco at procolix.com
Thu Nov 19 15:53:23 CET 2009

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


With 8.3.5 source tarball I could just do 'make; make install' and 
everything would be fine. I would get sane defaults, files in expected 
locations (config in /etc, libs in /usr/lib/drbd, man pages in 
/usr/share/man, local state in /var/lib/drbd etc.).

With 8.3.6 however you'll need to run the configure script. Doing this 
it's really hard to get the defaults of before back and just running 
'./configure' will forget or not create certain directories.

Attached is the output for just running ./configure without any options 
and the config.log that belongs to that.

I am running Debian Lenny and I don't have enough of an idea how other 
distributions handle installations and the location of certain files so 
I can only speak for myself and my own experience when talking about 
expecting files at a certain location. Please keep that in mind if you 
read through my comments.

It seems to me that some default install actions in Makefile.in and 
consequently Makefile are wrong. The ones i can find that actually break 
things are:

running 'make -C user install':
mkdir -p //usr/local/var/lib/drbd

So this creates the directory /usr/local/var/lib/drbd, but the directory 
/var/lib/drbd is mentioned specifically here:
drbd-8.3.6# grep -r 'var/lib/drbd' *
drbd/Makefile:# install -d $(DESTDIR)/var/lib/drbd
Binary file user/drbdmeta matches
Binary file user/drbdadm matches
Binary file user/drbdadm_usage_cnt.o matches
user/drbdadm_main.c:	/* if set, use the "cache" in /var/lib/drbd to 
figure out
user/drbdadm_minor_table.c:#define MINOR_TABLE_DIR "/var/lib/drbd/"
Binary file user/drbdadm_minor_table.o matches
Binary file user/drbdmeta.o matches
user/drbdadm_usage_cnt.c:#define DRBD_LIB_DIR "/var/lib/drbd"
user/drbdmeta.c: * /var/lib/drbd/md-toc plain file, and some magic block 
on every device
user/drbdmeta.c:	if (asprintf(&e, "/var/lib/drbd/drbd%lu", minor) <= 18) {

And the make install doesn't create that directory.

running 'make -C scripts install':
mkdir -p //usr/local/lib/ocf/resource.d/linbit

While the correct directory seems to be /usr/lib/ocf/resource.d/ (at 
least on my system).

Furthermore, the default for creating a kernel module, WITH_KM, is set 
to no by configure. I'm not sure if having kernel module not compiled by 
default is something users would expect from drbd source.

Ultimately, i'm not a fan of installing to /usr/local/etc et.al because 
i don't believe many tools will be able to use them correctly? Debian 
init script fixer update-rc.d for instance won't find the drbd init 
script in /usr/local/etc/init.d/drbd. I would think the defaults for 
this would rather be just normal /etc and /etc/init.d.

Best regards,
Eelco Jepkema
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 8884 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20091119/4f2c3836/attachment.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: configure.output
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20091119/4f2c3836/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: make_install.output
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20091119/4f2c3836/attachment.asc>

More information about the drbd-user mailing list