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:24] – oemb1905 | computing:zfsreminders [2024/04/21 21:16] – 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, remove drive, reboot, get '' | + | To replace a failed |
sudo zpool replace pool < | sudo zpool replace pool < | ||
- | sudo zpool replace pool 2277585469358930581 | + | sudo zpool replace pool 3347762980558930904 |
- | The .... | + | 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: | ||
+ | |||
+ | arc_summary | ||
+ | |||
+ | Change location of the keys for your encrypted datasets: | ||
+ | |||
+ | sudo zfs set keylocation=file:/// | ||
+ | |||
+ | Send and receive entire pool to new pool | ||
+ | |||
+ | zfs snapshot -r pool1@latestsnap | ||
+ | zfs send -R pool1@latestsnap | zfs receive -F pool2 | ||
+ | |||
+ | Arc information | ||
+ | |||
+ | arcstat | ||
+ | arc_summary -d | less | ||
+ | |||
+ | More examples | ||
- | --- //[[jonathan@haacksnetworking.org|oemb1905]] | + | --- //[[webmaster@haacksnetworking.org|oemb1905]] |