openzfs / zfs

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

zpool gained new features without the benefit of 'zpool upgrade' #10905

Open ChibaPet opened 3 years ago

ChibaPet commented 3 years ago

From IRC:

16:54 < mason> Hey all. I hit a very weird thing today. I have a pool I created 
               from within Ubuntu 18.04, and then I did a debootstrap install 
               of Devuan into the pool, including prebuilt ZFS packages using 
               the custom-package instructions.
16:55 < mason> So, the Devuan install was running a 0.7 pool, with 0.8.4 
               binaries, which should normally be Just Fine. But! Booting back 
               into Ubuntu today, I noticed this, trying to access the 
               Devuan-side pool:
status: The pool can only be accessed in read-only mode on this system. It
    cannot be accessed in read-write mode because it uses the following
    feature(s) not supported on this system:
    com.delphix:spacemap_v2 (Space maps representing large segments are more efficient.)
    org.zfsonlinux:project_quota (space/object accounting based on project ID.)
action: The pool cannot be imported in read-write mode. Import the pool with
    "-o readonly=on", access the pool on a system that supports the
    required feature(s), or recreate the pool from backup.

zpool history doesn't show a zpool upgrade, but I do notice one thing... I did receive a zvol from an Ubuntu 20.04 system, which has their ZFS 0.8.3. Is there a way to see if this is what brought new features over? The odd bit is that I'd shipped it to the original Ubuntu-side previously without seeing new/unsupported features creeping in, which seems to make this being the source less likely. (I have this vague notion of the newer ZFS saying "I know what to do with these features" where the older ZFS on Ubuntu 18.04 wouldn't know what to do with them, but this seems like a speculative stretch.)

Thanks.

rlaager commented 3 years ago

Yikes! That's not good. In terms of fixing it now, can you 1) import the pool from an Ubuntu 20.04 Live image, 2) delete the received zvol, and maybe 3) disable the features? I don't know if these features can be disabled or not.

Is it possible that the features were enabled (but not active) by some other implementation, then you imported the pool on an older implementation that did not support those features (but it didn't complain, because they were only enabled) and then receiving the zvol moved them from enabled to active? That still sounds like a bug, but I'm trying to collect information that might help find out why this happened.

ChibaPet commented 3 years ago

Well. Here's a bit of good luck then - I don't need to fix it, so I can keep it in its current state for exploration. I won't do anything to mutate the pool, so it'll remain good to explore.

ChibaPet commented 3 years ago

Alright, I take that last back - I had to recover the system. That said, it doesn't tell me there are any features to add. In its opinion, it feels that it's been upgraded, evidently.

Shellcat-Zero commented 3 years ago

Not sure if it's related, but an incompatible feature was discovered in https://github.com/openzfs/openzfs-docs/issues/57, where the offending feature was feature@zpool_checkpoint=enabled, causing grub to fail.

stale[bot] commented 2 years ago

This issue has been automatically marked as "stale" because it has not had any activity for a while. It will be closed in 90 days if no further activity occurs. Thank you for your contributions.