# 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: