1

A database* will generate many small writes to its storage. If the storage is backed by a BTRFS filesystem, then these small logical writes will lead to many larger writes because of BTRFS' copy-on-write mechanism. Can this lead to significantly shorter life spans of the disks?

I'm asking because I have such a setup* and I've seen way more hard drive failures than I'd ever expect: >3 failures of high-quality HDDs on the same system within just a year or two.

* PostgreSQL, but it shouldn't really matter.

** I know BTRFS isn't a great FS to back a database, but I thought performance was the only reason and that doesn't matter that much in this context.

4
  • 2
    While its a good question, I think you will get mainly opinion based answers. I don't think the problem is likely to be BTRFS here. I don't use BTRFS but I do use ZFS which is also uses COW - and I've not had any failures for many years. I think it may just be bad luck with the drives, or maybe a vibration issue or similar? Could it be heat related? Are all the drives the same make, model and age? Commented Sep 3, 2024 at 10:46
  • 1
    Though SSD's have limited write cycles, even when over-provisioned, they are more likely to fail than HDD's from such use. Look to overheating, environment (e.g., power glitches, air quality...) or other cause of HDD failure. Commented Sep 3, 2024 at 14:06
  • Thanks @DrMoishePippik, @ davidgo, I've looked at various things and BTRFS still isn't the most likely, but I just realized how bad DB workloads would be on BTRFS and thought maybe there's someone who has an insight into this. Commented Sep 3, 2024 at 17:11
  • I have a (not BTRFS) database on a M.2 SSD for a more than a year with no issues. It records dozens of sensors readings like temperature humidity and etc in addition to 50+ volt,amps,watt sensors every minute of every day. A lot of the changes are probably buffered through the DRAM cache. Commented Sep 5, 2024 at 14:51

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.