A file in encrypted dataset disappears after first reboot. How to reproduce: 1. Create an encrypted dataset like so (after creating a file with a passphrase) zfs create -o encryption=on -o keyformat=passphrase -o keylocation=file:///root/pass zroot/enc 2. Create file in encrypted dataset, for example like so cat > /zroot/enc/testfile 3. Reboot 4. Look for testfile, it has disappeared. # freebsd-version 13.0-RELEASE-p6 I can reproduce this every time I try. Further remarks: - The issue does not manifest if the dataset is not encrypted. I have not tested other types of encryption so don't know if it manifests or not. - The issue happens only on the first reboot after creating the dataset. In other words, if I create a file after the first reboot and reboot again, the file does not disappear. - The issue manifests also in a FreeBSD VirtualBox guest running on Archlinux host. - The issue does not manifests in a Xubuntu 21.10 VirtualBox guest running on Archlinux host. This suggests that the issue is in the FreeBSD kernel and not in the part of the ZFS code that is shared with Linux.
There must be some trivial explanation for this. Like the dataset not getting mounted after it's created or after a reboot, etc. Please check such basic things and follow up.
(In reply to Andriy Gapon from comment #1) Thanks for your feedback. I asked for help in the Questions mailing list.
Got answers in the mailing list. It is not a bug. There is a difference between Xubuntu and FreeBSD in what respects auto-mounting of encrypted sets at startup, but that is a different subject. I will try to close this issue now.