Using RPi for NAS (with RAID)?


 
5 posts
by ElectroPulse » Thu Feb 23, 2012 8:31 pm
Hello, all!

Alright, I am wondering if the RPi supports any sort of RAID… I am not very familiar with the workings of RAID (like whether it can be done with USB or not…). I have gathered from reading that it requires an onboard RAID controller or something, and am wondering if the RPi has the ability to do it. (with a powered USB hub, of course) EDIT: Just ran across a post online where someone mentioned "software RAID," so I'm guessing it would work without a RAID controller? (probably slower)

If it's possible, I'd like to look into the idea of setting up a NAS RAID setup for backups. What would be cool about it is that it would be dynamic, allowing you to add more drives in, rather than being stuck to 2 or 4, for example. I was looking around and ran across FreeNAS, which appears to be an OS dedicated to turning a computer into NAS… If the RPi supports RAID, perhaps it would be worthwhile to look into the possibility of developing an OS for this very purpose.

Thanks!
Posts: 52
Joined: Fri Jan 27, 2012 3:54 am
by oninoshiko » Thu Feb 23, 2012 9:18 pm
Software raid in linux can get a little touchy. Personally, I reccomend ZFS in OpenIndiana or BSD (cant remember the distro right now). Unfortunately, IIRC with these you are stuck in the x86 world.

btrfs might bring some of the same features to linux.

There are a number of large hot-swap configurations avalible for x86.

All that said, in theory, it should work. In practice I don't think it's worth while (YMMV).
Posts: 76
Joined: Sun Jan 29, 2012 9:16 pm
by fruitloaf » Thu Feb 23, 2012 9:26 pm
RPi will support software raid however it's not a very good device to do this with. It has one USB port which is already shared with the ethernet. Sticking two drives on there would work (RAID 1 would be best here) but the throughput wouldn't be great - I wouldn't bet on more than 20MBps. Trying to add any more drives is just going to drop that performance even more.

I don't want to think how long rebuilding an array on a 700MHz ARM chip with a 4TB RAID 5 (the next obvious step up from 2TB RAID 1) would take. You would be at serious risk of encountering another fault during that rebuild and losing all your data.
Posts: 83
Joined: Sun Feb 05, 2012 11:41 am
by ElectroPulse » Thu Feb 23, 2012 9:32 pm
Ok, so not a very practical solution it sounds like... I was looking around for a DIY NAS project online, and they were talking about taking old computers and setting them up to do this. I don't leave my computer on all the time because of the power consumption (which is one reason that I am really excited about the RPi... I can leave it on without using much electricity), so I thought it might be a job for the RPi.

Alright, now to think up some more potential uses for it :) (and to save up some more for a real NAS, lol)
Posts: 52
Joined: Fri Jan 27, 2012 3:54 am
by abishur » Thu Feb 23, 2012 9:45 pm
This has been discussed quite a bit so I'm gonna close this thread to avoid duplication.

But before I do let me point you to the search feature on the front page of the site (at the top right corner of the page) it lets you do 3 letter search strings and is extremely good!  One thing the community had been discussing is a possibility of a distributed raid with one, possibly two drives attached to each r-pi.  Of course  you'd have to consider the trade offs of power the drives on a one by one basis instead of in a single enclosure... but I'd look around the site for that discussion.  If you were already going to have more than one pi, it's a very plausible solution.

Closing thread :-)
Dear forum: Play nice ;-)
User avatar
Forum Moderator
Forum Moderator
Posts: 4250
Joined: Thu Jul 28, 2011 4:10 am
Location: USA