OpenZFS: encrypted dataset confusion (PEBKAM)
Graham Perrin
grahamperrin at gmail.com
Sat Oct 17 16:48:49 UTC 2020
On 17/10/2020 14:08, Ryan Moeller wrote:
> On 10/17/20 9:02 AM, Graham Perrin wrote:
>> root at momh167-gjp4-8570p:~ # date ; uname -v ; uptime
>> Sat Oct 17 14:00:10 BST 2020
>> FreeBSD 13.0-CURRENT #69 r366648: Tue Oct 13 05:49:05 BST 2020
>> root at momh167-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
>> 2:00PM up 9 mins, 5 users, load averages: 0.29, 0.56, 0.31
>> root at momh167-gjp4-8570p:~ # zpool export Transcend && ls -hl
>> /Volumes/t500/VirtualBox ; zpool import Transcend && ls -hl
>> /Volumes/t500/VirtualBox
>> ls: /Volumes/t500/VirtualBox: No such file or directory
>> total 18
>> drwxr-xr-x 2 grahamperrin grahamperrin 2B Sep 11 19:28 CloudReady
>> drwxr-xr-x 6 grahamperrin grahamperrin 6B May 8 09:04 FreeBSD
>> drwxr-xr-x 4 grahamperrin grahamperrin 4B Sep 20 17:03 Linux
>> drwxr-xr-x 4 grahamperrin grahamperrin 7B Oct 16 17:41 Windows
>> root at momh167-gjp4-8570p:~ # zfs get all Transcend/VirtualBox | grep
>> -e crypt -e key -e mountpoint | sort
>> Transcend/VirtualBox encryption aes-256-gcm -
>> Transcend/VirtualBox encryptionroot Transcend/VirtualBox -
>> Transcend/VirtualBox keyformat passphrase -
>> Transcend/VirtualBox keylocation prompt local
>> Transcend/VirtualBox keystatus unavailable -
>> Transcend/VirtualBox mountpoint /Volumes/t500/VirtualBox inherited
>> from Transcend
>> root at momh167-gjp4-8570p:~ # zfs --version
>> zfs-0.8.0-1
>> zfs-kmod-v2020100400-zfs_79f0935fa
>> root at momh167-gjp4-8570p:~ #
>
>
> This doesn't necessarily mean the encrypted filesystem is mounted
> though. The contents you are
> seeing must be in the parent filesystem.
>
> Check the output of the mount command, you should find
> Transcend/VirtualBox is not mounted.
True! Thank you.
I didn't realise that from the outset I had written to the non-encrypted
parent.
Fixed:
----
root at momh167-gjp4-8570p:~ # mount | grep Transcend
Transcend on /Volumes/t500 (zfs, local, nfsv4acls)
root at momh167-gjp4-8570p:~ # cd /Volumes/t500/
root at momh167-gjp4-8570p:/Volumes/t500 # mv VirtualBox vbox
root at momh167-gjp4-8570p:/Volumes/t500 # zfs create -o encryption=on -o
keyformat=passphrase Transcend/VirtualBox
cannot create 'Transcend/VirtualBox': dataset already exists
root at momh167-gjp4-8570p:/Volumes/t500 # zfs destroy Transcend/VirtualBox
root at momh167-gjp4-8570p:/Volumes/t500 # ls -hl vbox
total 18
drwxr-xr-x 2 grahamperrin grahamperrin 2B Sep 11 19:28 CloudReady
drwxr-xr-x 6 grahamperrin grahamperrin 6B May 8 09:04 FreeBSD
drwxr-xr-x 4 grahamperrin grahamperrin 4B Sep 20 17:03 Linux
drwxr-xr-x 4 grahamperrin grahamperrin 7B Oct 16 17:41 Windows
root at momh167-gjp4-8570p:/Volumes/t500 # zfs create -o encryption=on -o
keyformat=passphrase Transcend/VirtualBox
Enter passphrase:
Re-enter passphrase:
root at momh167-gjp4-8570p:/Volumes/t500 # mount | grep Transcend
Transcend on /Volumes/t500 (zfs, local, nfsv4acls)
Transcend/VirtualBox on /Volumes/t500/VirtualBox (zfs, local, nfsv4acls)
root at momh167-gjp4-8570p:/Volumes/t500 # zpool status -v Transcend
pool: Transcend
state: ONLINE
scan: scrub repaired 0B in 01:11:28 with 0 errors on Sun Oct 11
12:35:27 2020
config:
NAME STATE READ WRITE CKSUM
Transcend ONLINE 0 0 0
da0p1 ONLINE 0 0 0
errors: No known data errors
root at momh167-gjp4-8570p:/Volumes/t500 # time mv vbox/* VirtualBox/
0.630u 1378.236s 3:16:17.32 11.7% 15+167k 0+0io 235pf+0w
root at momh167-gjp4-8570p:/Volumes/t500 #
More information about the freebsd-current
mailing list