From 6d7fa6eff28c2ba8bb87bf19e02f4de1b94701b9 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Sat, 9 Sep 2023 10:19:01 +0200 Subject: zfs: add note about lsof and minor fixes in encrytion notes --- src/linux/zfs.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/linux') diff --git a/src/linux/zfs.md b/src/linux/zfs.md index e52874d..800d3d9 100644 --- a/src/linux/zfs.md +++ b/src/linux/zfs.md @@ -108,6 +108,8 @@ active host and `imported` on the new host. ```bash # Export a pool called MOOSE. zpool export moose +# If datasets are busy, use lsof to check which processes keep it busy. +# lsof # List pools that can be imported using BY-ID deivce names (for example). zpool import -d /dev/disk/by-id @@ -152,11 +154,12 @@ zfs unmount moose/foo Encryption is a readonly property, can only be set when creating a dataset. ```bash -# Create encrypted dataset ENC on pool MOOSE. +# Create encrypted dataset FOO on pool MOOSE. zfs create -o encryption=on -o keyformat=passphrase moose/foo -# Mount encrypte dataset (if key is not loaded). +# Mount encrypte dataset and load encryption key (if not loaded). zfs mount -l moose/foo +# -l is equivalent to first loading the key via zfs load-key moose/foo. # Unmount dataset and unload encryption key (unload is optional). zfs umount -u moose/foo -- cgit v1.2.3