RAID 1 on 2 external HDDs

10,678

Solution 1

One thing that is often overlooked on a home setup is that you usually would be better off without raid / mirroring. Unless you have a need to protect data that is less than 24 hours old, you would usually be better off using the second drive as storage for your backups of the primary drive. That way, assuming data doesn't change much (where you could get use out of incrementals), you could be protected against both physical failure and filesystem or other soft failures.

Solution 2

If you just want to use a bunch of disks with some form of redundancy as a single volume, you could use greyhole - which seems perfect for your useage case - it supports redundancy and lets you add and remove volumes at will.

ZFS or btrfs might also be options with raid style volume management options but neither is as simple as greyhole

Solution 3

You can do this. I've seen it done with up to 8 drives on usb 2.0. The performance is really rubbish, but with md it's perfectly doable.

It's mostly the performance issue that'll make you want to go internal.

Solution 4

I've never come across any solutions for doing this with hardware RAID, although I'm pretty certain it could be done with Software RAID as a USB HDD in Linux is treated the same as any other mounted storage device (In fact the link in the OP proves this).

The bigger issue you will run into is bandwidth, USB ports are notoriously slow and high latency when compared to internal connectors such as SATA and SAS. This will be compounded if you end up using a USB hub as suggested in the linked article. The best advice I can give here is; use USB 3.0/eSATA/Firewire if at all possible, as all of these are at-least on the same order of magnitude as SATA/SAS. If this isn't possible, try to spread the drives out amongst the different USB hubs on your PC/Laptop to alleviate any issues of shared bandwidth (on lower end chipsets, USB bandwidth tends to be shared between ports).

However, ultimately I feel like this is more of an academic exercise, the best case performance will still be poor and I personally fail to see any use cases for this that couldn't be solved using a backup solution or internal (hardware?) RAID.

Solution 5

In addition to the performance issues mentioned in other answers, it's also worth noting that most external drive enclosures tend to be horrible in terms of heat dissipation. If you plan to do frequent reads/writes with your drives (such as you might with a 24/7 home server), you'll drastically reduce the lifespan of the drive by keeping it in its enclosure.

For performance reasons and to avoid cooking your drives, it's best to shuck them and put them into a NAS or tower that has active cooling.

Share:
10,678

Related videos on Youtube

evgeny9
Author by

evgeny9

Updated on September 18, 2022

Comments

  • evgeny9
    evgeny9 almost 2 years

    I have an Ubuntu 12.04 server on my old laptop. Its HDD (160 GB) is too small for the file storage I need, so I'd like to attach a couple of external HDDs to it (through USB ports). The data I'll keep there is rather valuable to me, so I'd like to organize a software RAID (RAID 1) on 2 external HDDs. The only solution for this problem I found on the net is described here (and it's said that using external drives is not recommended).

    How should I do it then, and what is the difference compared to installing it on internal drives? Do I need external drives that are exactly the same (model), like for a hardware RAID? Or is it a really bad idea? If so, do I need not a RAID, but a backup solution or a NAS, attached to my server?

  • Admin
    Admin about 12 years
    Agreed. If the data is valuable, you don't want RAID, you want backups. RAID for (high) availability, backups for safety.
  • Sirex
    Sirex about 12 years
    ah greyhole. possibly the worst named good project ever :-)
  • Pavel Šimerda
    Pavel Šimerda almost 10 years
    Downvoting because I don't agree that just removing RAID from the setup helps in any way. Whether you have backups and whether you have RAID are two orthogonal questions.
  • Pavel Šimerda
    Pavel Šimerda almost 10 years
    I'm considering software RAID over USB just to get a system running before a proper motherboard is bought.
  • Derek Pressnall
    Derek Pressnall over 9 years
    @Pavel Šimerda, while I agree that RAID and backups are two different things, and that the ideal setup is to have your primary data on a RAID and your backup on another RAID (along with a copy on tape, the cloud, and copies in a secure storage facility), home setup budgets put a limitation on this. So if your choice is an extra drive as a mirror OR as a backup, many are better served with the backup option.
  • Pavel Šimerda
    Pavel Šimerda over 9 years
    I don't disagree but the wording in the answer suggest that one would be better off without raid and that's simply not true (disregarding the hidden assumption that you will perform backups on the saved drive).
  • Delorean
    Delorean about 8 years
    I know this is old, but I've downvoted because a home setup is where you also want long-term protection, such as family pictures, important documents etc that you may not be able to store all on your primary drive. This is where the mirrored drives offer more protection in the long run since you have 2 backed up copies.
  • Derek Pressnall
    Derek Pressnall almost 8 years
    @Dorian, I think you missed the point -- if you have only two drives available, and you mirror them, then you are not protected in the case of an accidental file deletion. But if you run a daily backup job to copy from drive 1 to drive 2, you will at most lose only one day's worth of data. Of course, you will still be better of yet with many drives in a RAID 6, plus many more drives in another RAID 6 on another server that holds daily/weekly/monthly backups, and a mirror to cloud storage. But this was only referring to the case where a user has budget for only two drives.
  • Delorean
    Delorean almost 8 years
    You are incorrect. You also suggested in your answer that he make a backup drive and then a backup of the backup drive. Essentially what a mirrored array does. And when I say or hear backups, it doesn't mean copies, it means full, differential and incremental backups. And he speaks of files important to him, it's not an automated corporate setup (which I have set up many times).
  • ctrl-alt-delor
    ctrl-alt-delor about 7 years
    To protect from accidental deletion. You are correct in saying that raid is no use, for this, but to say that back up is the solution is also wrong. The best solution, and only solution that works (no ops I deleted it before it was backed up, or ops I only noticed that it was deleted after the backups were rotated, …), is revision control. All 3 provide a different thing. Raid for availability, backup for disaster recovery, revision control for human error recovery.
  • doneal24
    doneal24 over 2 years
    If you're using SSDs (likely now, not likely when the question was asked in 2012), head dissipation is not a major issue. Might come up if you're pushing the limits on usb3 data rates but still unlikely. I'd still agree that an external md array is a bad idea and a dedicated NAS is much better. Also still emphasize that raid is not backup. rm -rf * on a raid 1 just means you lose your data faster.