2

For days now I am trying to get ZFS-on-Linux working on Debian 7 but the module doesn't want to compile:

# dpkg-reconfigure zfs-dkms

------------------------------
Deleting module version: 0.6.3
completely from the DKMS tree.
------------------------------
Done.
Loading new zfs-0.6.3 DKMS files...
Building only for 2.6.32-openvz-042stab090.5-amd64
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.

Of course, headers and source are installed:

# uname -r
2.6.32-openvz-042stab090.5-amd64
# dpkg -l | grep 2.6.32-openvz-042stab090.5-amd64
ii  linux-headers-2.6.32-openvz-042stab090.5-amd64   1                                  amd64        Header files related to Linux kernel, specifically,
ii  linux-image-2.6.32-openvz-042stab090.5-amd64     1                                  amd64        Linux kernel binary image for version 2.6.32-openvz-042stab090.5-amd64
ii  linux-source-2.6.32-openvz-042stab090.5-amd64    1                                  all          Linux kernel source for version 2.6.32-openvz-042stab090.5-amd64
#

So I am trying it manually. Still not:

# dkms build zfs/0.6.3 -k `uname -r` --kernelsourcedir=/usr/src/linux-source-2.6.32-openvz-042stab090.5-amd64
Error! Your kernel headers for kernel 2.6.32-openvz-042stab090.5-amd64 cannot be found.
Please install the linux-headers-2.6.32-openvz-042stab090.5-amd64 package,
or use the --kernelsourcedir option to tell DKMS where it's located


ls /usr/src/linux-source-2.6.32-openvz-042stab090.5-amd64 | wc -l
90

it contains everything (arch, block, configs, debian, ...). WTF?

5

After a looong debug session I found that the build and source links in /lib/modules/2.6.32-openvz-042stab090.5-amd64 to /usr/src and /usr/include were missing.

Added them manually and it worked.

Everyime happy that I can work in Linux where I can at least look into the source and debug...

2
  • I had a similar problem. I updated the kernel (yum update) and installed the zfs packages. My kernel showed one version, while the sources showed an updated version. Had I rebooted after the update, the zfs installation would have worked. Your hint gave me the required clue – pdwalker Mar 16 '15 at 14:30
  • Thanks for your comment. I can also add one more thing: At least in Debian it seems to be important to install the linux-headers-* package first before upgrading the kernel (linux-image-*). That way it works for me. – divB Mar 16 '15 at 17:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.