Build DRBD kernel module

From Proxmox VE
Jump to: navigation, search

Indroduction

  • The latest pve-kernel contains version 8.3.13 of DRBD kernel module and the latest version of 8.3.x branch is 8.3.15 (as for 2013-06-24). The following how-to shows the easiest way to build a new DRBD module with DKMS
  • This how-to is tested against Proxmox VE 2.3

Install

  1. Install dkms and kernel headers
    # apt-get install dkms pve-headers-$(uname -r)
  2. Get the sources and extract them to /usr/src/
    # wget http://oss.linbit.com/drbd/8.3/drbd-8.3.15.tar.gz -O - | tar -xzf - -C /usr/src
  3. Create dkms.conf for extracted sources
    # cat > /usr/src/drbd-8.3.15/dkms.conf << EOF
    PACKAGE_NAME="drbd"
    PACKAGE_VERSION="8.3.15"
    MAKE[0]="make -C drbd"
    BUILT_MODULE_NAME[0]=drbd
    DEST_MODULE_LOCATION[0]=/kernel/drivers/block
    BUILT_MODULE_LOCATION[0]=drbd
    CLEAN="make -C drbd clean"
    AUTOINSTALL=yes
    EOF
    
  4. Build and install module for the current kernel
    # dkms add -m drbd -v 8.3.15
    # dkms build -m drbd -v 8.3.15
    # dkms install -m drbd -v 8.3.15
    
  5. Check status of DKMS modules
    # dkms status
    

Remove

  1. Remove updated DRBD module
    # dkms remove -m drbd -v 8.3.15 --all

See also