ZFS How to determine which version of zfs I'm running

I was in the process of moving my zfs pools to the newer version of zfs with zfs send and recv. And I thought I was running solaris version of zfs however, how do I know which version I'm running. Because when I run zfs get all on zroot It returns encryption off, which to me seems like a feature from openzfs ? So why are those flags showing up on the zroot which is a solaris version of zfs? Or at least so I thought?
 
I think it's not the case anymore.
The following is from the handbook:
OpenZFS 2.0 is available starting with FreeBSD 12.1-RELEASE via sysutils/openzfs and has been the default in since FreeBSD 13.0-RELEASE.

But I am really not an expert, you should wait for a better answer I think.
 
gotnull I understand that currently it is default but I think I created the pool under freebsd12.0 in 2020

I'm fairly certain it's a solaris pool but the encryption flags just got me confused: but running zdb -C says version 5 does that mean it's solaris ?

Code:
# zdb -C zroot

MOS Configuration:
        version: 5000
        name: 'zroot'
        state: 0
        txg: 17425195
        pool_guid: 15010428517460706589
        errata: 0
        hostname: ''
        com.delphix:has_per_vdev_zaps
        vdev_children: 1
        vdev_tree:
            type: 'root'
            id: 0
            guid: 15010428517460706589
            create_txg: 4
            children[0]:
                type: 'disk'
                id: 0
                guid: 16745988178153554051
                path: '/dev/nvd0p4'
                whole_disk: 1
                metaslab_array: 67
                metaslab_shift: 31
                ashift: 12
                asize: 253697196032
                is_log: 0
                create_txg: 4
                com.delphix:vdev_zap_leaf: 65
                com.delphix:vdev_zap_top: 66
        features_for_read:
            com.delphix:hole_birth
            com.delphix:embedded_data

I mean lake2 is an encrypted pool so i'm fairly certain this is a openzfs pool but for some reason it also says version 5

Code:
zdb -C lake2

MOS Configuration:
        version: 5000
        name: 'lake2'
        state: 0
        txg: 50122
        pool_guid: 9512309839369571113
        errata: 0
        hostid: 4272680724
        hostname: ''
        com.delphix:has_per_vdev_zaps
        vdev_children: 1
        vdev_tree:
            type: 'root'
            id: 0
            guid: 9512309839369571113
            create_txg: 4
            children[0]:
                type: 'mirror'
                id: 0
                guid: 14070067220318027217
                metaslab_array: 256
                metaslab_shift: 34
                ashift: 12
                asize: 4000782221312
                is_log: 0
                create_txg: 4
                com.delphix:vdev_zap_top: 129
                children[0]:
                    type: 'disk'
                    id: 0
                    guid: 3591818149743278968
                    path: '/dev/gpt/lake0'
                    whole_disk: 1
                    create_txg: 4
                    com.delphix:vdev_zap_leaf: 130
                children[1]:
                    type: 'disk'
                    id: 1
                    guid: 1682686172212106832
                    path: '/dev/gpt/lake1'
                    whole_disk: 1
                    create_txg: 4
                    com.delphix:vdev_zap_leaf: 131
        features_for_read:
            com.delphix:hole_birth
            com.delphix:embedded_data
 
This is really strange I'm like 100% certain I created the pools when the default was solaris zfs but for some reason I can create encrypted datasets on it and everything?

Code:
# zfs get creation tank
NAME  PROPERTY  VALUE                  SOURCE
tank  creation  Tue May  1 12:09 2018  -
# zfs get encryption tank/test
NAME       PROPERTY    VALUE        SOURCE
tank/test  encryption  aes-256-gcm  -
 
This is really strange I'm like 100% certain I created the pools when the default was solaris zfs but for some reason I can create encrypted datasets on it and everything?

Code:
# zfs get creation tank
NAME  PROPERTY  VALUE                  SOURCE
tank  creation  Tue May  1 12:09 2018  -
# zfs get encryption tank/test
NAME       PROPERTY    VALUE        SOURCE
tank/test  encryption  aes-256-gcm  -
weird If i zpool upgrade the pool it becomes openzfs?

Code:
# zfs get creation zroot
NAME   PROPERTY  VALUE                  SOURCE
zroot  creation  Sat Feb 14 12:51 2015  -
# zfs create -o encryption=on -o keyformat=passphrase -o keylocation=prompt zroot/
test
cannot create 'zroot/test': Encryption feature not enabled.
# zpool upgrade zroot
This system supports ZFS pool feature flags.

Enabled the following features on 'zroot':
  large_dnode
  userobj_accounting
  encryption
  project_quota
  allocation_classes
  resilver_defer
  bookmark_v2
  redaction_bookmarks
  redacted_datasets
  bookmark_written
  log_spacemap
  livelist
  device_rebuild
  zstd_compress
  draid

Pool 'zroot' has the bootfs property set, you might need to update
the boot code. See gptzfsboot(8) and loader.efi(8) for details.
# gpart show ada0
=>        34  3907029101  ada0  GPT  (1.8T)
          34        1024     1  freebsd-boot  (512K)
        1058     4194304     2  freebsd-swap  (2.0G)
     4195362  3902833773     3  freebsd-zfs  (1.8T)
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
partcode written to ada0p1
bootcode written to ada0
# gpart show ada1
=>        34  3907029101  ada1  GPT  (1.8T)
          34        1024     1  freebsd-boot  (512K)
        1058     4194304     2  freebsd-swap  (2.0G)
     4195362  3902833773     3  freebsd-zfs  (1.8T)
# gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1
partcode written to ada1p1
bootcode written to ada1
# zfs create -o encryption=on -o keyformat=passphrase -o keylocation=prompt zroot/
test
Enter new passphrase:
Re-enter new passphrase:
 
zpool upgrade takes a pool and brings it to the version the kernel is running. If you are running FreeBSD 12.x it will bring it to the latest "Native FreeBSD ZFS" which is not openZFS. If you are running FreeBSD 13.x or -CURRENT, that is OpenZFS2.0. Basic functionality is pretty much the same, feature flags are where things differ. There may be some OpenZFS things that conflict with native FreeBSD ZFS, but I think the upgrade command wil fail in that case.
 
Back
Top