this post was submitted on 17 Feb 2025
3 points (100.0% liked)

Everything ZFS

296 readers
3 users here now

A community for the ZFS filesystem.

ZFS is an opensource COW filesystem used by enterprise and serious homelabbers for it's data safety and extensive feature set.

OpenZFS is the active branch now developed primarily for Linux with a port to it's FreeBSD roots.

This community is here to answer questions and discuss topics related to the use of ZFS in the wild.

Rules:

As always, the main rule is Don't Be a Dick. Be polite with new users asking questions that you may consider obvious. If you don't have something constructive to offer, downvote and move on.

No dirty deletes: your posts are here for posterity, perhaps the next person will get something out of it, even if it's wrong.

founded 2 years ago
MODERATORS
 

I currently have a zfs pool with mirrored vdevs, and it's working well. It only has HDDs. I was planning to add an SSD I have lying around as a Metadata Special Device, since I've read that it can improve performance by quite a bit. I've also read that if I do that, and if the special device dies, I lose my pool.

Now, I don't want to buy new SSD pairs for mirroring this one, so is there a way to ensure that the metadata is also stored on the HDD as usual, along with the SSD? I guess I want it to work like a cache for the metadata, and not the only place for it.

top 5 comments
sorted by: hot top controversial new old
[–] bob_zim@infosec.exchange 2 points 6 days ago (1 children)

@SexualPolytope Unfortunately, that’s not possible. When you add a special device, all metadata (which is to say the filesystem tree itself) is written only to the special device.

This *can be okay*, as long as you have a good backup strategy. I would be comfortable using a single special device for a desktop which I back up to some other pool, for example.

[–] SexualPolytope@lemmy.sdf.org 1 points 6 days ago

Thanks for the reply. It seems I can't exactly do what I want here.

[–] just_another_person@lemmy.world 1 points 6 days ago (1 children)

No. I think you're misunderstanding the concept though. You're not "offloading" portions of a pool to something and acting as cache, you're just moving portions of the functioning pool to elsewhere. Of course you lose your pool if these die, because they ARE the pool.

This kind of setup isn't really meant to be super useful for a single pool configuration like yours, and I doubt you'd see a gigantic performance improvement. You'd see more drastic improvements if you were running dozens of HDDs running multiple pool partitions per drive and then added SSDs as metadata devices.

[–] SexualPolytope@lemmy.sdf.org 1 points 6 days ago (1 children)

Thanks for the reply. That is my understanding. That it's basically expanding the pool, and hence has same redundancy/backup requirements. I was wondering if it's possible to set up a metadata cache. From the replies, it seems like that's not possible for ZFS.

I've never heard of such a thing, and not even sure how that would work.