[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Sat, 14 May 2016, Richard Brown wrote:
Hi AllI want to set up and run a Raspberry Pi as a media server but I would like to raid the server as well. The idea is to run a Pi with a drive attached and then a second drive copy everything that happens on the first one. To give it all a bit more power I would like to connect the two together as one.Is this possible please? Is there a better way to do this please? Any ideas please? What do others do please?
Yes! It's very possible. I have dozens of Pi's now doing all sorts of stuff.Here is what I do: I use small Atom systems with SATA drives and Gb Ethernet to act as fileservers for my SOHO LAN.
So the Pi is a small Linux system and as such it can do anything any other Linux system can do - within reason.... The main issue with the Pi is that there is only one USB interface - that's shared with the Ethernet, keyboard, USB drives, Wi-Fi, etc. (Although the Pi 3 has independent Wi-Fi if you want to use that)
So what this means is that it's a BIG I/O bottleneck. So while you can can do it, you can even run RAID-6 over it to a raft of USB drives, but is it sensible? It depends. Performance will be mediocre at best, however it should work.
Connecting the 2 Pi's together as one... That doesn't work unless you write custom code to use two independant computers, although there are distributed filesystems (and network replication systems) that you may want to dabble with.
Also, for performance, using a single drive is best, but then you have to rely on your own stratgey of copying to a 2nd drive - better to use 2 identical drives and mirror them using Linux software RAID. Write performance will be poor, but read will be the same.
Other things to consider - streaming over Ethernet means the system reads the data over the USB from the drive, then writes it back out over the same USB to the Ethernet. Also note than USB is half duplex. All these afftect performance, however I do know of people doing just that to stream media to HDTVs and so on.
(And its something I'm looking at, although using a Pi3 to connect to the home Wi-Fi then plug its Ethernet directly into my TVs Ethernet interface - I got a new TV recently with all the media shenanigans connected to it but I don't have wired Ethernet in the living room - My plan is to never allow the TV direct internet access, but to use the Pi as a buffer - copy media to the Pi - internal SD card, then serve it to the TV from the Pi - or just connect the Pi's HDMI output to one of the TVs HDMI connectors - it's a full HD TV, so why not)
Lots of fun to be had, just be aware what you're doing. Gordon -- The Mailing List for the Devon & Cornwall LUG https://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/listfaq