pve-kernel breaks drbd-dkms-9.x compile

quiknick

New Member
Apr 8, 2022
5
0
1
Tried deploying drbd 9.x (9.0.28-9.1.6) on Proxmox 7.0-11 pve-manager/7.0-11/63d82f4e (running kernel: 5.15.30-1-pve) and Proxmox 7.1-4 pve-manager/7.1-4/ca457116 (running kernel: 5.15.30-1-pve) right after fresh install fails. The following steps below point to pve-kernel as the culprit.

1. Deployed fresh debian 11 and upgraded.
Code:
apt update && apt dist-upgrade
apt install linux-headers-5.10.0-13-amd64
2. Add proxmox drbd-9 repo. Compiles fine against debian kernel.
Code:
echo "deb http://packages.linbit.com/proxmox/ proxmox-7 drbd-9." > /etc/apt/sources.list.d/linbit.list
wget -O- https://packages.linbit.com/package-signing-pubkey.asc | apt-key add -
apt install drbd-dkms drbd-utils

Compile Success
Code:
Setting up drbd-dkms (9.1.6-1) ...
Removing old drbd-9.1.6-1 DKMS files...

------------------------------
Deleting module version: 9.1.6-1
completely from the DKMS tree.
------------------------------
Done.
Loading new drbd-9.1.6-1 DKMS files...
Building for 5.10.0-13-amd64 5.15.30-1-pve
Building initial module for 5.10.0-13-amd64
Done.

drbd.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.10.0-13-amd64/updates/dkms/

drbd_transport_tcp.ko:
Running module version sanity check.
 - Original module
 - Installation
   - Installing to /lib/modules/5.10.0-13-amd64/updates/dkms/

depmod...

3. Now add proxmox repo and install pve-kernel 5.15.x and pve-headers-5.15.x. Compile breaks.
Code:
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bullseye pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
apt install pve-headers-5.15 pve-kernel-5.15 pve-headers-5.15.30-1-pve pve-kernel-5.15.30-1-pve
reboot
apt install drbd-dkms drbd-utils

Consult /var/lib/dkms/drbd/9.1.6-1/build/make.log
Code:
DKMS make.log for drbd-9.1.6-1 for kernel 5.15.30-1-pve (x86_64)
Fri 08 Apr 2022 12:18:32 AM EDT
make: Entering directory '/var/lib/dkms/drbd/9.1.6-1/build/src/drbd'

    Calling toplevel makefile of kernel source tree, which I believe is in
    KDIR=/lib/modules/5.15.30-1-pve/build

make -C /lib/modules/5.15.30-1-pve/build   M=/var/lib/dkms/drbd/9.1.6-1/build/src/drbd  modules
  COMPAT  __vmalloc_has_2_params
  COMPAT  before_4_13_kernel_read
  COMPAT  blkdev_issue_zeroout_discard
  COMPAT  can_include_vermagic_h
  COMPAT  genl_policy_in_ops
  COMPAT  have_BIO_MAX_VECS
  COMPAT  have_CRYPTO_TFM_NEED_KEY
  COMPAT  have_SHASH_DESC_ON_STACK
  COMPAT  have_WB_congested_enum
  COMPAT  have_allow_kernel_signal
  COMPAT  have_bdi_congested_fn
  COMPAT  have_bio_bi_bdev
  COMPAT  have_bio_bi_error
  COMPAT  have_bio_bi_opf
  COMPAT  have_bio_bi_status
  COMPAT  have_bio_clone_fast
  COMPAT  have_bio_op_shift
  COMPAT  have_bio_set_dev
  COMPAT  have_bio_set_op_attrs
  COMPAT  have_bio_start_io_acct
  COMPAT  have_bioset_init
  COMPAT  have_bioset_need_bvecs
  COMPAT  have_blk_alloc_disk
  COMPAT  have_blk_alloc_queue_rh
  COMPAT  have_blk_check_plugged
  COMPAT  have_blk_qc_t_make_request
  COMPAT  have_blk_queue_flag_set
  COMPAT  have_blk_queue_make_request
  COMPAT  have_blk_queue_merge_bvec
  COMPAT  have_blk_queue_split_bio
  COMPAT  have_blk_queue_split_q_bio
  COMPAT  have_blk_queue_split_q_bio_bioset
  COMPAT  have_blk_queue_update_readahead
  COMPAT  have_blk_queue_write_cache
  COMPAT  have_d_inode
  COMPAT  have_fallthrough
  COMPAT  have_generic_start_io_acct_q_rw_sect_part
  COMPAT  have_generic_start_io_acct_rw_sect_part
  COMPAT  have_genl_family_parallel_ops
  COMPAT  have_hd_struct
  COMPAT  have_ib_cq_init_attr
  COMPAT  have_ib_get_dma_mr
  COMPAT  have_idr_is_empty
  COMPAT  have_inode_lock
  COMPAT  have_ktime_to_timespec64
  COMPAT  have_kvfree
  COMPAT  have_max_send_recv_sge
  COMPAT  have_nla_nest_start_noflag
  COMPAT  have_nla_parse_deprecated
  COMPAT  have_nla_put_64bit
  COMPAT  have_nla_strscpy
  COMPAT  have_part_stat_h
  COMPAT  have_part_stat_read_accum
  COMPAT  have_pointer_backing_dev_info
  COMPAT  have_proc_create_single
  COMPAT  have_queue_flag_stable_writes
  COMPAT  have_rb_declare_callbacks_max
  COMPAT  have_refcount_inc
  COMPAT  have_req_hardbarrier
  COMPAT  have_req_noidle
  COMPAT  have_req_nounmap
  COMPAT  have_req_op_write
  COMPAT  have_req_op_write_zeroes
  COMPAT  have_req_write
  COMPAT  have_revalidate_disk_size
  COMPAT  have_sched_set_fifo
  COMPAT  have_security_netlink_recv
  COMPAT  have_sendpage_ok
  COMPAT  have_set_capacity_and_notify
  COMPAT  have_shash_desc_zero
  COMPAT  have_simple_positive
  COMPAT  have_sock_set_keepalive
  COMPAT  have_struct_bvec_iter
  COMPAT  have_struct_size
  COMPAT  have_submit_bio
  COMPAT  have_submit_bio_noacct
  COMPAT  have_tcp_sock_set_cork
  COMPAT  have_tcp_sock_set_nodelay
  COMPAT  have_tcp_sock_set_quickack
  COMPAT  have_time64_to_tm
  COMPAT  have_timer_setup
  COMPAT  have_void_make_request
  COMPAT  ib_alloc_pd_has_2_params
  COMPAT  ib_device_has_ops
  COMPAT  ib_post_send_const_params
  COMPAT  ib_query_device_has_3_params
  COMPAT  need_make_request_recursion
  COMPAT  part_stat_read_takes_block_device
  COMPAT  queue_limits_has_discard_zeroes_data
  COMPAT  rdma_create_id_has_net_ns
  COMPAT  sock_create_kern_has_five_parameters
  COMPAT  sock_ops_returns_addr_len
  UPD     /var/lib/dkms/drbd/9.1.6-1/build/src/drbd/compat.5.15.30-1-pve.h
  UPD     /var/lib/dkms/drbd/9.1.6-1/build/src/drbd/compat.h
  GENPATCHNAMES   5.15.30-1-pve
  SPATCH   edcbdc8ab4ada10ff38e15438486af6d  5.15.30-1-pve
  PATCH
patching file drbd_req.c
patching file drbd_receiver.c
patching file drbd_nl.c
patching file drbd_main.c
patching file drbd_debugfs.c
patching file drbd-headers/linux/genl_magic_func.h
Hunk #2 succeeded at 312 (offset -20 lines).
  CC [M]  /var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.o
  CC [M]  /var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_debugfs.o
/var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.c: In function ‘drbd_dax_open’:
/var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.c:66:12: error: implicit declaration of function ‘dax_get_by_host’ [-Werror=implicit-function-declaration]
   66 |  dax_dev = dax_get_by_host(disk_name);
      |            ^~~~~~~~~~~~~~~
/var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.c:66:10: warning: assignment to ‘struct dax_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   66 |  dax_dev = dax_get_by_host(disk_name);
      |          ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:285: /var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:1875: /var/lib/dkms/drbd/9.1.6-1/build/src/drbd] Error 2
make: *** [Makefile:132: kbuild] Error 2
make: Leaving directory '/var/lib/dkms/drbd/9.1.6-1/build/src/drbd'
 
Last edited:
Code:
make -C /lib/modules/5.15.30-1-pve/build   M=/var/lib/dkms/drbd/9.1.6-1/build/src/drbd  modules
make: Entering directory '/usr/src/linux-headers-5.15.30-1-pve'
  CC [M]  /var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.o
/var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.c: In function ‘drbd_dax_open’:
/var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.c:66:12: error: implicit declaration of function ‘dax_get_by_host’ [-Werror=implicit-function-declaration]
   66 |  dax_dev = dax_get_by_host(disk_name);
      |            ^~~~~~~~~~~~~~~
/var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.c:66:10: warning: assignment to ‘struct dax_device *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
   66 |  dax_dev = dax_get_by_host(disk_name);
      |          ^
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:285: /var/lib/dkms/drbd/9.1.6-1/build/src/drbd/drbd_dax_pmem.o] Error 1
make: *** [Makefile:1875: /var/lib/dkms/drbd/9.1.6-1/build/src/drbd] Error 2
make: Leaving directory '/usr/src/linux-headers-5.15.30-1-pve'
 
Note that the DRBD9/linstore stack and its Proxmox VE integration is maintained purely by linbit, so I'd recommend contacting their support channels for assistance in this matter. They need to ensure that their module and/or DKMS package is compatible with recent kernels.
 
Last edited:
This is now resolved. Linbit pushed existing commits into latest drbd-9.1 branch and can compile successfully now. They will release within 2 weeks. If you are in a similar bind, you can get from git and make.
 

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!