docs(zfs): First clean-up then Unmap/TRIM

This commit is contained in:
hygienic-books 2023-03-05 06:04:00 +01:00
parent fefabf2c6e
commit 12038d3eaf

View File

@ -168,6 +168,19 @@ zfs send --raw zpool/root/archlinux-frn@rekey | zstream dump | sed -n -e '/crypt
Repeat for source dataset `zpool/root/archlinux-sxu@rekey`. You're particularly interested in parameters `DSL_CRYPTO_MASTER_KEY_1` and the initialization vector `DSL_CRYPTO_IV`. Notice that they differ between old and new dataset confirming that your new dataset has a new master key.
### Clean-up
Clean up:
1. In newly keyed/reencrypted system dataset destroy its snapshot
```
zfs destroy zpool/root/archlinux-frn@rekey
```
1. Recursively destroy source dataset
```
zfs destroy -r zpool/root/archlinux-sxu
```
### Unmap/TRIM
Next up unmap/TRIM unallocated disk areas. If your zpool runs on an entire disk and not just on a partition, and if your disk supports TRIM you're going to want to do:
@ -189,19 +202,6 @@ zpool status -t zpool
zpool status zpool
```
### Clean-up
Optionally you may want to clean up:
1. In newly keyed/reencrypted system dataset destroy its snapshot
```
zfs destroy zpool/root/archlinux-frn@rekey
```
1. Recursively destroy source dataset
```
zfs destroy -r zpool/root/archlinux-sxu
```
# ZFS setup explained
The ZFS pool and dataset setup that makes this tick, explained in plain English.