Debian 7 - ZFS pools lost after ZFSonLinux update



In a previous article, I explained how to Setup ZFS with RAIDZ pool on your Linux Server .

Even if I'm doing regular updates to my Debian Wheezy server, I hardly reboot it, once every blue moon.

With these regular updates, my ZFSonLinux packages have been updated from version 0.6.2 to 0.6.3, from 0.6.3 to 0.6.4, from 0.6.4 to , ... but without a reboot after every update.

To my surprise, after next reboot following a ZFSonLinux update, both my ZFS pools had disappeared. All my important server data where lost !

While searching the web for an explanation, I read lots of articles giving some tips and tricks, but nothing was really convincing. And more than that, lots of stuff was looking quite dangerous, with a high risk of definitely breaking the ZFS pools. After lots of searches, I finally found the real explanation to this huge problem on zfsforlinux discussion group.

Even if the solution is very simple, it is to my point of view worth writing this article. In fact, I hope it will help you to go straight to the solution. This should avoid you lots of frightening time ...

Please note that this solution is valid for servers where the / partition is not a ZFS one. Your ZFS pools should not host the root filesystem. They should be mounted during the boot process.

1. Symptoms

If you loose your ZFS pools because of a broken update, your zpool mount points are desperately empty and you should get these command results :

# zpool list
no pools available
# zpool import
zpool: ../../lib/libzfs/libzfs_import.c:356: Assertion 'nvlist_lookup_uint64(zhp->zpool_config, ZPOOL_CONFIG_POOL_GUID, &theguid) == 0' failed.

Scary, isn't it

2. Explanation

Under Debian, during the update of ZFSonLinux, some ZFS libraries are going thru some major version upgrade.

And in that case, for these new libraries to replace previous ones, you need to upgrade your system with dist-upgrade (instead of a classic upgrade).

If you fail to do so, you'll be missing some libraries after next reboot.

And ... this is exactly what has happened to my server !

3. Solution

As explained in the introduction, the solution to this semi-broken upgrade problem is damn simple.

To get back your ZFS pools, you just need to issue a dist-upgrade and to reboot your server.

During the upgrade process, libzfsx & libzpoolx libraries may be upgraded with next generation (and major versionning) libraries will be installed.

# apt-get update
# apt-get dist-upgrade
# reboot

Your ZFS pools should now be back to life ... and your precious data available again.


Hope it helps !

Signature Technoblog

This article is published "as is", without any warranty that it will work for your specific need.
If you think this article needs some complement, or simply if you think it saved you lots of time & trouble,
just let me know at This email address is being protected from spambots. You need JavaScript enabled to view it.. Cheers !

icon linux icon debian icon apache icon mysql icon php icon piwik icon googleplus