Ubuntu 16.04 breaks boot with wrong zpool.cache

Bug #1624844 reported by vvhk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zfs-linux (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Having just upgraded Ubuntu 16.04, and seeing systemd updates, I rebooted the machine, but it failed to start, entering emergency mode. Relevant piece of info was this:

* Failed to start Import ZFS pools by cache file.
* Started Mount ZFS filesystems
** A start job is running for dev-disk....

and then it enters emergency mode.

Now, the only ZFS pool I have is a backup USB HDD which is constantly attached, and the pool is on a LUKS provider, meaning you won't see it until the provider is unlocked.

My guess is that the latest update, having triggered initramfs rebuild, wrote the zpool.cache file with that state, and it shouldn't have.

This is totally wrong, as zpool cache should not be built like this as it PREVENTS you from having external pools that might not be available on boot. I also have no idea why it happened now because I've been having this setup (external backup zfs pool on a LUKS provider) since 16.04 came out and never had a problem until now.

Removing the /etc/zfs/zpool.cache allowed the system to reboot fine.

# lsb_release -rd
Description: Ubuntu 16.04.1 LTS
Release: 16.04

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1624844/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Revision history for this message
vvhk (vvhk-deactivatedaccount-deactivatedaccount) wrote :

I have no idea which source package the problem is in. I've described the symptoms and the solution that fixed the symptoms.

tags: added: regression-update
affects: ubuntu → systemd (Ubuntu)
Martin Pitt (pitti)
affects: systemd (Ubuntu) → zfs-linux (Ubuntu)
Revision history for this message
Colin Ian King (colin-king) wrote :

Which version of zfs-linux are you currently using?

dpkg -l zfsutils-linux

Revision history for this message
vvhk (vvhk-deactivatedaccount-deactivatedaccount) wrote :

zfsutils-linux-0.6.5.6-0ubuntu12

Revision history for this message
Richard Laager (rlaager) wrote :

You are not booting off ZFS? You no longer have a copy of the zpool.cache from when the problem occurred?

Revision history for this message
Richard Laager (rlaager) wrote :

If this is a non-root pool which is not available at boot, then you should do this:
sudo zpool set cachefile=none POOL

That will inhibit the creation of a zpool.cache file for that pool.

The other option, if this is always plugged in, would be to configure it to unlock automatically on boot. For example, using a key file. This would be secure only if the root file system is also on LUKS.

Changed in zfs-linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Can you test the Yakkety proposed kernel and post back if it resolves this bug?
See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed.

Thank you in advance!

Changed in zfs-linux (Ubuntu):
importance: Undecided → High
tags: added: kernel-da-key
Revision history for this message
vvhk (vvhk-deactivatedaccount-deactivatedaccount) wrote :

Sorry for the late reply, I didn't get any notifications of your response. After I reported this issue there were a couple of updates to ZFS. This problem never occurred again, and there were several updates that redid initramfs, kernel, etc..., with the pool being imported and mounted. Didn't have to mark it for no cachefile either.

Looks to me this is fixed.

* zfsutils-linux-0.6.5.6-0ubuntu14
* Linux erebus 4.4.0-36-generic #55-Ubuntu SMP Thu Aug 11 18:01:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Changed in zfs-linux (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Christopher Snowhill (kode54) wrote :

This is now occurring for me with latest as of this post, as of shuffling around the drives in my system, including the addition of another drive. I may need to delete the zfs cache, if that's possible.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.