this post was submitted on 29 Nov 2024
21 points (88.9% liked)

Selfhosted

40487 readers
268 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hi!

I used to have three raid1:

2 x 4Tb Ssd dedicated to store personal data

2 x 6Tb HDD dedicated to store "iso's", the eye patched ones.

2 x 4Tb ssd for backup.

Ext4 everywhere.

I run this setup for years, maybe even 20 years (with many different disks and sizes over time).

I decided that was time to be more efficient.

I removed the two HDD, saving quite a lot of power, and switched the four sdd to RAID5, Then put BTRFS on top of that. Please note, I am not using btrfs raid feature, but Linux mdadm software raid (which I have been using rock solid for years) with btrfs on top as if on a single drive.

I choose MD not only for my past very positive experience, but specially because I love how easy is to recover and restore from many issues.

I choose not to try zfs because I don't feel comfortable in using out of kernel drivers and I dislike how zfs seems to be RAM hungry.

What do you guys think?

you are viewing a single comment's thread
view the rest of the comments
[–] poVoq@slrpnk.net 1 points 5 days ago* (last edited 5 days ago) (1 children)

Btrfs on a single storage prevents it from doing auto correction via checksums. I would get rid of the raid5 and do a btrfs raid1 out of these devices. Makes it also easier to swap out devices or expand the raid as btrfs supports arbitrary sizes.

[–] Shimitar@feddit.it 1 points 5 days ago (1 children)

The point was to her 12tb instead of 8tb... Raid1 would negate that...

What do you mean auto correction via checksum?

[–] poVoq@slrpnk.net 3 points 5 days ago (1 children)

One of the main features of file systems like btrfs or ZFS is to store a checksum of each file and allow you to compare that to the current file to notice files becoming corrupted. With a single drive all btrfs can do then is to inform you that the checksum doesn't match to the file any longer and that it is thus likely corrupted, but on a btrfs raid it can look at one of the still correct duplicates and heal the file from that.

IMHO the little extra space from mdadm RAID5 is not worth the much reduced flexibility in future drive composition compared to a native btrfs raid1.

[–] Shimitar@feddit.it 1 points 5 days ago (1 children)

Interesting feature, but how often is that needed? O I never had such issue ever in my life.

Is it something that can happen on such filesystems? Then I guess ext4 is far superior (/s).

Jokes aside, that extra space with raid5 if by far more tangible and statistically sound than the bit flipping fearmonger.

Which never happened to me so far.

Frankly, if a pixel of a photo or a piece of a scene of a movie is corrupted, I will just never know, and never even notice. Nor a corrupted bit in a text note would be critical.

I cannot think of any unreplaceable file of mine that would actually suffer from bit rot issue.

Can you? Would be interested in which kind.

[–] poVoq@slrpnk.net 2 points 5 days ago* (last edited 5 days ago)

It nearly certainly happened to you, but you are simply not aware as filesystems like ext4 are completely oblivious to it happening and for example larger video formats are relatively robust to small file corruptions.

And no, this doesn't only happen due to random bit flips. There are many reasons for files becoming corrupted and it often happens on older drives that are nearing the end of their life-span and good management of such errors can expand the secure use of older drives significantly. And it can also help mitigate the use of non-ECC memory to some extend.

Edit: And my comment regarding mdadm Raid5 was about it requiring equal sized drives and not being able to shrink or expand the size and number of drives on the fly, like it is possible with btrfs raids.