External USB RAID 5 array using mdadm


In case you’re wondering, yes, using external drives in a USB RAID array is a little crazy. For anyone considering it, there’s a downside. First of all, USB drives almost always need a DC power source, which means you’ll have a ton of awkward power adapters to deal with. The worst part, though, is the risk that two or more, but not all of the drives will go down.

For example, let’s say you’ve got five drives - too many to plug into most USB hubs or directly into your motherboard, so you’re using two USB hubs. One of the hubs dies, and suddenly half your drives are dropped. If only one drive goes down, you’re array will be fine - just add the drive back and wait for it to rebuild. That’s assuming the disk is fine and it was just a momentary disconnection, of course. If more than one goes down, though, you’re going to have a very hard time rebuilding that array. The exact same issue applies to the power strips if you can’t fit all the power adapters on one.

The next issue is still a mystery to me, but I think it has to do with changing which USB port a given drive is plugged into. I’ve taken my server to LAN parties three times, and twice the array has been degraded when I power back up. Each time it’s just a matter of adding the dropped disk back and everything is fine again. And no, I never kept track of exactly where each drive was plugged in.

So why would anyone want to build a USB RAID 5 array? Well, it’s cheap! All you need to buy are the drives, and 1TB drives are currently under $100. Unless you’re fortunate enough to have a spare motherboard with loads of SATA controllers, it’s going to cost a ton to get a dedicated SATA controller. Second, you’ll never have to worry about your case overheating because of too many hard drives. Plus, it looks sweet as hell to have a whole line of external drives that make up your array.

What about speed, you ask? With three 1TB USB drives in RAID 5 I get 18 MB/s read, 31 MB/s write (don’t ask me how that’s possible). My other array - 3 x 500MB internal SATA RAID 5 - delivers 30 MB/s read and write.

Given the delicate nature of a USB drive’s connection, I have to recommend keeping your drives internal. However, if you don’t have enough SATA controllers and you want to build an array on the cheap, you can make a USB RAID array work. Mine’s been up for almost a year now and I haven’t lost any data, although it has been degraded three times: twice when I took it apart and moved it, and once when I stepped on one of the DC power adapters and momentarily cut power to a drive.

Update: I just added another two 1TB drives, for a total of five! This article about growing RAID 5 arrays was very helpful.

img_1094

,

  1. #1 by rab at May 27th, 2009

    just saw this blog post at http://scotgate.org/2006/07/03/growing-a-raid5-array-mdadm/ I am using a very similar setup. Just added my 4th 1TB WD Caviar Black to this enclosure http://www.newegg.com/Product/Product.aspx?Item=N82E16816111047

(will not be published)
  1. No trackbacks yet.