Solved I can't setup Freebsd 12.2-RELEASE-p1 with openZFS 2.0

Code:
pkg update && pkg upgrade
freebsd-update fetch install   
PATH=/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:~/bin
portsnap fetch && extract
cd /usr/ports/sysutils/(openzfs-kmod,openzfs) && make install clean
/boot/loader.conf
openzfs_load="YES"
zfs --version
zfs-2.0.0-rc1
zfs_version_kernel() failed: No such file or directory
 
Build sysutils/openzfs-kmod from ports. Packages are still being built for 12.1 and particularly kernel modules may have problems with this.
portsnap fetch && extract cd /usr/ports/sysutils/(openzfs-kmod,openzfs ) && make install clean /boot/loader.conf openzfs_load="YES"
Even with building from port, the result was a failing boot zfs --version zfs-2.0.0-rc1 zfs_version_kernel() failed: No such file or directory
 
 
Even with building from port, the result was a failing boot zfs --version zfs-2.0.0-rc1 zfs_version_kernel() failed: No such file or directory

Works fine here:

Code:
- update src world kernel:
    # freebsd-update fetch install
    # uname -mir
    12.2-RELEASE amd64 GENERIC

    # freebsd-version -ku
    12.2-RELEASE-p1
    12.2-RELEASE-p2

- update /usr/ports:
    # portsnap auto
    # make install clean -C /usr/ports/sysutils/openzfs

- edit /boot/loader.conf
    # grep zfs /boot/loader.conf
    openzfs_load="YES"

- edit /etc/csh.cshrc (disable $HOME/.cshrc), /root/.cshrc
    # grep "^set path" /etc/csh.cshrc
    set path = (/usr/local/sbin /sbin /bin /usr/sbin /usr/bin /usr/local/bin $HOME/bin)

    # grep "^set path" ~/.cshrc
    set path = (/usr/local/sbin /sbin /bin /usr/sbin /usr/bin /usr/local/bin $HOME/bin)
  
    root log out, log in
    # echo $PATH
    /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/root/bin

- reboot

- # pkg info | grep zfs
   openzfs-2020120100             OpenZFS userland for FreeBSD
   openzfs-kmod-2020120100        OpenZFS kernel module for FreeBSD

- # kldstat | grep open
  2    1 0xffffffff8247b000     a448 opensolaris.ko
  3    1 0xffffffff82486000   664560 openzfs.ko

- # which zfs
  /usr/local/sbin/zfs

- # zfs version
  zfs-2.0.0-rc1
  zfs-kmod-v2020120100-zfs_aa2778d10
 
Last edited:
Looks like it is working:

Code:
vm clone compact openzfs_test

vm start -f openzfs_test

ssh -vl demo 192.168.1.106

portsnap fetch update

portinstall sysutils/openzfs

--->  Installing the new version via the port
===>  Deinstalling for openzfs
===>   openzfs not installed, skipping
===>  Installing for openzfs-2020120100
===>  Checking if openzfs is already installed
===>   Registering installation for openzfs-2020120100
Installing openzfs-2020120100...
===>  Cleaning for openzfs-kmod-2020120100
===>  Cleaning for openzfs-2020120100

vi /boot/loader.conf

kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
opensolaris_load="YES"
beastie_disable="YES"
## zfs_load="YES"

openzfs_load="YES"

reboot

!! Unbelievable, it booted up!

uname -a
FreeBSD Compact_ZHYVE 12.2-RELEASE FreeBSD 12.2-RELEASE r368372 ZHYVE4  amd64

kldstat
Id Refs Address                Size Name
1   14 0xffffffff80200000  11686b8 kernel
2    1 0xffffffff8136a000   664560 openzfs.ko
3    1 0xffffffff819cf000     a448 opensolaris.ko
4    1 0xffffffff81b11000      acf mac_ntpd.ko

zpool status;
  pool: compact_zzz
state: ONLINE
  scan: scrub repaired 0 in 0 days 00:03:17 with 0 errors on Tue Dec  8 11:08:29 2020
config:

    NAME        STATE     READ WRITE CKSUM
    compact_zzz  ONLINE       0     0     0
      vtbd0p3   ONLINE       0     0     0

dmesg -a|grep ZFS
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)

portversion -v|grep zfs
[Reading data from pkg(8) ... - 161 packages found - done]
openzfs-2020120100          =  up-to-date with port
openzfs-kmod-2020120100     =  up-to-date with port

/usr/local/sbin/zpool status
  pool: compact_zzz
state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
    still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
    the pool may no longer be accessible by software that does not support
    the features. See zpool-features(5) for details.
  scan: scrub repaired 0B in 00:03:17 with 0 errors on Tue Dec  8 11:08:29 2020
config:

    NAME         STATE     READ WRITE CKSUM
    compact_zzz  ONLINE       0     0     0
      vtbd0p3    ONLINE       0     0     0

errors: No known data errors

/usr/local/sbin/zpool upgrade
This system supports ZFS pool feature flags.

All pools are formatted using feature flags.


Some supported features are not enabled on the following pools. Once a
feature is enabled the pool may become incompatible with software
that does not support the feature. See zpool-features(5) for details.

POOL  FEATURE
---------------
compact_zzz
      userobj_accounting
      encryption
      project_quota
      resilver_defer
      bookmark_v2
      redaction_bookmarks
      redacted_datasets
      bookmark_written
      log_spacemap
      livelist
      device_rebuild
      zstd_compress
      draid

/usr/local/sbin/zpool upgrade compact_zzz
This system supports ZFS pool feature flags.

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

/usr/local/sbin/zpool status
  pool: compact_zzz
state: ONLINE
  scan: scrub repaired 0B in 00:03:17 with 0 errors on Tue Dec  8 11:08:29 2020
config:

    NAME         STATE     READ WRITE CKSUM
    compact_zzz  ONLINE       0     0     0
      vtbd0p3    ONLINE       0     0     0

errors: No known data errors

reboot

... and it booted again!

vm image create -d OpenZFS_ZHYVE_FreeBSD_12.2 openzfs_test
Creating a compressed image, this may take some time...
Image of openzfs_test created with UUID 97e21f42-3a1d-11eb-97b9-001e67997f5d

Looks like it is working as described on a Bhyve VM.
I can share this Bhyve image if anybody wants to play with it.

You can download my original VM image I used in this experiment: ZFS Bhyve image

👍
 
My success setup for installing #FreeBSD 12.2 with #openZFS, on a VM VirtualBox
Options choosed for Installing and compiling OpenZFS from port, must match your activated kernel modules.
Fortunately this time, the result was a success boot. Thanks to every one helping community support .
 

Attachments

  • My success setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Instructions.png
    My success setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Instructions.png
    53.5 KB · Views: 135
  • My sucess setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Sammary show.png
    My sucess setup for installing Freebsd 12.2 with openZFS, on a VM VirtualBox - Sammary show.png
    41.1 KB · Views: 141
  • VirtualBox_freebsd12_srv_openzfs_base - Optional System components.png
    VirtualBox_freebsd12_srv_openzfs_base - Optional System components.png
    7.1 KB · Views: 129
Back
Top