Home Media/Backup/Web Server

I am considering building a small pc to live behind the tv (plenty of space) and act as a media server, recording and the like. I also thought it might be useful to have a couple of drives in there in raid 1 and use it for backups. I ALSO thought I might like to be able to host some small test websites.

It should be silent (living room)

Low Power

Remote Operable (I will be away at university next year)

I have always been a windows user but I imagine this will be best as a linux project so I think this will be the ideal time to learn! I see FreeNAS may be ideal for the backup and plex for media? Also a vitural machine for the websites?

I am unsure of the best way to achieve this (would a server in a different room be better somehow?) so any help is much appreciated!

Interesting thought, gonna follow to see what others say

Budget?

FreeNAS is an OS based on FreeBSD rather than GNU/Linux, and you won't get very far trying to hook it up to a TV. Other than that it fits the bill nicely, so really you might be best off getting a Raspberry Pi for the TV frontend. Then FreeNAS on the server hidden away in a closet somewhere will let you run Plex and a web server in jails (lighter weight higher performance than a VM).

The only other thing that might be tricky is how to do recording. What exactly are you hoping to be able to record? Over the air broadcasts? HD cable? Something else?

If you're wanting to record digital tv, either ATSC/ClearQAM or premium cable using your cable co's tuner card, consider the following:

As far as I can find, Plex doesn't directly do capture cards or tuners. You can set up mythtv in a jail though, and as long as you can find a supported capture card, it should work.

I suggest a USB capture device rather than PCI; otherwise, you would have to build a custom FreeNAS image that includes the necessary drivers. Either way, you will likely have to do some fiddling with the devfs rulesets and jail config to allow it to access the capture hardware.

A potentially better option than a PCI or USB tuner would be a network tuner box like the HD Homerun Prime (for digital cable) or HD Homerun Dual (for digital broadcast).

I was able to compile the mythtv port in a jail (wow a lot of dependencies there). Unfortunately, the prebuilt binary packages don't seem to be available anymore. These instructions are helpful nonetheless: http://mysticpete.blogspot.com.au/2014/03/create-media-server-hosting-freenas.html

I wouldn't mind writing up a tutorial if this is the direction you end up heading.

Some one else would have to guide you on software, but I would recommend something like this for a build.. I am going to assume that no one will be going back there to clean dust filters... But someone really should lol.

http://pcpartpicker.com/p/3GDkA

Something like this will get you going. It has an intel nic, HDMI out and plenty of processing power for 35 watts. the whole system is 154watts at max. All the components should work with any OS you could want to put on it too.

This site might help you decide on what you actually want, and how to get it:

http://www.smallnetbuilder.com/

Cheers.

I think dropping the SSD and doubling up on the RAM (opting for ECC too) would be a good idea. An 8GB stick of 1600 ECC is about $90. Two or four sticks would be even better, if the budget permits it.

My reasoning is that I don't see an advantage to putting an SSD in a server like this. Boot times don't matter because you boot it once and leave it running. Caching is faster in RAM, so an SSD cache drive only makes sense once you've filled all your memory slots. Unless you have a specific need for a small nonvolatile storage space that's faster than your spinning platters, the money would be better spent on RAM.

Thanks for all your responses!

Recording would just be SD broadcasts, anything other than that I stream - which would be a required feature too... Can a raspberry pie run all that without being too slow because the only experience I've had with a pie involved chrome crashing and having to be restarted! I can however see the benefit of just having the pi at the tv and the nas somewhere else (using a network tuner which I hadn't considered). 

Although would it be possible to run a media centre OS in a jail? Saves sending the tv signal to the server and then sending it back. 

The orginal idea was to replace the terrible media box we have at the moment which has a dual digital tv tuner (so recording and watching), playback of network films/music etc. and iPlayer - except it hardly does any of those things anymore as the company was bought out and support ended! So the media section wants to be seamless as my family will be using it and they are less tek savvy! 

As an extension to that idea I thought all the bulk media could be stored on the 'media box' and backups and so on... 

So I think the suggested PC build (-ssd +ram) with freenas and a few jails might work - is it possible to remote connect to freenas from the web or would a hamachi type service be the best choice? I'd want full access as in backups, file access, and settings. 

Sorry for being vague I'm just throwing ideas out there as I don't really know what's possible. I'll start playing arounnd with freenas after my exams. Thanks again.

if you are planning on mutiple operating systems i would suggest you look into Proxmox VE

FreeNAS uses a web interface, so as long as you forward the port on your router you can remotely control it just fine. For remote file access there are a few options I think, something like the owncloud plugin you could check out, or just forward ssh and use rsync or WinSCP or whatever. VPN would also be an option, and perhaps is the most flexible route, since you would be able to interact with the machine as if it was on your local network. Unfortunately it seems pretty difficult to set up on FreeNAS.

Media center in a jail: Well jails aren't actually VM's, more like a chroot in that it runs using the same kernel as the host and just has its own userland in a sense. So what this means is that any drivers have to be installed on the host. You would have to spin your own FreeNAS to get that, and the FreeBSD graphics drivers aren't very impressive anyway.

A Raspberry Pi could work pretty well as a frontend as long as you remember to get the codec licenses. But I haven't used one for streaming from the internet, just local stuff streaming from a file server. Basically you install some flavor of XBMC and see how much you can do with that. If you can't get what you need using XBMC, you might try again with a desktop distro. Chrome is probably not the best browser on a Pi, so try Firefox or Iceweasel or whatever alternatives your distro will give you. Still I'm not sure flash even works? I wish I had my rpi to play around with right now.

With a networked tuner box, you should be able to stream directly to XBMC for live viewing, or alternatively stream to the NAS for recording. Or both at the same time, with a dual tuner. I don't know what part of the world you are in so I can't say what specific tuner will work for you. If XBMC on the Pi won't stream from the tuner, you should be able to stream to a jail that transcodes on the fly so that the Pi can play it...

If a Pi just won't cut it as a frontend, there are definitely other options. The first idea that comes to mind is running Linux and then virtualize FreeNAS and a media center OS, but that's not ideal with the hardware because the i3 doesn't have VT-d for pci passthrough, not to mention that the build is in no way fanless as currently spec'd. Frankly I don't know what would make a better frontend off the top of my head, but I imagine finding something a bit beefier than the Raspberry Pi to use would be cheaper than the upgrades to make the whole NAS run cool and quiet while being able to double duty as a media center.

If you aren't going to run widows, then I would actually recommend getting a smaller SSD. One just large enough for the OS. The reason being that your media/storage drive will be used considerably less and this will prevent defragmentation and improve overall read and write times of the HDD. I am not sure how big freenas is, but I am guessing its a lot smaller than windows. Also, can you record media through freenas? You might need windows, linux or something like that to run recording programs and etc.

Either way, I would recommend a small and cheap SSD or HDD specifically as an OS drive to keep your storage drive for just storage. It cuts back on the use and increases the life of the drive. If you are doing heavy reading and writing to the drive on a fairly constant basis and the PC is behind the TV, it could get hot and the drive could die. I have killed 2 drives with torrenting heavily and gaming on the same drive. I have had no problems in years after getting a dedicated gaming drive and leaving one drive to just media storage.

FreeNAS fits on a USB flash drive. Hard to beat that for small and cheap.

I looked online for for the cheapest SSD, and you can get 32gb for about $40, or an adata 64gb for $45. At that point you could create a partition and dual boot windows and freenas.

Also the asrock server mini-itx board that Wendell reviewed is pretty amazing for this application, but the board is over $200. It has all the features desirable for this project too.

https://teksyndicate.com/videos/asrock-rack-e3c226d2i-mini-itx-server-motherboard-1150

 

But why would you dual boot a NAS?

I agree that board would be nice, in part because (as he mentions in the video) there is an internal USB port for the USB drive that you install FreeNAS to. :) But it's lacking in the video department, because it only has analog RGB out. That is fine if the OP decides to use a different device for the TV end, but pretty much rules it out if he chooses to task the box with front end duties as well.

The reason for dual booting is because he said wanted to record and stream video from the machine. I admit I don't know much about freenas, but I was under the impression that video recording software wasn't available for it. There is a lot of good software available for windows and of course streaming can be done on just about any OS with a browser.

http://www.engadget.com/2012/02/01/how-to-set-up-a-home-file-server-using-freenas/

here is a link where I got some information on freenas and their recommendations. Dual booting would be good for when he wants to record television or netflicks, and Freenas would be really good for when he is out and wants access for the storage.

If he wants just file access, then freenas is perfect, but if he wants to do all of these tasks, then perhaps windows or linux is better. He could even remote desktop in windows and linux to setup recording times for shows and playing media... The data access probably isn't as good as the freenas though.

But you wouldn't be able to save recordings to the hard drives because they are only usable by FreeNAS, not Windows. As I was explaining earlier in the thread, running MythTV is probably the best solution for recording. Wendell touches upon this concept in one of the NAS overview videos. He talks about Mythbuntu which is a spin of Ubuntu focused on running MythTV; I'm talking about running MythTV in a jail on FreeNAS.

The problem isn't really recording. flemish4 wants a simple interface his family can use for playback of recorded content as well as streaming online content. It's the streaming part that's a problem. A Raspberry Pi would be a perfect device for playback, but I'm not entirely confident in its ability to stream content from the internet, in particular sites that would normally rely on a flash based player. I don't have my Pi to test out workarounds that may exist.

A possibility would be to use a Linux based OS on the machine instead, and have it hooked up directly to the TV instead of through a Raspberry Pi. Then FreeNAS could run inside a VM, and the host or another VM could have a proper desktop with full fledged flash in a browser, mythtv frontend, xbmc, or whatever. That could potentially require very different hardware however. Ideally something with integrated graphics and an IOMMU, HDMI, tested iGPU passthrough with XEN, and a few separate SATA controllers that will do direct passthrough of drives. Plus taking noise into consideration it should be as quiet as possible. ECC compatibility is another important checkbox. In this case the build actually would benefit from a small SSD for the OS handling the front end.

Now at the end of this post I am wondering if you just misused the term "dual booting" and really mean what I was talking about. Dual booting you can only run one OS at a time. You boot one, or you boot the other. Virtualization allows you to run multiple OSs concurrently.

Oh by the way, I messed around a little with OpenVPN and actually got it working in a jail to where I can access my home network on my iPhone by connecting the VPN through the cellular network (so in essence from the internet). The process isn't totally refined, but it wasn't actually that terrible to set up, and it proves the concept is sound at least.

I did actually mean dual booting. I was thinking he would have it in windows when he wanted to use the machine as a media center, and then reboot into freenas when he wanted to use it as a NAS.

I think we are trying to solve the same problem in different ways. I am looking at using the machine as a windows media center, and then restarting it into freenas when you dont want to use the media center. This way he has all the ease and applications that windows supports. You are trying to make the nas always accessible and giving it the ability to be a media center. That is a much more difficult task .. lol for me at least. if you can make it work, then hats off to you. I hope the OP can do it. If it does all work smoothly, then it would be awesome.

Dual booting is going be hard to pull off remotely though, not to mention the dilemma of watching one show while recording something else, etc.

I spent about a minute on PC part picker and couldn't find half parts I was looking for. It's a shame because I really like the price tracking and comparison features. I'd like to put together a few alternative options with better virtualization capabilities, but until I'm feeling a bit more ambitious it's not going to be a task I'm up to. But hey the semester just ended for me so I've got a bit of free time. I might even get around to it later today.

If your pockets are a bit deeper, here's a decent start on a more solid rig for virtualization. It has room for upgrades in the future so you can throw in 4 more HDDs, 2 more sticks of RAM, swap the SSD for a much bigger one (and from a more reputable brand?), pop an LSI host bus adapter in... but I don't think you need any of that (maybe the RAM) so I didn't put it in.

http://pcpartpicker.com/p/3IOxc

I completely made up the price for the motherboard, and I don't know where you can even buy it. I just stumbled across it and maybe fell in love a little bit. I guess I can go back to the drawing board and try to be slightly more realistic next time...

Now, a parts list is nice, but I also want to give a quick rundown of the reasoning behind my component selection so that you can understand the pros and cons and in the end hopefully be better equipped to customize the build to fit your own wants/needs/budget.

I went with the WD Reds for an extra $20 over the Barracudas simply because I have a bit of experience with the Reds and none with the Barracudas. In addition, the Reds have a 3 year warranty whereas the Barracudas get only 1 year. On the other hand, the Barracudas spin faster (whee!).

Some other considerations I had:

  • It should have integrated graphics and HDMI output for hooking up to the TV.
  • ECC RAM is highly desirable for FreeNAS.
  • The more RAM the better, for both filesystem caching and for running VMs.
  • It shouldn't be bigger than necessary.
  • It should be quiet, if not silent.
  • It should be cool and efficient.
  • The system should have an IOMMU for PCI device passthrough to virtual machines. On Intel this means VT-d support.
  • ZFS and thereby FreeNAS wants to talk as directly to the disks as possible, so if FreeNAS is in a VM it should have a whole SATA controller passed through to it.
  • Because of that, there should be more than one SATA controller so that the host OS has something to work with, too.
  • And the host OS will also need some form of storage.
  • The machine should be remotely manageable, even when it's off. So, either IPMI or vPro.

VT-d and vPro and ECC narrow down the choices pretty well to limit my selection to a Xeon AFAIK. I went with the cheapest one that has integrated graphics, the E3-1225 V3. It should be plenty fast enough.

The RAM I selected is fast, good, and cheap. It meets the ECC requirements, and it is low voltage to help with efficiency. 16GB will be enough to run ZFS and a few VMs. More would be better, and 8GB sticks leave you the slots for expansion.

Now for motherboards that support the E3 V3 Xeon, ECC, and remote management; there is actually a pretty decent selection. Once you ask for an HDMI port, you have a much smaller menu to choose from. For no great reason, I decided I wanted to look for something that was also micro ATX. I found only one. If anyone is aware of an alternative motherboard meeting the above criteria, I would be delighted to hear about it. The ASRock C225 mWS is absolutely perfect in my eyes, save for the tiny little disadvantage of it not being sold anywhere as far as I could find. That also means I don't know if it's actually a $220 board or a $500 board or...?

After settling upon the micro ATX form factor, I tried to find a case that was not any bigger than that. I went for the Fractal Design Mini because it is the right size, and on top of that it comes with decent fans and is supposed to be a quiet case. Things like configurable drive bays, drive trays with isolation mounts, reputable manufacturer, and the unobtrusive design helped make up my mind.

When I was looking at the PCIe slots on the motherboard, I noticed that there was a blank space in the middle with some round standoffs. Then my eye spotted the M.2 connector, and I decided to look for the cheapest possible SSD to put in it. The rest is history. :)

I chose the power supply because it was one of the cheapest 5 star platinum PSUs without mail in rebates on PC part picker. I think that's pretty much it. More efficiency, check.

I think that's it! If I missed anything, need to explain anything differently, or am just a complete dunce for some reason, let me know!