Redundancy? storage options for a rpi4? filesystems? raid?

SnailMagnitude@mander.xyz to Selfhosted@lemmy.world – 16 points –

I have a pi4 running on an ssd over usb3 with a usb3 dock that has 2x2TB drives for storage.

At the moment I have mainly music on one and mainly video on the other, with important stuff on both and elsewhere.

Is it sensible to combine 2x2TB hdd's via usb3 dock into a 4TB filesystem/pool/volume/thing......and if so can I have tiered storage so if one drive fails the other will have a mirror of important stuff?

10

Raid0 (combining both drives' capacities) is not really tiered storage. You would want Raid1 (each drive is a copy of the other drive ), but doing this isn't a backup. How will you be monitoring the drives so that you know if one of them actually fails?

I don't think the RPi has a new enough kernel, but with bcachefs you can do tiered storage. By combining the storage of the ssd + hardrives, into a single block device, then make the ssd the read/write cache, and give the whole pool replicas=2, so that that if one drive dies you still have the failover of the other drive. Do be aware this setup is still not a backup however.

Thanks,

bcachefs could be the answer but I don't really want my data on a fs I need this week's kernel to access properly. Maybe I should just hold off for a few months.

I'm not monitoring the drives, I have backups of important stuff...but would be nice to tag more important stuff amongst the mediocre stuff on the off chance both drives don't fail at the same time.

What you're looking for is a backup. RAID is not a backup, as another poster said it's a tool for enduring high availability, and possibly higher throughput.

Buy a second pi and put it in another location in your house or even better at friends house then configure regular backups of your important data to it. There are also cloud services for doing backups which are great because having a location to do off-site backups to can be really hard to get as an individual.

Thanks, I do have backups of important stuff.

I think bcachefs is what I'm looking for, but I'm gonna wait a bit until development calms down a little and keep on the way I am at the moment.

With two drives you can extend them into one big drive or you can mirror them, but you can't do both.

RAID1 would be a stopgap against a certain type of failures but it's not a solution for accidental deletions or failures that affect both drives or the whole machine (fire, electrical, theft).

Redundancy is mostly a solution for continuous availability, which is not something most home-users care about that much (but if you have private self-hosted services that are super critical for you you may want to reconsider your approach).

You should start by taking inventory of your truly important files, figure out how much space they take overall, then start doing proper backups for them. That means taking regular snapshots on some different media. That media can be another HDD, or it can be optical discs (Blu Ray is better than DVD but it may be a matter of cost where you live). If you use a HDD there are specialized backup software like Borg Backup that will deal with deduplication, compression etc. for you. And you have to verify your backups regularly as well – Borg will allow you to do it easily, with optical discs you can use recovery parity checksums (with par2).

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:

Fewer Letters More Letters
RAID Redundant Array of Independent Disks for mass storage
RPi Raspberry Pi brand of SBC
SBC Single-Board Computer

2 acronyms in this thread; the most compressed thread commented on today has 10 acronyms.

[Thread #467 for this sub, first seen 30th Jan 2024, 11:45] [FAQ] [Full list] [Contact] [Source code]