openzfs / zfs

OpenZFS on Linux and FreeBSD
https://openzfs.github.io/openzfs-docs
Other
10.56k stars 1.74k forks source link

Failed to load ZFS module stack. #1155

Closed Donnie1992 closed 11 years ago

Donnie1992 commented 11 years ago

Hi, I have always been using my ZFS pool quite happily on Ubuntu 12.04. After i updated today my share was suddenly gone. So when i went to check to see what's wrong with sudo zpool status i get the error:

Failed to load ZFS module stack. Load the module manually by running 'insmod /zfs.ko' as root. Failed to load ZFS module stack. Load the module manually by running 'insmod /zfs.ko' as root.

So i went on google to see what was going on and i see a possible fix would be this command.

sudo modprobe zfs

Wich gives me this output:

FATAL: Module zfs not found.

Does anybody know what i can do to fix this! Without Data loss!

dajhorn commented 11 years ago

Get the version number of the registered modules:

# dkms status

(eg: 0.6.0.90 for the daily ppa.)

Try to build the modules manually:

# dkms remove -m zfs -v 0.6.0.90 --all
# dkms remove -m spl -v 0.6.0.90 --all
# dkms add -m spl -v 0.6.0.90
# dkms add -m zfs -v 0.6.0.90
# dkms install -m spl -v 0.6.0.90
# dkms install -m zfs -v 0.6.0.90

If you get the same error, then reinstall the headers package:

# apt-get install --reinstall linux-headers-3.2.0-23 linux-headers-3.2.0-23-generic

If the problem persists, then get the dpkg.log for the apt-get upgrade that broke the system, the entire build.log from the error message, and the config.log from the same place.

Post these things to http://gist.github.com/ and paste a link into this ticket.

Donnie1992 commented 11 years ago

You are a freaking ZFS GOD! The only thing is that my pool is degraded, so i have to check up on that as well. I think it it because the /dev/# number changed. Is there anyway i can recreate the pool without dataloss but on the hardware number instead of the /dev/# numbers?

dajhorn commented 11 years ago

You are a freaking ZFS GOD!

Welcome.

Is there anyway i can recreate the pool without dataloss but on the hardware number instead of the /dev/# numbers?

Do this:

# zpool export tank
# zpool import -d /dev/disk/by-id tank

If you are running a ZoL root, then consult the Troubleshooting section in the HOWTO document for instructions.

If your problem is solved, then please click the "Close" button on this ticket.

Donnie1992 commented 11 years ago

Appreantly my edit didn't come through. What do you mean with ZOL Root?

dajhorn commented 11 years ago

What do you mean with ZOL Root?

If the root filesystem is in ZFS. (eg: You set the mountpoint=/ property on a dataset.)

If you didn't use the tutorial for creating a ZoL root, then don't worry about it.

Donnie1992 commented 11 years ago

Haha, already forgotten ;)

dajhorn commented 11 years ago

Thanks. That is the best compliment that I've gotten in a long while.

lestercheung commented 11 years ago

Hi,

Hav eyoutried Darik's instruction?

dkms remove -m zfs -v 0.6.0.90 --all

dkms remove -m spl -v 0.6.0.90 --all

dkms add -m spl -v 0.6.0.90

dkms add -m zfs -v 0.6.0.90

dkms install -m spl -v 0.6.0.90

dkms install -m zfs -v 0.6.0.90

(I'm using 0.6.0.91 at the moment)

-les

On Thu, Dec 27, 2012 at 3:30 AM, yogeshdengle notifications@github.com wrote:

i recently did a update on my ubuntu machine and now am getting this errro:

yogesh@FileServerYD:~$ sudo zpool status [sudo] password for yogesh:

Failed to load ZFS module stack. Load the module manually by running 'insmod /zfs.ko' as root. Failed to load ZFS module stack. Load the module manually by running 'insmod /zfs.ko' as root.

tried all of the above steps to no avail including reinstalling the headers and even reinstalled the ubuntu-zfs package...

also tried yogesh@FileServerYD:~$ sudo modprobe zfs

FATAL: Module zfs not found. yogesh@FileServerYD:~$

from one of the other issues. No luck!! some other things:

yogesh@FileServerYD:~$ dkms status fglrx, 8.960, 3.2.0-34-generic, x86_64: installed fglrx, 8.960, 3.2.0-35-generic, x86_64: installed spl, 0.6.0.91, 3.2.0-35-generic, x86_64: installed zfs, 0.6.0.91: added yogesh@FileServerYD:~$ uname -r 3.2.0-35-generic yogesh@FileServerYD:~$

Any tips?

Thankfully I was just testing out my new raidz and three new HDD's so have no data loss if i need to reinstall...

Thanks!

— Reply to this email directly or view it on GitHub.

Lester Cheung http://www.gnub.net http://about.me/lestercheung

yogeshdengle commented 11 years ago

tried and failed.. and then out of nowhere it worked.. currently waiting for inputs from the team to see if they want to check this out.. see details on the linked issue..

GeorgeCaerdydd commented 11 years ago

'dajhorn' -> works for me too !! Big Thank You! yesterday, after an update (kernel I think) I lost the access to my ZFS and found your tip.

sudo dkms status fglrx, 8.9600, 3.2.0-35-generic, x86_64: installed fglrx, 8.9600, 3.2.0-36-generic, x86_64: installed spl, 0.6.0.91, 3.2.0-36-generic, x86_64: installed zfs, 0.6.0.91, 3.2.0-36-generic, x86_64: installed

sudo dkms remove -m zfs -v 0.6.0.91 --all

sudo dkms remove -m spl -v 0.6.0.91 --all

sudo dkms add -m spl -v 0.6.0.91

sudo dkms add -m zfs -v 0.6.0.91

sudo dkms install -m spl -v 0.6.0.91

sudo dkms install -m zfs -v 0.6.0.91

PS: Ubuntu 12.04 (precise) 64-bit (kernel 3.2.0-36-generic) GNOME 3.4.2

jortony commented 11 years ago

Thank you for solving the problem, and providing useful tools. I had module problems from a failed resume from a test of "rtcwake -m disk -s 90".

tomfanning commented 10 years ago

Latest Linux Mint 16 here, ZFS bits installed from the zfsonlinux Ubuntu repo (saucy).

Just followed the steps posted by @dajhorn but with the version numbers for zfs and spl as on my machine. Problem solved.

sJBs- commented 10 years ago

Latest Linux Mint 16 here, ZFS bits installed from the zfsonlinux Ubuntu repo (saucy).

Just followed the steps posted by @dajhorn but with the version numbers for zfs and spl as on my machine. Problem NOT solved (yet).....

Followed the generic installation described here http://arstechnica.com/information-technology/2014/02/ars-walkthrough-using-the-zfs-next-gen-filesystem-on-linux/

including the creation of the /etc/modprobe.d/zfs.conf file

The various Config and Make.log for SPL and ZFS files are here: https://gist.github.com/sJBs-/9308244

https://gist.github.com/sJBs-/9308269

Using Linux Mint 16, installed the following initially:

sjb@Idol ~ $ sudo apt-get install python-software-properties sjb@Idol ~ $ sudo apt-add-repository ppa:zfs-native/stable sjb@Idol ~ $ sudo apt-get update sjb@Idol ~ $ sudo apt-get install ubuntu-zfs

but when creating a pool with:

sjb@Idol ~ $ sudo zpool create pool raidz1 sdb sdc sdd Failed to load ZFS module stack. Load the module manually by running 'insmod /zfs.ko' as root. Failed to load ZFS module stack. Load the module manually by running 'insmod /zfs.ko' as root.

As recommended by dajhorn in https://github.com/zfsonlinux/zfs/issues/1155

I did the following:

sjb@Idol ~ $ sudo dkms status spl, 0.6.2: added vboxhost, 4.3.0, 3.11.0-12-generic, x86_64: installed vboxhost, 4.3.0, 3.11.0-17-generic, x86_64: installed virtualbox-guest, 4.2.16, 3.11.0-12-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!) virtualbox-guest, 4.2.16, 3.11.0-17-generic, x86_64: installed zfs, 0.6.2: added sjb@Idol ~ $ sudo dkms remove -m zfs -v 0.6.2 --all


Deleting module version: 0.6.2

completely from the DKMS tree.

Done. sjb@Idol ~ $ sudo dkms remove -m spl -v 0.6.2 --all


Deleting module version: 0.6.2

completely from the DKMS tree.

Done. sjb@Idol ~ $ sudo dkms add -m spl -v 0.6.2

Creating symlink /var/lib/dkms/spl/0.6.2/source -> /usr/src/spl-0.6.2

DKMS: add completed. sjb@Idol ~ $ sudo dkms add -m zfs -v 0.6.2

Creating symlink /var/lib/dkms/zfs/0.6.2/source -> /usr/src/zfs-0.6.2

DKMS: add completed. sjb@Idol ~ $ sudo dkms install -m spl -v 0.6.2

Kernel preparation unnecessary for this kernel. Skipping...

Running the pre_build script: checking for gawk... gawk checking metadata... META file checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking whether make supports nested variables... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... no configure: error: in /var/lib/dkms/spl/0.6.2/build': configure: error: C compiler cannot create executables Seeconfig.log' for more details

Building module: cleaning build area....(bad exit status: 2) make KERNELRELEASE=3.11.0-17-generic....(bad exit status: 2) Error! Bad return status for module build on kernel: 3.11.0-17-generic (x86_64) Consult /var/lib/dkms/spl/0.6.2/build/make.log for more information.

sjb@Idol ~ $ sudo dkms install -m zfs -v 0.6.2

Kernel preparation unnecessary for this kernel. Skipping...

Running the pre_build script: checking for gawk... gawk checking metadata... META file checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking target system type... x86_64-unknown-linux-gnu checking whether to enable maintainer-specific portions of Makefiles... no checking whether make supports nested variables... yes checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /bin/mkdir -p checking whether make sets $(MAKE)... yes checking for gcc... gcc checking whether the C compiler works... no configure: error: in /var/lib/dkms/zfs/0.6.2/build': configure: error: C compiler cannot create executables Seeconfig.log' for more details

Building module: cleaning build area....(bad exit status: 2) make KERNELRELEASE=3.11.0-17-generic....(bad exit status: 2) Error! Bad return status for module build on kernel: 3.11.0-17-generic (x86_64) Consult /var/lib/dkms/zfs/0.6.2/build/make.log for more information.

FransUrbo commented 10 years ago

checking for gcc... gcc checking whether the C compiler works... no configure: error: in /var/lib/dkms/spl/0.6.2/build': configure: error: C compiler cannot create executables

Please read that last line again. Please close this issue and take the question back to the mailinglist and we will try to help. This is not a support forum.

mamafun commented 10 years ago

dajhorn

You are really ZFS god

jamesjwarren commented 10 years ago

I'm getting a similar error message but none of these seem to be helping. I am running CentOS 6.5 and was originally updating from 0.6.2 to 0.6.3 where 0.6.2 was working fine. Installing og 0.6.3 completes but on running zpool status I get:

Failed to load ZFS module stack.
Load the module manually by running 'insmod /zfs.ko' as root.

With the following errors in the console after yum install zfs.

...
 - Installation
   - Installing to /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/
zfs.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/
zpios.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/
Adding any weak-modules
WARNING: /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/splat.ko needs unknown symbol spl_kthread_create
WARNING: /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/zfs.ko needs unknown symbol kstat_runq_exit
WARNING: /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/zfs.ko needs unknown symbol kstat_waitq_enter
WARNING: /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/zfs.ko needs unknown symbol __kstat_set_raw_ops
WARNING: /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/zfs.ko needs unknown symbol kstat_waitq_exit
WARNING: /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/zfs.ko needs unknown symbol cv_timedwait_hires
WARNING: /lib/modules/2.6.32-431.17.1.el6.x86_64/extra/zfs.ko needs unknown symbol kstat_runq_enter
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_tx_hold_write
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_read
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_tx_assign
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_tx_create
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_object_alloc
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_object_free
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_objset_own
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dsl_destroy_head
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_write
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_objset_disown
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_tx_commit
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_tx_wait
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_tx_abort
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_object_set_blocksize
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_objset_create
WARNING: /lib/modules/2.6.32-431.1.2.0.1.el6.x86_64/weak-updates/zpios.ko needs unknown symbol dmu_tx_hold_free
Running the post_install script:
depmod...
DKMS: install completed.
  Installing : libzfs2-0.6.3-1.el6.x86_64                                   4/5
  Installing : zfs-0.6.3-1.el6.x86_64                                       5/5
  Verifying  : spl-0.6.3-1.el6.x86_64                                       1/5
  Verifying  : libzfs2-0.6.3-1.el6.x86_64                                   2/5
  Verifying  : zfs-0.6.3-1.el6.x86_64                                       3/5
  Verifying  : zfs-dkms-0.6.3-1.el6.noarch                                  4/5
  Verifying  : spl-dkms-0.6.3-1.el6.noarch                                  5/5
Installed:
  zfs.x86_64 0:0.6.3-1.el6
Dependency Installed:
  libzfs2.x86_64 0:0.6.3-1.el6           spl.x86_64 0:0.6.3-1.el6
  spl-dkms.noarch 0:0.6.3-1.el6          zfs-dkms.noarch 0:0.6.3-1.el6
Complete!
[root@sirius /]#

Anyone got any ideas?

behlendorf commented 10 years ago

@jamesjwarren The dmesg console output should show why the modules couldn't be loaded.

jamesjwarren commented 10 years ago

The dmesg ouput does show up some stuff, but I'm unsure what this could mean:

zfs: disagrees about version of symbol spl_kmem_cache_reap_now
zfs: Unknown symbol spl_kmem_cache_reap_now
zfs: disagrees about version of symbol __kstat_delete
zfs: Unknown symbol __kstat_delete
zfs: disagrees about version of symbol spl_kmem_cache_set_move
zfs: Unknown symbol spl_kmem_cache_set_move
zfs: disagrees about version of symbol spl_kmem_cache_alloc
zfs: Unknown symbol spl_kmem_cache_alloc
zfs: disagrees about version of symbol __kstat_create
zfs: Unknown symbol __kstat_create
zfs: disagrees about version of symbol spl_kmem_cache_create
zfs: Unknown symbol spl_kmem_cache_create
zfs: Unknown symbol kstat_runq_exit
zfs: Unknown symbol kstat_waitq_enter
zfs: Unknown symbol __kstat_set_raw_ops
zfs: Unknown symbol kstat_waitq_exit
zfs: disagrees about version of symbol spl_kmem_cache_destroy
zfs: Unknown symbol spl_kmem_cache_destroy
zfs: Unknown symbol cv_timedwait_hires
zfs: disagrees about version of symbol spl_kmem_cache_free
zfs: Unknown symbol spl_kmem_cache_free
zfs: Unknown symbol kstat_runq_enter
zfs: disagrees about version of symbol __kstat_install
zfs: Unknown symbol __kstat_install
behlendorf commented 10 years ago

@jamesjwarren It looks like either the spl module wasn't rebuilt or the old one is still loaded. My suggestion would be to just remove all the spl/zfs packages, unload the modules, then cleanly reinstall them.

modprobe -r zfs
yum remove zfs zfs-dkms spl spl-dkms dkms
yum install zfs

Make sure both the spl and zfs are at version 0.6.3 after the install.

jamesjwarren commented 10 years ago

After the yum remove spl was still present in /lib/modules//extras folder of another kernel version I removed all references to spl to ensure they didn't get in the way. Then cleanly installed zfs. All working now, thanks for your help!

jrha commented 10 years ago

I've just had the same mess happen to me, unfortunately I haven't worked out what caused it and I'm not planning to try and reproduce it (at least not on the production system I saw it on), but it looks like happened when the kernel and zfs were updated in the same yum transaction.

Somehow the symlinks buried inside weak-updates were left pointing to an older kernel tree, which had been removed leaving a pile of dead symlinks, this made dkms very unhappy.

# pwd
/lib/modules/2.6.32-431.23.3.el6.x86_64

# ll weak-updates/*/*/*
weak-updates/avl/avl/zavl.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/avl/avl/zavl.ko
weak-updates/nvpair/znvpair/znvpair.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/nvpair/znvpair/znvpair.ko
weak-updates/splat/splat/splat.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/splat/splat/splat.ko
weak-updates/spl/spl/spl.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/spl/spl/spl.ko
weak-updates/unicode/zunicode/zunicode.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/unicode/zunicode/zunicode.ko
weak-updates/zcommon/zcommon/zcommon.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/zcommon/zcommon/zcommon.ko
weak-updates/zfs/zfs:/zfs.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/zfs/zfs/zfs.ko
weak-updates/zpios/zpios/zpios.ko -> /lib/modules/2.6.32-431.11.2.el6.x86_64/extra/zpios/zpios/zpios.ko

Which at least explains all of this from dkms:

spl:
Running module version sanity check.
ERROR: modinfo: could not open /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/spl/spl/spl.ko: No such file or directory
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/2.6.32-431.23.3.el6.x86_64/extra/spl/spl/

splat.ko:
Running module version sanity check.
ERROR: modinfo: could not open /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/splat/splat/splat.ko: No such file or directory
Error! Module version 0.6.3-1 for splat.ko
is not newer than what is already found in kernel 2.6.32-431.23.3.el6.x86_64 (0.6.3-1).
You may override by specifying --force.
Adding any weak-modules
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/zcommon/zcommon/zcommon.ko: No such file or directory
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/avl/avl/zavl.ko: No such file or directory
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/spl/spl/spl.ko: No such file or directory
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/unicode/zunicode/zunicode.ko: No such file or directory
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/splat/splat/splat.ko: No such file or directory
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/zpios/zpios/zpios.ko: No such file or directory
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/zfs/zfs/zfs.ko: No such file or directory
WARNING: Can't read module /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/nvpair/znvpair/znvpair.ko: No such file or directory

Nuking everything under /lib/modules/2.6.32-431.23.3.el6.x86_64/weak-updates/ then removing the RPMS and reinstalling as @behlendorf suggested sorted this out. :smile:

I'm left wondering whether weak-modules and dkms are fighting each other here.

breedx2 commented 9 years ago

Just my $0.02 here in 2015. I had a similar problem with zpool saying Failed to load ZFS module stack. Still not sure the root cause, but likely due to missing headers package and a confused apt package state. Regardless, I ended up getting the appropriate kernel headers package installed, followed what @dajhorn suggested above (the wad of dkms remove/add/install commands) and YES it worked.

It's still a little concerning that the initial failure mode was a hang during apt-get install, but I've managed to work through it now thanks to this issue.

Thanks!

p10tyr commented 9 years ago

Started upgrading slighlty flakey 12.10, got to 13.. the ZFS volumes still mounted, Happy days. Did the next distro-upgrade to 14.04 - Same problem. but now

Building module:
cleaning build area....
make KERNELRELEASE=3.13.0-55-generic.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 3.13.0-55-generic (x86_64)
Consult /var/lib/dkms/spl/0.6.2/build/make.log for more information.

Log..

make[5]: *** [/var/lib/dkms/spl/0.6.2/build/module/spl/../../module/spl/spl-kmem.o] Error 1
make[4]: *** [/var/lib/dkms/spl/0.6.2/build/module/spl] Error 2
make[3]: *** [_module_/var/lib/dkms/spl/0.6.2/build/module] Error 2
make[3]: Leaving directory `/usr/src/linux-headers-3.13.0-55-generic'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/var/lib/dkms/spl/0.6.2/build/module'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/lib/dkms/spl/0.6.2/build'
make: *** [all] Error 2

:(

I followed this post,

http://askubuntu.com/questions/552201/failed-to-load-zfs-module-stack

which relates back to this post, but it sorted it all out. Phew!

CySlider commented 9 years ago

Hi, while the instructions of @dajhorn work for me, I have to do them after EVERY kernel update. This is really annoying. Am I missing something to fix this for good?

Each kernel update throws me out of the system, and I have to repeat this procedure with updated versions...

Can anyone help?

I'm on Kubuntu: uname -a Linux 3.13.0-62-generic #102-Ubuntu SMP Tue Aug 11 14:29:36 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

blcf commented 8 years ago

Have you disabled ipv6? I fixed it after recompiling packages and reinstalling it. I found ipv6 had been disabled for some reasons after the zfs module was installed.

aimaq commented 8 years ago

Hi Everyone, I have same issue can anyone help me please? I'm new to ZFS. I just freshly installed CentOS 7.2.1511 then installed zfs following instructions on https://github.com/zfsonlinux/zfs/wiki/RHEL-%26-CentOS . However the installation completed successfully but when I execute the command "zfs status" I encounter following error message: [ The ZFS modules are not loaded ] [ Try running '/sbin/modprobe zfs' as root to load them ]

[root@osboxes ~]# yum info zfs Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

[root@osboxes ~]# yum info zfs kernel Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile

Name : kernel Arch : x86_64 Version : 3.10.0 Release : 327.22.2.el7 Size : 136 M Repo : installed From repo : updates Summary : The Linux kernel URL : http://www.kernel.org/ License : GPLv2 Description : The kernel package contains the Linux kernel (vmlinuz), the core : of any Linux operating system. The kernel handles the basic : functions of the operating system: memory allocation, process : allocation, device input and output, etc.

Name : zfs Arch : x86_64 Version : 0.6.5.7 Release : 1.el7.centos Size : 800 k Repo : installed From repo : zfs Summary : Commands to control the kernel modules and libraries URL : http://zfsonlinux.org/ License : CDDL Description : This package contains the ZFS command line utilities.

Thanks

lestebang commented 7 years ago

Hi friends. I trying use it on Debian 9 and I have the same error. I do all steps (listed here)[https://github.com/zfsonlinux/zfs/issues/1155#issuecomment-11499841] but not work. Any idea?

root@DGP-DT-211:/home/dgp# apt-get install --reinstall linux-headers-$(uname -r)            
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 444 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://debian.uci.cu/debian testing/main amd64 linux-headers-4.9.0-1-amd64 amd64 4.9.2-2 [444 kB]
Fetched 444 kB in 30s (14.7 kB/s)               
(Reading database ... 301800 files and directories currently installed.)
Preparing to unpack .../linux-headers-4.9.0-1-amd64_4.9.2-2_amd64.deb ...
Unpacking linux-headers-4.9.0-1-amd64 (4.9.2-2) over (4.9.2-2) ...
Setting up linux-headers-4.9.0-1-amd64 (4.9.2-2) ...
/etc/kernel/header_postinst.d/dkms:
Error! Bad return status for module build on kernel: 4.9.0-1-amd64 (x86_64)
Consult /var/lib/dkms/zfs/0.6.5.8/build/make.log for more information.
root@DGP-DT-211:/home/dgp# cat /var/lib/dkms/zfs/0.6.5.8/build/make.log
DKMS make.log for zfs-0.6.5.8 for kernel 4.9.0-1-amd64 (x86_64)
Tue Feb  7 18:40:54 EST 2017
make  all-recursive
make[1]: Entering directory '/var/lib/dkms/zfs/0.6.5.8/build'
Making all in module
make[2]: Entering directory '/var/lib/dkms/zfs/0.6.5.8/build/module'
make -C /lib/modules/4.9.0-1-amd64/build SUBDIRS=`pwd`  O=/lib/modules/4.9.0-1-amd64/build CONFIG_ZFS=m modules
make[3]: Entering directory '/usr/src/linux-headers-4.9.0-1-amd64'
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zfs_deleg.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/avl/avl.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/unicode/u8_textprep.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/nvpair/nvpair.o
/var/lib/dkms/zfs/0.6.5.8/build/module/avl/avl.c: In function ‘avl_add’:
/var/lib/dkms/zfs/0.6.5.8/build/module/avl/avl.c:647:2: warning: ‘where’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  avl_insert(tree, new_node, where);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  LD [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/avl/zavl.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/arc.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zfs_prop.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/nvpair/fnvpair.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/unicode/uconv.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zprop_common.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/nvpair/nvpair_alloc_spl.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/nvpair/nvpair_alloc_fixed.o
  LD [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/unicode/zunicode.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zpios/pios.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zfs_namecheck.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/blkptr.o
  LD [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/nvpair/znvpair.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/bplist.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/bpobj.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zfs_comutil.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dbuf.o
  LD [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zpios/zpios.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dbuf_stats.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/bptree.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/ddt.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zfs_fletcher.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/ddt_zap.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zfs_uio.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu_diff.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu_object.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu_objset.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zpool_prop.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu_send.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu_traverse.o
  LD [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zcommon/zcommon.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu_tx.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dmu_zfetch.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dnode.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dnode_sync.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_dataset.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_deadlist.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_deleg.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_bookmark.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_dir.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_pool.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_prop.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_scan.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/dsl_synctask.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/fm.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/gzip.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/lzjb.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/lz4.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/metaslab.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/multilist.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/range_tree.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/refcount.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/rrwlock.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/sa.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/sha256.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/spa.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/spa_boot.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/spa_config.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/spa_errlog.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/spa_history.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/spa_misc.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/spa_stats.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/space_map.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/space_reftree.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/txg.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/trace.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/uberblock.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/unique.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_cache.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_disk.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_file.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_label.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_mirror.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_missing.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_queue.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_raidz.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/vdev_root.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zap.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zap_leaf.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zap_micro.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfeature.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfeature_common.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_acl.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_byteswap.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_ctldir.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_debug.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_dir.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_fm.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_fuid.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_ioctl.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_log.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_onexit.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_replay.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_rlock.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_sa.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_vfsops.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_vnops.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zfs_znode.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zil.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zio.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zio_checksum.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zio_compress.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zio_inject.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zle.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zpl_ctldir.o
  CC [M]  /var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zpl_export.o
/var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zpl_ctldir.c:408:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
  .rename  = zpl_snapdir_rename,
             ^~~~~~~~~~~~~~~~~~
/var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zpl_ctldir.c:408:13: note: (near initialization for ‘zpl_ops_snapdir.rename’)
cc1: some warnings being treated as errors
/usr/src/linux-headers-4.9.0-1-common/scripts/Makefile.build:298: recipe for target '/var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zpl_ctldir.o' failed
make[7]: *** [/var/lib/dkms/zfs/0.6.5.8/build/module/zfs/zpl_ctldir.o] Error 1
make[7]: *** Waiting for unfinished jobs....
/usr/src/linux-headers-4.9.0-1-common/scripts/Makefile.build:549: recipe for target '/var/lib/dkms/zfs/0.6.5.8/build/module/zfs' failed
make[6]: *** [/var/lib/dkms/zfs/0.6.5.8/build/module/zfs] Error 2
/usr/src/linux-headers-4.9.0-1-common/Makefile:1507: recipe for target '_module_/var/lib/dkms/zfs/0.6.5.8/build/module' failed
make[5]: *** [_module_/var/lib/dkms/zfs/0.6.5.8/build/module] Error 2
Makefile:150: recipe for target 'sub-make' failed
make[4]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/usr/src/linux-headers-4.9.0-1-amd64'
Makefile:16: recipe for target 'modules' failed
make[2]: *** [modules] Error 2
make[2]: Leaving directory '/var/lib/dkms/zfs/0.6.5.8/build/module'
Makefile:683: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/var/lib/dkms/zfs/0.6.5.8/build'
Makefile:556: recipe for target 'all' failed
make: *** [all] Error 2
gmelikov commented 7 years ago

@produccionuci 0.6.5.8 ZFS package doesn't support 4.9 kernel, you need to wait for 0.6.5.9 https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=zfs-dkms;dist=unstable