ZFS: Difference between revisions
imported>Mic92 typo |
imported>Mic92 add trim service. |
||
| Line 436: | Line 436: | ||
ZFS trimming works on one or more zpools and will trim each ssd inside it. There are two modes of it. One mode will manually trim the specified pool and the other will auto-trim pools. However the main difference is, that auto-trim will skip ranges that it considers too small while manually issued trim will trim all ranges. | ZFS trimming works on one or more zpools and will trim each ssd inside it. There are two modes of it. One mode will manually trim the specified pool and the other will auto-trim pools. However the main difference is, that auto-trim will skip ranges that it considers too small while manually issued trim will trim all ranges. | ||
To manually start trimming of a zpool run: <code>zpool trim tank</code> | To manually start trimming of a zpool run: <code>zpool trim tank</code>. | ||
Since [https://github.com/NixOS/nixpkgs/pull/65331 PR-65331] this can be also done periodically (by default once a week) by setting <code>services.zfs.trim.enabled = true</code>. | |||
To set a pool for auto-trim run: <code>zpool set autotrim=on tank</code> | To set a pool for auto-trim run: <code>zpool set autotrim=on tank</code> | ||