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.

  • Zimmie
    link
    fedilink
    27 days ago

    @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.

  • @just_another_person
    link
    English
    17 days ago

    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.

    • ѕєχυαℓ ρσℓутσρєOP
      link
      fedilink
      English
      17 days ago

      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.

      • @just_another_person
        link
        English
        17 days ago

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