Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: File and/or media server

Thu Sep 01, 2011 4:21 am

Quote from patrickhwood on September 1, 2011, 00:33
And back to the original idea -- what about a local NAS to cloud server? Something that talks to box.net storage or amazon S3 and shares that locally over samba?

Heh... It's doable, as is making a small NAS cluster that handles RAID-Z coupled with transaction driven replication with transparent failover.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: File and/or media server

Thu Sep 01, 2011 4:26 am

Quote from Blars on September 1, 2011, 02:09
A good software raid system will let you do tricks like mirroring two 2gig drives to a 4gig drive, migrate partitions between disks on a running system, etc. Just add a new bigger disk, migrate some partitions around, and grow the filesystems. I never found a hardware raid system anywhere near as versital as raid on top of LVM. (as opposed to LVM on top of raid, which some people seem to prefer.)

The real problem lies in that there's very, very few "good" software RAID systems. You know I mentioned that half mil cluster rack that was deader than a doornail earlier from a slight variance in geometries...that wasn't with a hardware RAID controller- they used Linux software RAID and automated scripts.

RAID does NOT do what most people think it does and Software RAID is actually prone to a whole host of other pinch-point failures under peak loads that most people just don't contemplate until they get bit by them. It's a neat idea to play with...if you're a techie and have time to kill when it packs it up on you (and it will do that...).

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: File and/or media server

Thu Sep 01, 2011 4:47 am

Svartalf: At what point will a RasPI drive a USB HDD hard enough to reach a pinch point under software RAID? When I backup my wifes computer? When I stream media to my LCD TV?
I think it will be a different equation than an enterprise level RAID array.
LOL.
That is going to be one BAD RasPI. That one might actually heat my Lava Lamp case without the lightbulb. LMAO Sorry I had to do it the BAD RasPI told me too!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

pieter
Posts: 34
Joined: Mon Aug 22, 2011 7:12 am
Contact: Website

Re: File and/or media server

Thu Sep 01, 2011 12:09 pm

For those wanting to use Raid-5 read this.

In short: when building a raid5 system with 2Tb drives, chances are that when one disk fails the raid5 system can't be completely restored.

obarthelemy
Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: File and/or media server

Thu Sep 01, 2011 12:22 pm

Honestly, people wanting to do RAID on a RPi for anything but funsies should read this:

Buy a $50 Atom board with SATA and PCI-E....

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: File and/or media server

Thu Sep 01, 2011 12:37 pm

Quote from Lob0426 on September 1, 2011, 05:47
Svartalf: At what point will a RasPI drive a USB HDD hard enough to reach a pinch point under software RAID? When I backup my wifes computer? When I stream media to my LCD TV?


Software RAID means that it uses the disk I/O subsystem to first write to the first and then the following drives in order. If you have a kernel panic or a high system I/O load, you may get a failure to maintain coherency on your writes. A hardware RAID controller is a co-processor to accomplish the same thing and will do so without concerns about the OS delaying writes to the disks.

And this doesn't get into the issues of doing a RAID5 configuration with a 2Tb disk- because the article linked is telling the truth.

As the joke cartoon points out...unless you're doing this for giggles and the Wrong it entails, you're not going to be...heh...disappointed, as it will fail you at an inopportune time.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: File and/or media server

Thu Sep 01, 2011 1:19 pm

Then we'll do Raid-Z (or even RAID-Z2) and avoid the pitfalls of RAID 5
Dear forum: Play nice ;-)

DanielSilva
Posts: 71
Joined: Sun Aug 28, 2011 7:07 pm

Re: File and/or media server

Thu Sep 01, 2011 1:24 pm

Two raspis with 2 2TB drives each, put zfs/raid-z on them, do regular snapshots ( they're pretty quick and don't steal much space ) and make one of the raspis as a replication target for the other.
You won't get much better than this even with low to mid commercial solutions that target home and soho markets. Unless you have _major_ failure on both systems your files will be pretty safe.

Thats 8TB of pretty safe data for < 400€.

Bloodred
Posts: 26
Joined: Wed Aug 17, 2011 12:22 am

Re: File and/or media server

Thu Sep 01, 2011 7:05 pm

I personally won't bother with RAID on my future RasPi NAS. It'll just be filled with replaceable media, all my important stuff resides on 2 different computers and 2 flash drives (and it will reside on the RasPi NAS as well), I don't think 5 completely different devices will fail on me at the same time.

It's only purpose will be to make my files/media accessible from any device at any time.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: File and/or media server

Sat Sep 03, 2011 3:54 am

And that is why I asked at what point will the RasPi become pinch point. If you use a USB two drive enclosure that is RAID capable it has a processor in it to handle the drives already. D-Link makes a relatively inexpensive NAS that is Ethernet. And I assume since it can handle RAID 0 or 1 that it has a processor not software. Connected to the RasPi through either USB or Ethernet it should work just fine for your "average" user. I would not bother to use the RAID on it anyway. And if I did it would be to mirror it.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

__Miguel_
Posts: 59
Joined: Tue Sep 06, 2011 2:49 pm

Re: File and/or media server

Tue Sep 06, 2011 4:53 pm

Hi there, guys.

I'm new here, just found out about RasPi. I'm not a developer, but as a general geek and "light" DIY modder, this is actually something that crossed my mind (along many other things... I can actually see myself building a few of these at home, ranging from a simple HTPC to a POS for my brother's gym), especially since I'm very much into NAS.

Please let me chime in on a couple of things I've learned over the years. I won't touch the whole "RAID is not for backup" issue, it has been discussed already, but there are a few bits of information you might find interesting.

First up, and from what I've read so far, as for NAS devices go, just about every embedded CPU available over the last few years can handle a 10/100 Ethernet connection just fine, and max it out. Most of them can also read and write to an HDD at about the same speed (which is pretty much all you can expect to get from a RasPi, since even 450Mbps WiFi doesn't usually get much higher than Ethernet when you start moving away). In short, a Raspi should be just fine for a NAS, 30MBps total throughput seems very doable even if every interface is running over USB.

Next, someone asked about RAID5 and USB. Well, I have seen SATA/USB controllers that claim RAID capabilities (not sure if they are software RAID, though, which would probably cripple the Raspi HDD performance tremendly). They are so-called "smart" Port Multipliers. Please take a look at the Addonics AD4SR5HPMUS: USB or SATA uplink, 4xSATA HDD connections, several choices of RAID available.

Now, if what you really want is data redundancy without fussing with RAID, a.k.a. Drive Extender style, you can actually have that in Linux. Look up Greyhole, which was created to be a Linux Drive Extender. The Amahi NAS distro already incorporates it, and AFAIK is freely available and is built on top of Samba, so it should be a breeze to make available on a RasPi device, right?

Btw, I'm not a Linux guy. I've tried it, more than once, actually, but I've always fallen back to Windows (too many years being a Windows power user, I guess...), I just can't seem to get Linux to work the way I want it to, like I do with Windows (I know what you're thinking, but I'm not even remotely inclined to programming/math in general, and too many terminal commands make my head spin).

Anyway, one last thing... Am I the only one thinking with a Model B, some extra circuitry, an HDD and an enclosure, one could make a cheaper plug-able computer, WITH storage included? Or a much cheaper "just-add-your-own-HDD" version? I mean, it could even be powered directly from the socket...

Cheers.

Miguel

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: File and/or media server

Thu Sep 08, 2011 1:53 am

Nope __Miguel_ your not the first to wonder about a pluggable RasPi. But you could be one of the first to do it.

Thats what is nice about the RasPi it has a lot of avenues that can be explored!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

__Miguel_
Posts: 59
Joined: Tue Sep 06, 2011 2:49 pm

Re: File and/or media server

Thu Sep 08, 2011 6:49 am

Thanks for the reply, Lob0426.

Sadly, though, I utterly lack the engineering, electronics, plastics and Linux customization abilities to do it :( I'm a geek, yes, but I majored in Law, not computer science. building computers and a bit of DIY modding I can do (I've fit a mini-ITX computer in a 18x18x18cm transparent cube), but that's about it.

However, I do have a couple of ideas, and a designer friend I think I might convince to help out, if someone else has the rest of the abilities... hehe

Cheers.

Miguel

z0mb13e
Posts: 14
Joined: Fri Sep 02, 2011 10:45 am

Re: File and/or media server

Thu Sep 08, 2011 9:59 am

Abishur, have you looked at the Drobo? This is a DAS that would allow you to plug in drives in any configuration and it takes care of the allocation of space and redundancy. It aint cheap. I don't think any drive enclosure worth it's salt is going to be cheap. I would avoid the cheap ones as has been said before, if the enclosure goes south, then unless you can get another one, so does your data.

You mentioned your objection to a linux software raid being the difficulty of rebuilding the array should something go a bit wrong. I haven't tried moving a linux software raid built on USB from one machine to another but I have with a sata array and as long as the meta data for the array is intact, running mdadm --assemble should be enough to reassemble the array for mounting.

I've found the best strategy (for me on my home nas for cost, capacity benifit) is to run 3 disks in raid 5 with another bay to hold a single disk as big or as near as damn it, as the array and run a scripted copy of the raid data to that single disk. The array gives me large capacity with redundancy and the single disk gives me a straight backup that can lag the array by whatever delay makes sense to you (my nas is used infrequently so backup lags by a week) to help avoid data corruption. Also should a disk in the array go south then I can pull the backup disk and pop in a spare and rebuild the array and then work on the failed disk or replace it...

As for the r-pi I will be looking at ripping the guts out of some cheap 2.5" external usb enclosures and putting them into a sweet little case to make a micro nas/server simmilar to my current atom based nas/server (based on this 4 bay 3.5" nas case http://linitx.com/product/12789), but using 2.5" sata disks instead. It should beat my 15w Atom NAS hands down on power consumption.

z0mb13e
Posts: 14
Joined: Fri Sep 02, 2011 10:45 am

Re: File and/or media server

Thu Sep 08, 2011 11:00 am

I thought I would have a look around for 2.5" enclosures (I'm not looking for built in raid, I want it presented as just a bunch of disks) and found this http://www.integral-storage.co.....-enclosure - no idea if anyone is selling them but looks nice... I wonder if there is room for a r-pi in there?

Update: £150 from Misco so a bit pricey, but it looks like you could probably squeeze a r-pi in there!

nrdb
Posts: 13
Joined: Fri Jul 29, 2011 5:35 am

Re: File and/or media server

Fri Sep 09, 2011 7:55 pm

Quote from Lob0426 on August 21, 2011, 20:17
abishur that was the beauty of the original WHS. It used drive extender technology to mount new drives into the DATA drive. It did not care if the drive was SATA, USB or IDE. It used them all in conjunction to create the DATA drive. ........ I would like to see Linux develop something similar to drive extender. Pop in a new drive answer one question, whether you want to extend the data drive or not, and its there.
The Linux Volume Manager (LVM) can do that. Not with just one click but it can take multiple drives and treat them as one logical drive.

Can you software RAID through a USB hub? two RasPi's one to handle the array and one to handle the web interface? Though relatively expensive 2.5" drives could be powered from a powered USB hub, possibly the RasPi also, and all of it put into a project box.
If you use AoE you could
1) Network both Rpi together.
2) attach 1 USB drive to each Rpi.
3) using AoE mount Rpi(1) drive on Rpi(2)
4) raid the two drive on Rpi(2)
Dont know about load on the seperate Rpi though.

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: File and/or media server

Fri Sep 09, 2011 10:46 pm

Quote from z0mb13e on September 8, 2011, 10:59
You mentioned your objection to a linux software raid being the difficulty of rebuilding the array should something go a bit wrong. I haven't tried moving a linux software raid built on USB from one machine to another but I have with a sata array and as long as the meta data for the array is intact, running mdadm --assemble should be enough to reassemble the array for mounting.


So long as you're doing RAID5 and you have two out of the three in the array still mostly or totally intact- so long as the metadata's still good on the disks.

RAID1...well, you've got some fun ahead of you trying to determine which is right and which is not depending on how intact the array really is. If it's intact, it SHOULD just assemble at start because you've got the volumes tagged as RAID volumes and mdadm will figure out how to assemble them from the metadata on the end of the partitions. If the metadata's boggled, you're hosed. If the metadata's not in lock-step with what is actually on the disk, you're hosed.

As an aside, I know quite a bit more than is probably healthy about Linux' software RAID due to my stint at Tektronix. One of the things you really, really don't want to do is do it over USB except as a tinkering experiment. Not stable. Not robust like many will think of it. One of the reasons for this is that you're not going through just the disk subsystem like you do with SATA/SAS drives- you're also going through the USB subsystem- which means you've got an added layer in there that can manage to at least occasionally get the sequencing of write operations out of whack from what the RAID drivers expect. Guess what we only have available to us unless you're doing an external RAID box that exposes USB as one of it's connection means... Once you get the writes out of sequence...well, you might have a RAID array, you might not, depending on whether it was the data area or the crucial metadata one and whether you had a power/hardware failure at the "wrong" time with things. In the case of Tek, the vibration of the ATCA cages was causing soft-write failures which could boggle sequencing- amongst other things.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: File and/or media server

Sun Sep 11, 2011 12:16 am

Thanks nrdb I will look into that.

OT:__Miguel_: being a major in Law will not stop you from trying to make it pluggable. (I am a Correctional Officer aka: prison guard) The very basic idea is to mate a power adapter with a RasPi. Get a wall wart that is between 6 and 20 volts at a garage sale. Open it up and see what is in there. You can get a proper sized barrel connector at somewhere like radio shack if you do not want to solder directly to the RasPi. You will have to solder the wire to the connector. Find something for a case that fits both the RasPi and the power parts. Place some shielding between them and it is pluggable. All of the information you need to design the project is available on the internet. You just have to be willing to look for and to try it.

There is always a place to start, but you have to start to finish.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

__Miguel_
Posts: 59
Joined: Tue Sep 06, 2011 2:49 pm

Re: File and/or media server

Sun Sep 11, 2011 7:39 am

Kind words, Lob0426. Very kind words indeed.. Thank you.

Miguel

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: File and/or media server

Sun Sep 11, 2011 4:24 pm

Svartalf: what would the prospect be of using several individual RasPii, each with a USB HDD, building an array, then the RasPi become controllers? Then use another RasPi to act as a master for the others? Which would be better a USB interface or use a 10/100 switch?

Let's try to look at what we have to work with in the RasPi, and move into a workable plan of action. There really does have to be a solution here. We may have to go way outside the boxes to get to it.

We have two storage solutions SD and USB. We have another possible storage solution Ethernet. The USB and Ethernet share bandwidth. The SD is dedicated. Another possible option is to reduce the OS as small as possible and use the left over memory in a RAM drive configuration. Dynamically update the RAM drive from say the USB (HDD?) use the Ethernet and a switch to handle communication. Hopefully the RAM drive updates, and the Ethernet will be out of sync and interfere little with each other. And of course you could possibly use the SD card in the same manner as a RAM drive, though you know my feelings on relying on an Flash memory, it may just work.

What are everyone's thoughts on these possibilities?
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: File and/or media server

Sun Sep 11, 2011 8:20 pm

ooo, I like the sounds of AoE. I'd want my r-pis attached to an independent gigabit switch so as not to gum up the rest of the network (which for me is only 10/100 Mb) but with one drive (maybe even two) to an r-pi that would keep the usb hub (which includes the ethernet adapter) from becoming too bogged down from all the drives being attached to it. Sounds like there's several worthwhile options for us to play with!
Dear forum: Play nice ;-)

z0mb13e
Posts: 14
Joined: Fri Sep 02, 2011 10:45 am

Re: File and/or media server

Mon Sep 12, 2011 9:58 am

Quote from Svartalf on September 9, 2011, 23:46RAID1...well, you've got some fun ahead of you trying to determine which is right and which is not depending on how intact the array really is. If it's intact, it SHOULD just assemble at start because you've got the volumes tagged as RAID volumes and mdadm will figure out how to assemble them from the metadata on the end of the partitions. If the metadata's boggled, you're hosed. If the metadata's not in lock-step with what is actually on the disk, you're hosed.

Granted there are all sorts of things that could go wrong. My general experience with RAID1 is that when things go wrong, you usually still have a working disk to rebuild the array from. If something has gone really wrong and you don't know which disk is good or bad then that is another issue and backups come into play.

Quote from Svartalf on September 9, 2011, 23:46As an aside, I know quite a bit more than is probably healthy about Linux' software RAID due to my stint at Tektronix. One of the things you really, really don't want to do is do it over USB except as a tinkering experiment. Not stable. Not robust like many will think of it. One of the reasons for this is that you're not going through just the disk subsystem like you do with SATA/SAS drives- you're also going through the USB subsystem- which means you've got an added layer in there that can manage to at least occasionally get the sequencing of write operations out of whack from what the RAID drivers expect. Guess what we only have available to us unless you're doing an external RAID box that exposes USB as one of it's connection means... Once you get the writes out of sequence...well, you might have a RAID array, you might not, depending on whether it was the data area or the crucial metadata one and whether you had a power/hardware failure at the "wrong" time with things. In the case of Tek, the vibration of the ATCA cages was causing soft-write failures which could boggle sequencing- amongst other things.


As the r-pi is intended for tinkering/education, the idea of using it as a NAS via USB is exactly that, an experiment in tinkering! I will admit the idea of using USB for disks in a RAID doesn't feel great, as you say the extra layers of hardware and software does raise the "here be dragons" alarm. But without SATA, USB is the obvious path and I will still want to try it out of curiosity...

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: File and/or media server

Mon Sep 12, 2011 3:45 pm

Quote from Lob0426 on September 11, 2011, 17:24
Svartalf: what would the prospect be of using several individual RasPii, each with a USB HDD, building an array, then the RasPi become controllers? Then use another RasPi to act as a master for the others? Which would be better a USB interface or use a 10/100 switch?

Heh... It's got some promise, though I'd shy away from using DRBD or the NBD device tricks for pulling it together. Closest stable thing would be to put Glusterfs on all the R-Pi's (once you manage to get it to compile and run right on ARM- something someone's not put TOO much effort into doing yet...) and put it into a striped/mirrored configuration with something robust for the backing store. The limitation's going to be the USB Ethernet at that point but you'll have something if you're not striping that you can maybe guess out what's the good set (In most cases, the Gluster setup will precisely know which is the right one is the right file, even if it's split between the two volumes because of write behaviors because the metadata's distributed as are the files and it's all transactional...)


Let's try to look at what we have to work with in the RasPi, and move into a workable plan of action. There really does have to be a solution here. We may have to go way outside the boxes to get to it.


Indeed. It's why I was trying to get people to realise that RAID's the box here and you're going to be forced to think well outside of it to accomplish the desired thing- and it's a bit of a computer science type discussion at the same time... ;)

Svartalf
Posts: 596
Joined: Fri Jul 29, 2011 6:50 pm

Re: File and/or media server

Mon Sep 12, 2011 3:52 pm

Quote from z0mb13e on September 12, 2011, 10:58
Granted there are all sorts of things that could go wrong. My general experience with RAID1 is that when things go wrong, you usually still have a working disk to rebuild the array from. If something has gone really wrong and you don't know which disk is good or bad then that is another issue and backups come into play.


My general experience with RAID1, is that you want hardware over software, esp. in the context of the situation w/the R-Pi. Past that, it's as I said...you've written the same thing out to both disks. Upon read of the same block on the disks in question, you get differing results- which is the right one? If you can't tell me that answer 100% of the time, it's not terribly usable as a solution for uptime. ;) RAID5 gives you that answer so long as you don't lose more than one disk, at the penalty of write performance and overall transactional performance when you lose a drive- which will be...heh...evil on a USB drive array.


As the r-pi is intended for tinkering/education, the idea of using it as a NAS via USB is exactly that, an experiment in tinkering! I will admit the idea of using USB for disks in a RAID doesn't feel great, as you say the extra layers of hardware and software does raise the "here be dragons" alarm. But without SATA, USB is the obvious path and I will still want to try it out of curiosity...

Heh... Don't take my nattering on the subject to tell everyone to not play with this stuff- it's a valid CompSci line of study. But, in the same vein, it's really a "here be dragons" space like you're describing it- it really, really doesn't work like most think it does and it never really was intended to be used for what most people have ended up going and using it all for. :D

It's not a redundancy solution for a home media server.

guyh
Posts: 8
Joined: Sun Nov 20, 2011 3:12 pm

Re: File and/or media server

Sun Nov 20, 2011 9:08 pm

so has anyone tried this out on one of the alpha boards? i've been looking into doing something like this with a router and dd-wrt/openwrt but I remembered these little chaps were due to come out soon and it would be perfect if achievable! also saw a couple of things about hd codec trouble in another thread, any advance on that at all?

Return to “Other projects”