4 ms·
I would hope ZFS has a way to mirror metadata from the pool into an ssd, so it is actually a cache but doesn't increase the probability of dataloss.
by sitkack 1y ago
I would hope ZFS has a way to mirror metadata from the pool into an ssd, so it is actually a cache but doesn't increase the probability of dataloss.
- wongarsu 1y agoIf you set up a normal L2arc (read cache device) that will cache both data and metadata. However you can configure it to only cache one of the two. Set it to metadata only and size it appropriately and you have basically a read-only metadata mirror. If you also want to have fast writes you can get a second SSD and set up a mirrored metadata device (storing metadata on mirrored SSDs, and regular data on whatever the rest of your pool uses)
- Dylan16807 1y agoLast time I stapled l2arc onto a hard drive zfs it was still super slow to do things like ls large directories and the l2arc never filled more than a couple gigabytes. Maybe it works better now?
- Filligree 1y agoIt’s gotten smarter, and among other things no longer erases the cache on reboot. But for that specific case you should use a metadata vdev. Just make sure it’s mirrored!
- olavgg 1y agoYou do, the normal way is to create a special metadata devices of mirrored SSD's. You do not need a 3 way mirror, as ZFS by default stores 2 copies of your metadata.
- deleted 1y ago[deleted]
- magicalhippo 1y agoYes, the docs[1] tells you to match the redundancy level of the pool, but you could technically do something else. Note the docs say level and not type. So if you have raid-z1 the a mirror would be appropriate as they both tolerate losing a single disk, and if you have raid-z2 you can use a 3-way mirror etc. [1]: https://openzfs.github.io/openzfs-docs/man/master/7/zpoolconcepts.7.html#special https://openzfs.github.io/openzfs-docs/man/master/7/zpoolcon...