Can't compile drbd-8.4 on pve-kernel-4.4.67-1-pve

igorc

Renowned Member
Aug 31, 2015
9
0
66
Hi,

I just upgraded from 4.2.4 to 4.4:

Code:
# pveversion -v
proxmox-ve: 4.4-89 (running kernel: 4.4.67-1-pve)
pve-manager: 4.4-13 (running version: 4.4-13/7ea56165)
pve-kernel-4.4.6-1-pve: 4.4.6-48
pve-kernel-4.2.6-1-pve: 4.2.6-36
pve-kernel-4.4.8-1-pve: 4.4.8-52
pve-kernel-4.4.67-1-pve: 4.4.67-89
...

and now I can't compile drbd-8.4.7-1 (or 8.4.8-1) against this kernel-4.4.67-1, it fails with:

Code:
  CC [M]  /usr/src/drbd-8.4.7-1/drbd/drbd_proc.o
/usr/src/drbd-8.4.7-1/drbd/drbd_proc.c: In function ‘drbd_seq_show’:
/usr/src/drbd-8.4.7-1/drbd/drbd_proc.c:292:21: warning: passing argument 1 of ‘bdi_rw_congested’ from incompatible pointer type
    bdi_rw_congested(&device->rq_queue->backing_dev_info);
                     ^
In file included from /usr/src/drbd-8.4.7-1/drbd/drbd_int.h:41:0,
                 from /usr/src/drbd-8.4.7-1/drbd/drbd_proc.c:34:
include/linux/backing-dev.h:520:19: note: expected ‘struct backing_dev_info *’ but argument is of type ‘struct backing_dev_info **’
 static inline int bdi_rw_congested(struct backing_dev_info *bdi)
                   ^
  CC [M]  /usr/src/drbd-8.4.7-1/drbd/drbd_worker.o
  CC [M]  /usr/src/drbd-8.4.7-1/drbd/drbd_receiver.o
  CC [M]  /usr/src/drbd-8.4.7-1/drbd/drbd_req.o
/usr/src/drbd-8.4.7-1/drbd/drbd_req.c: In function ‘remote_due_to_read_balancing’:
/usr/src/drbd-8.4.7-1/drbd/drbd_req.c:960:7: warning: assignment from incompatible pointer type
   bdi = &device->ldev->backing_bdev->bd_disk->queue->backing_dev_info;
       ^
  CC [M]  /usr/src/drbd-8.4.7-1/drbd/drbd_actlog.o
  CC [M]  /usr/src/drbd-8.4.7-1/drbd/lru_cache.o
  CC [M]  /usr/src/drbd-8.4.7-1/drbd/drbd_main.o
/usr/src/drbd-8.4.7-1/drbd/drbd_main.c: In function ‘drbd_congested’:
/usr/src/drbd-8.4.7-1/drbd/drbd_main.c:2552:21: warning: passing argument 1 of ‘bdi_congested’ from incompatible pointer type
   r = bdi_congested(&q->backing_dev_info, bdi_bits);
                     ^
In file included from /usr/src/drbd-8.4.7-1/drbd/drbd_int.h:41:0,
                 from /usr/src/drbd-8.4.7-1/drbd/drbd_main.c:58:
include/linux/backing-dev.h:505:19: note: expected ‘struct backing_dev_info *’ but argument is of type ‘struct backing_dev_info **’
 static inline int bdi_congested(struct backing_dev_info *bdi, int cong_bits)
                   ^
/usr/src/drbd-8.4.7-1/drbd/drbd_main.c: In function ‘drbd_create_device’:
/usr/src/drbd-8.4.7-1/drbd/drbd_main.c:2927:21: error: request for member ‘congested_fn’ in something not a structure or union
  q->backing_dev_info.congested_fn = drbd_congested;
                     ^
/usr/src/drbd-8.4.7-1/drbd/drbd_main.c:2928:21: error: request for member ‘congested_data’ in something not a structure or union
  q->backing_dev_info.congested_data = device;
                     ^
/usr/src/drbd-8.4.7-1/drbd/drbd_main.c:2930:28: warning: passing argument 2 of ‘blk_queue_make_request’ from incompatible pointer type
  blk_queue_make_request(q, drbd_make_request);
                            ^
In file included from /usr/src/drbd-8.4.7-1/drbd/drbd_int.h:40:0,
                 from /usr/src/drbd-8.4.7-1/drbd/drbd_main.c:58:
include/linux/blkdev.h:963:13: note: expected ‘blk_qc_t (*)(struct request_queue *, struct bio *)’ but argument is of type ‘int (*)(struct request_queue *, struct bio *)’
 extern void blk_queue_make_request(struct request_queue *, make_request_fn *);
             ^
scripts/Makefile.build:258: recipe for target '/usr/src/drbd-8.4.7-1/drbd/drbd_main.o' failed
make[2]: *** [/usr/src/drbd-8.4.7-1/drbd/drbd_main.o] Error 1
Makefile:1420: recipe for target '_module_/usr/src/drbd-8.4.7-1/drbd' failed
make[1]: *** [_module_/usr/src/drbd-8.4.7-1/drbd] Error 2
Makefile:103: recipe for target 'kbuild' failed
make: *** [kbuild] Error 2

This was working fine with pve-kernel-4.4.8-1-pve. Any ideas?
By the way why was the kernel downgraded from 4.4.8 to 4.4.67?
 
Hi,

This is not possible with the pve4.4 kernel.
We have include in this kernel the DRBD 9.0.7-1 module and you try an downgrade what will not work.

You can use the PVE 5 kernel where 8.4 is included or you have to build your own kernel.
 
Hi,

This is not possible with the pve4.4 kernel.
We have include in this kernel the DRBD 9.0.7-1 module and you try an downgrade what will not work.

You can use the PVE 5 kernel where 8.4 is included or you have to build your own kernel.

Interesting, but as I mentioned before:
This was working fine with pve-kernel-4.4.8-1-pve

which is also pve-4.4 kernel, right? Anyway, rebooting in that kernel sorted the things out.
 
This was working fine with pve-kernel-4.4.8-1-pve. Any ideas?
By the way why was the kernel downgraded from 4.4.8 to 4.4.67?

as the error message indicate, your DRBD module source is not compatible with the kernel you are trying to compile it for (there are sometimes ABI-incompatible changes affecting modules). you will probably need an updated DRBD8 module source (if available) or cherry-pick one or more compatibility commits from the DRBD project or kernel upstream (if available) or figure the needed changes out yourself.

4.4.8 -> 4.4.67 is not a downgrade (67 is bigger than 8 after all ;)) - I would not recommend running with such an old kernel, there have been a lot of CVE fixes in the mean time.
 
Hi, as you wrote
> "You can use the PVE 5 kernel where 8.4 is included"
can you give me some hints how to do this? Is there a way to install it using apt or do I have to extract it from an iso and insert it manually?

I also need the drbd Support, maybe its a better idea to use pve 5 beta ? Is it possible to update this beta to the stable release when its released?

best regards
 
@teerix... Had the same issue a few minutes ago...
Just update the DRBD kernel module version to 8.4.10


#!/bin/bash
export KVER=`uname -r`
apt-get install build-essential flex
apt-get install pve-headers-$KVER
cd /usr/src
wget http://oss.linbit.com/drbd/8.4/drbd-8.4.10-1.tar.gz
tar zxvf drbd-8.4.10-1.tar.gz
cd /usr/src/drbd-8.4.10-1
make
strip --strip-unneeded drbd/drbd.ko
!!!! UNDERSTAND THIS BIT BEFORE RUNNING IT
#cp drbd/drbd.ko /lib/modules/4.4.49-1-pve/kernel/drivers/block/drbd/drbd.ko
#insmod /lib/modules/4.4.49-1-pve/kernel/drivers/block/drbd/drbd.ko
#/etc/init.d/drbd restart
 
  • Like
Reactions: teerix
Thanx, I already have a 5.0 Testserver running and it looks really good. The only issue I had was a problem with boot order ... I had a conflict betweet lvm and drbd ( using lvm on top of drbd ) ... but coud solv this with rescanning physical volumes for drbd after boot up.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!