ZFS: Difference between revisions
Created page with "http://dank.qemfd.net/tabpower/d-i-zfs.png" |
|||
| (11 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
i like Jim Salter's [https://jrs-s.net/2018/08/17/zfs-tuning-cheat-sheet/ zfs tuning cheat sheet]. lots of good info there, presented in an easily-digestible format. | |||
==zpools== | |||
A ZFS storage pool (zpool) is a collection of devices (vdevs) that provides physical storage and data replication for ZFS datasets. | |||
===zpool vdevs=== | |||
Only disks, partitions, and files can be used as "base vdevs" suitable for aggregation into mirrors and raidzs. | |||
* Entire disks | |||
** Partitions (not recommended) | |||
*** Files (strongly not recommended -- only as reliable as underlying filesystem) | |||
* Mirrors (n-way replication) | |||
* Raidz{1, 2, 3} (n-way parity) | |||
* "spare" -- a pseudo-vdev which tracks spare disks | |||
* Log -- separate-intent log device(s) supporting round-robining and mirroring, but not parity | |||
* Cache -- a cache device | |||
==datasets== | |||
A more general concept than filesystems, a dataset is contained within a pool, and bound to a unique path in the ZFS namespace. | |||
* Filesystems (not quite [[POSIX]]) | |||
* Volume (exported block device) | |||
* Snapshot (readonly copy of filesystem from some point at time) | |||
** Available in .zfs/snapshot in the root of the associated filesystem | |||
==[[udev]]== | |||
* ZFS generates subsystem "bdi" udev events, pointing to <tt>devices/virtual/bdi</tt> in [[sysfs]] | |||
==Basic tuning== | |||
* <tt>zfs set atime=no</tt> | |||
* <tt>zfs set xattr=sa</tt> | |||
* <tt>ashift</tt> will generally be handled properly, assuming your disk properly exposes its true sector size (check [[sysfs]]) | |||
* Verifying SIMD implementation in 5.x: | |||
<pre> | |||
$ cat /sys/module/zfs/parameters/zfs_vdev_raidz_impl | |||
$ cat /sys/module/zcommon/parameters/zfs_fletcher_4_impl | |||
</pre> | |||
==Caching== | |||
* L2ARC: general read cache between RAM (ARC) and zpool | |||
* ZIL: zfs intent log for accelerating synchronous writes | |||
** there is no general-purpose write cache (i.e. mirrored pair of SSDs between RAM and spinning zpool) | |||
* [https://forum.level1techs.com/t/zfs-metadata-special-device-z/159954 metadata special device], pretty cool | |||
==See also== | |||
* The [[growlight]] system installation tool supports ZFS | |||
* [[TRIM]] | |||
==External links== | |||
* [https://utcc.utoronto.ca/~cks/space/blog/sysadmin/ZFSTrimUsefullnessQuestion Some thoughts on whether and when TRIMming ZFS pools is useful] on [https://utcc.utoronto.ca/~cks/space/AboutBlog Wondering Thoughts] | |||