This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
computing:zfsreminders [2022/08/05 23:19] – oemb1905 | computing:zfsreminders [2022/11/13 19:37] – oemb1905 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ------------------------------------------- | ||
+ | * **zfsreminders** | ||
+ | * **Jonathan Haack** | ||
+ | * **Haack' | ||
+ | * **webmaster@haacksnetworking.org** | ||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
+ | // | ||
+ | |||
+ | ------------------------------------------- | ||
+ | |||
Create a pool on a single drive and specify a mountpoint for it. Note: use id, not uuid. | Create a pool on a single drive and specify a mountpoint for it. Note: use id, not uuid. | ||
Line 34: | Line 46: | ||
zfs load-key pool/ | zfs load-key pool/ | ||
zfs mount pool/ | zfs mount pool/ | ||
+ | | ||
+ | If you need to delete a dataset, do the following: | ||
+ | |||
+ | zfs destroy -r pool/ | ||
| | ||
To create snapshots, here is a reasonable template: | To create snapshots, here is a reasonable template: | ||
Line 44: | Line 60: | ||
zfs list -H -o name -t snapshot | xargs -n1 zfs destroy | zfs list -H -o name -t snapshot | xargs -n1 zfs destroy | ||
| | ||
- | To add a zfs cache hard drive to your pool, do the following: | + | To add a zfs cache or slog hard drive to your pool, do the following: |
zpool add pool cache / | zpool add pool cache / | ||
+ | zpool add pool log / | ||
To view current snapshots, do the following: | To view current snapshots, do the following: | ||
Line 57: | Line 74: | ||
zfs list -ro space | zfs list -ro space | ||
| | ||
- | To replace a drive, power down the host. Physically | + | To replace a failed |
+ | |||
+ | sudo zpool replace | ||
+ | sudo zpool replace pool 3347762980558930904 / | ||
+ | |||
+ | To check the health, statistics, and basic specs of your pool: | ||
+ | |||
+ | zpool status -v | ||
+ | zpool iostat -v | ||
+ | zpool list -v | ||
+ | |||
+ | Also, to see whether cache volume is necessary, run and look at cache hit/miss ratio: | ||
- | | + | |
+ | Change location of the keys for your encrypted datasets: | ||
+ | sudo zfs set keylocation=file:/// | ||
- | --- // | + | --- // |