ZFS cannot open ZFS USB Disk on Debian

On FreeBSD 14 I put a ZFS pool with native encryption onto an USB disk. Idea was to have an encrypted disk to share data between FreeBSD and Debian (and maybe even WSL).
Trying to open on Debian 12 I get the message below, even before opening the encrypted pool.

Is there a way to make sharing a ZFS pool between FreeBSD and Debian work, now that they should have a common code base? Can I configure it somehow in FreeBSD to make it open on Debian?

Code:
root@edge:~# zpool import
   pool: example
     id: 6441960473038723723
  state: UNAVAIL
status: The pool uses the following feature(s) not supported on this system:
        com.klarasystems:vdev_zaps_v2
action: The pool cannot be imported. Access the pool on a system that supports
        the required feature(s), or recreate the pool from backup.
 config:

        example     UNAVAIL  unsupported feature(s)
          sdc       ONLINE
 
I have a shared pool I have created using FreeBSD-13.x but without encryption. Import and export of the pool works for both operating systems. I have not yet done any pool management stuff from Debian, just when using FreeBSD. By the way, what is WSL?
 
I have a shared pool I have created using FreeBSD-13.x but without encryption. Import and export of the pool works for both operating systems. I have not yet done any pool management stuff from Debian, just when using FreeBSD. By the way, what is WSL?
WSL is like a hyperviser for windows. you can run linux and any other distro it allows. you can mount usb and everything. you cant format them or anything
 
On FreeBSD 14 I put a ZFS pool with native encryption onto an USB disk. Idea was to have an encrypted disk to share data between FreeBSD and Debian (and maybe even WSL).
Trying to open on Debian 12 I get the message below, even before opening the encrypted pool.

Is there a way to make sharing a ZFS pool between FreeBSD and Debian work, now that they should have a common code base? Can I configure it somehow in FreeBSD to make it open on Debian?


root@edge:~# zpool import
pool: example
id: 6441960473038723723
state: UNAVAIL
status: The pool uses the following feature(s) not supported on this system:
com.klarasystems:vdev_zaps_v2
action: The pool cannot be imported. Access the pool on a system that supports
the required feature(s), or recreate the pool from backup.
config:

example UNAVAIL unsupported feature(s)
sdc ONLINE

Sounds like more of a linux issue then freebsd. if it works in freebsd then it works. have you tried your distros forum or irc channel ?
 
By the way, what is WSL?
Windows Subsystem for Linux

I'm sharing zfs pool created on 13 with the ubuntu server 23.10. You can use zfs version to determine what versions are where. You can use zpool get all to see if you have the feature on that pool too. On my ubuntu:
Code:
# zpool get all | grep vdev_zaps_v2
bigpool  feature@vdev_zaps_v2           disabled                       local
Feature it supported (disabled).

You need to figure out what common base/features are available for your given OSes.

Edit: that get all will get you features of the imported pools which doesn't help you much in your case. As mentioned though you do need to mix and match features; ZFS wiki could hep here: Feature Flags
 
Is there a way to make sharing a ZFS pool between FreeBSD and Debian work, now that they should have a common code base? Can I configure it somehow in FreeBSD to make it open on Debian?

Debian 12 only has OpenZFS 2.1.x in its repositories. You can either build 2.2.2 manually (Debian has 2.2.2 in experimental, you could give a shot at making your own backport), or create a pool that restricts itself to features the older version supports:

Code:
# zpool create -o compatibility=openzfs-2.1-linux $POOLNAME $POOLDEV[...]
 
When dealing with different possible ZFS feature flags sets, I think a practical way to avoid any potential conflicts, is to create your ZFS pools (aka zpools) based on the same collection of features flags. As chungy mentioned, using the compatibilty property with a pre-defined set of feature flags is a very convenient way to do that. As menioned in zpool-features(7), you'll find several pre-defined sets of feature flags in /usr/share/zfs/compatibility.d, or you can define your own! You can view several pre-defined collections of feauture sets online at for example zfs/cmd/zpool/compatibility.d-zfs 2.2-release, zfs/cmd/zpool/compatibility.d-zfs 2.1-release. vermaden has written about ZFS Compatibility of feature flags.

In the OpenZFS wiki Feature Flags, the slides from Christopher Siden are mentioned; his presentation is online:
Probably presented shortly after its inception and implementation, you'll hear why traditional ZFS version numbers presented problems when dealing with several downstream sources contributing to upstream at different rates with different properties. The solution invented for that problem: feature flags. Also, you'll get to hear about the intricasies of the three states (active, enabled, disabled) of feature flags and what this means for compatibility. This helps to better understand why for example a feature flag that is present and active in one zpool could nevertheless be imported by a ZFS based OS that does not have (support for) that feature flag.
 
Debian 12 only has OpenZFS 2.1.x in its repositories. You can either build 2.2.2 manually (Debian has 2.2.2 in experimental, you could give a shot at making your own backport), or create a pool that restricts itself to features the older version supports:

Code:
# zpool create -o compatibility=openzfs-2.1-linux $POOLNAME $POOLDEV[...]

Thanks, that worked, Debian and FreeBSD could both use an encrypted pool.

What also worked, was to create the pool in Debian, first.
 
Indeed it would. It's still a generally good idea to set the compatibility property to some value so that you don't accidentally zpool upgrade on a system and end up with a pool that can't be imported on the older system. It'll also eliminate a mildly-annoying message in zpool status about features that could be enabled.
 
Back
Top