this post was submitted on 20 Feb 2025
8 points (90.0% liked)

Linux

50398 readers
806 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I was wondering about the possibility of using the following setup with write-caching

btrfs
    bcache
        fast
            mdadm (RAID-1)
                ssd_1
                ssd_2
        slow
            mdadm (RAID-5)
                hdd_1
                hdd_2
                hdd_3
                hdd_4

Is this viable / reasonable? The arch wiki mentions the possibility of data loss when using write-caching when the SSD fails, but shouldn't the SSD RAID array prevent that? It also mentions "bcache and BTRFS could leave you with a corrupted file system" is this still true? The wiki page mentions that it's unclear if this is still an issue.

Someone also left the following comment on the discussions page regarding BTRFS in 2023:

The issues with btrfs + bcache were fixed 10 years ago. The btrfs wiki no longer mentions historic gotchas for kernels older than 4.14. I think we should remove this warning. Any objections?

all 8 comments
sorted by: hot top controversial new old
[–] tiddy@sh.itjust.works 1 points 1 day ago

Any reason you dont just use bcachefs?

Supports various write-cache configurations, and seperate forgrouns/background replications (a la raid 1).

I think its even more stable than raid because it'll auto-balance when a disk fails, but I'm not as certain in that

[–] slacktoid@lemmy.ml 2 points 3 days ago (1 children)

I've got a similar setup without the raid bcache cache drive and wish I did that as it should make maintenance easier. I think it should work. Tho I dunno the gotchas for btrfs and have only done it with xfs. Why btrfs if you don't mind me asking?

[–] qaz@lemmy.world 1 points 2 days ago* (last edited 2 days ago) (1 children)

I would like to use BTRFS for deduplication, CoW, and snapshots.

[–] slacktoid@lemmy.ml 1 points 1 hour ago
[–] merthyr1831@lemmy.ml 2 points 3 days ago (1 children)

Does this use Btfs' RAID5? If so you might want to avoid since RAID5/6 arent production ready for Btrfs and contain known bugs that can lead to parity loss.

[–] qaz@lemmy.world 2 points 3 days ago* (last edited 3 days ago) (1 children)

No, I'm aware of BTRFS's RAID 5/6 issues, this would use mdadm's RAID with BTRFS on the bcache block device.

[–] merthyr1831@lemmy.ml 2 points 3 days ago