Logo
Why I Don’t Use RAID on My Home Server – And Haven't Looked Back
share forum

Why I Don’t Use RAID on My Home Server – And Haven't Looked Back


Software • von Sven Reifschneider • 16. November 2024 • 0 Kommentare
info
Dieser Beitrag ist auch auf Deutsch verfügbar. Auf Deutsch lesen

Why I Don’t Use RAID on My Home Server but Mirror the Data HDDs Manually Each Day

If you’re familiar with server setups, RAID probably seems like a go-to for redundancy. As someone managing both public and personal servers, I rely on RAID 1 on our production servers without question. But at home? I take a different approach. My personal server setup – a NAS-like machine providing storage to multiple devices – runs on a manual daily backup system. It might seem unconventional, but this approach has some major advantages. Here’s a closer look at why I’ve chosen it and how this system helps me keep my data secure, energy-efficiently, and with a touch more flexibility than RAID.

Image 1

Understanding RAID (And Why It’s Not Always Necessary)

Before diving into why I opted out of RAID at home, it helps to understand what RAID (Redundant Array of Independent Disks) offers. In a nutshell, RAID is a data storage technology that combines multiple physical disk drives into one or more logical units to achieve redundancy, performance, or both. RAID 1, in particular, mirrors data identically across two drives. If one drive fails, the data is immediately available on the other – no downtime, no data loss, making it a fantastic choice for enterprise or high-availability systems.

But home servers are a different story. My home server setup serves as a data hub accessed by various devices and clients. While redundancy is crucial in production servers to ensure constant uptime, the same level of redundancy isn't necessary for a home server focused on cost-efficiency, energy savings, and basic data safety.

Why RAID 1 Isn’t Right for My Home Server

Instant Data Sync: A Double-Edged Sword

In RAID 1, all data changes are instantly duplicated. While that’s advantageous if you’re aiming for uptime without missing a beat, it also means that any accidental deletion, ransomware, or virus will immediately sync across both drives. If a file gets corrupted or mistakenly deleted on a RAID setup, it’s essentially gone on both drives. For a home server setup, that level of immediacy can backfire.

By using a manual backup instead of RAID, I keep an additional layer of protection. If I accidentally delete something or notice a suspicious file alteration, I can revert to yesterday’s backup without the risk of RAID’s instant synchronization working against me.

Energy Efficiency: Running Only When Needed

RAID requires both drives to be online and synchronized constantly. However, in my setup, the main data drive stays active for daily use, while the backup drives remain in standby, activated only for nightly backups. This setup conserves energy – instead of keeping all disks running 24/7, only the primary drive is active, while the others use minimal power until needed.

This setup helps me reduce wear on older backup drives and save on energy costs, a big plus when running a server at home.

Image 2

My Manual Backup Solution: Simple, Reliable, and Flexible

My backup system relies on an 18TB main data HDD*, which is mirrored across three older 6TB internal drives* nightly using rsync. The split across multiple backup drives allows me to evenly distribute data and utilize storage resources efficiently. Here’s a closer look at how this system works:

Automated Nightly Backup with rsync

Every night, my server initiates a simple yet effective rsync script that mirrors data from my primary drive to the backup drives. By running rsync -av --delete, I ensure each file is synchronized, and the --delete flag clears files that are no longer on the main drive, keeping my backup drives aligned with the main data.

Since I don’t need real-time redundancy at home, this solution is ideal. I get a daily snapshots of my data and the flexibility to restore yesterday's state without the rigidity of RAID.

Also the backup script is fairly simple which just gets called via crontab:

#!/usr/bin/env bash
rsync -av --delete /media/Data/Documents/ /media/Backup1/
rsync -av --delete /media/Data/Pictures/  /media/Backup2/
rsync -av --delete /media/Data/RedPandas/ /media/Backup3/

Utilizing Samba’s Trash Feature

To further safeguard against accidental deletions, I’ve configured Samba on my server to use a "Trash" directory for all standard delete operations. This setup gives me a recovery option without needing to dive into yesterday’s backup. Files remain in the Trash for up to 14 days, after which an automated script clears them. This simple feature has proven invaluable and pairs perfectly with my manual backup approach.

You can simply define such a trash directory for all your shares in your /etc/samba/smb.conf:

 [global]
 vfs object = recycle acl_xattr
 recycle:repository = Trash
 recycle:keeptree = Yes
 recycle:touch = Yes
 recycle:versions = Yes
 recycle:maxsize = 0

Deleted files will be moved there, in subdirectories just like the hierarchy on the share itself.

Then create the "Trash" dir in all your shares and you're ready to go. I run a simple script via crontab each night which removes all files from the Trash directories which are moved to Trash more than 14 days ago:

#!/usr/bin/env bash
find /media/Data/Trash/* -atime +14 -exec rm {} \;

Cross-System Compatibility with ext4

Unlike RAID arrays, my backup drives are formatted with ext4, allowing them to be mounted independently on any Linux system. Should my primary server ever fail or become inaccessible, I can simply plug one of the backup drives into another computer and access my data directly, providing flexibility that a full RAID array doesn’t offer without additional configuration.

External Backups

Besides this daily internal backup I regularly create another copy on an external HDD. This is very important, especially in cases in which the internal backup isn't accessible or got destroyed together with the main HDD. I do these backups every few weeks. Right now I'm also using an old HDD for this case in an external HDD enclosure, which is way cheaper than buying an external HDD right away.

And since cloud storage is fairly cheap these days and we're able to create secure, encrypted backups with solutions like borgbackup. This way we have an other backup, even if everything physical would fail. Since this can be fully automated and is quite performant when you have a good bandwidth like I do, this runs daily as well.

And just like that we pass the 3-2-1 rule for data archiving. 3 copies of all files (internal main HDD, internal backup HDDs, external HDD) on at least 2 different media (internal HDD, external HDD, most important data in addition on M-Disc Blu-Rays*) with 1 additional off-site backup in the cloud.

Image 3

Benefits I’ve Experienced from Manual Backups

Restoration Flexibility

With my nightly backup approach, I have access to yesterday’s data state, which has saved me more than once from accidental deletions. When RAID 1 would have synced these errors across both drives instantly, my manual backup retains an extra layer of recovery.

Lower Energy and Maintenance Costs

The intermittent activity on my backup drives prolongs their lifespan, while keeping my electricity bill manageable. RAID, with its continuous mirroring, can create significant wear and power consumption over time – something I’ve minimized with this setup.

Peace of Mind with SMART Monitoring

Despite not using RAID, I monitor my drives rigorously with SMART (Self-Monitoring, Analysis, and Reporting Technology) checks to detect early signs of failure. If my primary drive shows signs of imminent failure, I can replace it before it becomes an issue, minimizing any risk of prolonged data loss.

Minimal Compromise on Redundancy

The only “drawback” of my system is the potential to lose a day’s data in a worst-case scenario. But for personal use, this is a compromise I can easily live with, given the added benefits in flexibility, efficiency, and data safety.

Image 4

When to Consider Manual Backups Over RAID

While RAID remains unbeatable for production systems where uptime and redundancy are paramount, a home server setup with manual backups could make sense if you:

  • Value energy savings and lower power consumption in your setup
  • Prefer flexible, easily accessible backups you can restore independently of a RAID array
  • Appreciate the ability to revert to a previous data state without risking immediate synchronization of accidental deletions or ransomware

This approach isn’t suitable for everyone, but it’s one that I’ve found ideal for my needs and data habits.

An Efficient, Adaptable, and Reliable Solution

Choosing manual backups over RAID on my home server has proven to be a thoughtful choice that aligns with my needs and priorities. By mirroring data across backup drives with a nightly rsync script, I’ve achieved a balance of redundancy, cost-efficiency, and flexibility that I believe others could benefit from. This method allows me to take a proactive, minimalist approach to data safety without compromising too much on security or resilience.

Would I recommend this approach for enterprise environments? Definitely not. But for a home server, it’s been an ideal fit, saving me time, money, and, most importantly, giving me peace of mind.

Let’s Chat About Your Setup!

What backup methods do you use on your home server? Do you rely on RAID or take a more customized approach? Let’s discuss in the comments! And if you’re considering setting up a server or upgrading your backup strategy, reach out – I’m always happy to exchange ideas or help you with setup tips.

(* - Amazon affiliate links to related products I use)

This post was created with assistance from AI (GPT-4o). The illustrations were AI-generated by myself with DALL-E 3. Curious how AI can help create content and images from your own ideas? Learn more at Neoground GmbH.


Teile diesen Beitrag

Wenn dir dieser Artikel gefallen hat, teile ihn doch mit deinen Freunden und Bekannten! Das hilft mir dabei, noch mehr Leute zu erreichen und motiviert mich, weiterhin großartige Inhalte für euch zu erstellen. Nutze einfach die Sharing-Buttons hier unten, um den Beitrag auf deinen bevorzugten sozialen Medien zu teilen. Danke dir!

Sharing Illustration
Donating Illustration

Unterstütze den Blog

Falls du meine Arbeit und diesen Blog besonders schätzen solltest, würde ich mich riesig freuen, wenn du mich unterstützen möchtest! Du kannst mir zum Beispiel einen Kaffee spendieren, um mich bei der Arbeit an neuen Artikeln zu erfrischen, oder einfach so, um den Fortbestand des Blogs zu fördern. Jede noch so kleine Spende ist herzlich willkommen und wird sehr geschätzt!

currency_bitcoin Spende via Kryptowährungen
Bitcoin (BTC):1JZ4inmKVbM2aP5ujyvmYpzmJRCC6xS6Fu
Ethereum (ETH):0xC66B1D5ff486E7EbeEB698397F2a7b120e17A6bE
Litecoin (LTC):Laj2CkWBD1jt4ZP6g9ZQJu1GSnwEtsSGLf
Dogecoin (DOGE):D7CbbwHfkjx3M4fYQd9PKEW5Td9jDoWNEk
Sven Reifschneider
Über den Autor

Sven Reifschneider

Herzliche Grüße! Ich bin Sven, ein technischer Innovator und begeisterter Fotograf aus der malerischen Wetterau, in der Nähe des lebendigen Frankfurt/Rhein-Main-Gebiets. In diesem Blog verbinde ich mein umfangreiches technisches Wissen mit meiner künstlerischen Leidenschaft, um Geschichten zu erschaffen, die fesseln und erleuchten. Als Leiter von Neoground spreng ich die Grenzen der KI-Beratung und digitalen Innovation und setze mich für Veränderungen ein, die durch Open Source Technologie Widerhall finden.

Die Fotografie ist mein Portal, um die flüchtige Schönheit des Lebens auszudrücken, die ich nahtlos mit technologischen Einsichten verbinde. Hier trifft Kunst auf Innovation, jeder Beitrag strebt nach Exzellenz und entfacht Gespräche, die inspirieren.

Neugierig, mehr zu erfahren? Folge mir in den sozialen Medien oder klicke auf "Mehr erfahren", um das Wesen meiner Vision zu erkunden.


Noch keine Kommentare

Kommentar hinzufügen

In deinem Kommentar kannst du **Markdown** nutzen. Deine E-Mail-Adresse wird nicht veröffentlicht. Mehr zum Datenschutz findest du in der Datenschutzerklärung.