Wednesday, April 23, 2014

DIY: NAS with unRaid and Plex!

Going with the regular theme of this blog, this NAS was made as cheap as possible. I wanted an NAS to house all of our media and distribute it to all the other devices in the network. The NAS had to be able to use Plex Media Server since some files may need to be transcoded. I re-purposed our old HTPC which was running Windows 7 and XBMC for the front-end. Below is the spec list for the old HTPC (2012):
  • AMD A4-3300 Llano 2.5GHz Socket FM1 65W Desktop APU - $64.99
  • ASRock A75M-ITX - $89.99
  • AMD Entertainment Edition 4GB 240-Pin DDR3 - $22.99
  • Seagate Barracuda Green 1.5 TB ST1500DL003 - $99.99
  • Seagate Barracuda 2TB STBD20001 - $99.99 x 2
  • Thermaltake Mini-ITX - $64.99
  • Total - $542.93
I paid about $550 for our old HTPC in 2012. We housed it near our TV for nearly two years and it would get annoying due to the noisy fans. I finally decided to make it into a NAS and hide it in the basement office. Rokus would be used thorough the house to playback the media. I didn't really have a budget but I knew I didn't want to spend too much. We also had our basement project going on at the time so that had full financial priority (besides getting things for the new baby of course). I ended up going a little overboard, but I am very pleased with how everything turned out. Here is the upgraded parts list:
I went with the PC-Q25 not just for looks, but also because of the easy access to the drive bays. Real easy to remove a drive if one fails or add a drive to expand storage. The SSD is for the cache drive (more on that later), and finally a small UPS to shut the server down in case of a power outage.

Next step was to actually install unRaid. unRaid is installed into the USB and the server will boot off the USB. All you have to do is go to, navigate to downloads, and download the latest version. As of 4/23/2014,  the latest version is Head over here to find out how to install unRaid unto your USB drive depending on which OS you are currently running. 

Before you boot into the USB, lets go ahead and install some plugins to make unRaid even more awesome. Head on over to the unRaid 5 Plugin wiki to get some additional plugins. We'll be using Apcusd which works with most APC UPS to shutdown your NAS due to power failure, Dynamix webgui which adds nice features and cleans up the GUI, and of course Plex Media Server to organize and serve up your media. 

Download (Save link as) the following plugins into your /flashdrive/plugins folder (create if needed):
Download the Plex Media Server into your /flashdrive/extra folder (create if needed):
Once installed, the plugins should automatically install every boot up and you shouldn't have any issue. Boot up your NAS with the USB installed and make sure you change the BIOS to boot off of the unRaid USB. I installed my license since I will be using a cache drive. You don't have to, but I hooked up a monitor to the NAS during this phase just to make sure everything boot up correctly. Make sure you have the NAS hooked up to your network. Now, lets try and boot into it!

Go into your preferred browser and type in /tower/. If everything boots up right you should have just booted into your NAS! If not, you may need to hook a monitor up to the NAS and figure out if it is an IP address issue or hardware related. You should be greeted by something that looks like this:

It is always good to use the preclear script on your HDDs before you use them for storage! Head over to the preclear post and find out how to use it!

Go to Settings>Share settings then enable user shares. Do the same thing for the cache disk if you will be using one. Go ahead and setup your drives in the Main menu. I used the SSD for the cache drive. My Apps share will use the cache drive to mainly store Plex information and not constantly spin the drives when not necessary.

Now, turn your array on by going to Main>Array Operation. Once it's on, we're going to add shares for each of our media types. Head over to Shares and click "Add Share". The shares I added were:
  • TV Shows
  • Movies
  • Photos
  • Music
  • Apps ( make sure to check "Use cache disk only")
When you made the shares, you're basically making logical folders. unRaid will "combine" all you HDDs so it makes it seem like it is one big HDD. I made sure to use a parity drive just in case one drive fails. If two drives fail, I'm SOL. It is important to use the preclear script to rule out possible bad HDDs.

Now its time to make sure our Plex Media Server is running and Apcusd plugin is good. Head over to the Settings page. You should see these two icons:

If your APC UPS is hooked up to your NAS via USB, you should be able to enable APC UPS and see the battery status. I left all the settings default.

Before going into the Plex Media Server settings, go into the settings.ini file located in the \\TOWER\flash\config\plugins\plexmediaserver folder. Change the following settings:
  • PLEX_MEDIA_SERVER_TMPDIR="/mnt/user/Apps/Plex/temp"
The Plex information will be stored on the SSD cache drive since we told unRaid the /Apps/ folder is cache only earlier. In case of a reboot, Plex won't have to find all the meta data again. After that, go ahead and enable Plex Media Server in the Settings page. Head over to http://tower:32400/web/ and setup your Plex Media Server to the media shares you created earlier. Hope this helped you out! We've been using this setup for about a month now and it's been working great streaming to multiple Rokus in the house through wifi.

DIY: Finished Basement

We purchased our 3 bedroom home in November 2012 with an unfinished basement. We ended up using the basement for storage during the next year. When we found out my wife was pregnant, we knew we needed some more space. The third bedroom housed the office and took up the entire room. All the stuff would be moved downstairs, into the basement. One problem: our basement is unfinished. After receiving estimates of ~$20,000 to finish the ~600sqft basement, my wife and I decided to take the task ourselves for much less hopefully. My wife is pregnant, and we already have twin boys, so in reality, it was a one man job for all the heavy work :) We were in no rush to complete the project, as long as we had enough time to furnish the baby's room before her birth. The basement finishing project started November 2013. We didn't have any tools so we factored the price of tools into the overall budget. We did not want to spend more than $9,000 on the entire project because after that point, we might as well have hired it out. The basement was finished with all necessary permits and inspections required in Anne Arundel count, Maryland.

Future kid's play area
Future kid's play area
Future office with storage area

We ripped out all the old insulation. In hindsight, we could have left it on, which would have saved us $300. Oh well, it was old and nasty anyway. We left the old insulation inside the storage/electrical room and the mechanical room. We started framing using regular 2x4s for the studs and 2x4 PT wood for the sole plate.

Office storage area
Office Storage area
Framing work in progress
Framing work in progress

We cut that door to create an open entryway. Bought a sawzall from Lowe's which made that job super easy.
No electricity so I used a flashlight whenever I needed light.
Finally cut the door down! It was the middle of winter so our electricity bill went through the roof until we installed insulation.

Did I mention the basement was former storage area?
We have two storage areas: underneath the stairs and in the office. The office storage area also contains the electrical panel and water main.

We started framing in November 2013, and the framing and insulation inspection passed in January 2014. Also, I finally got to encasing the red pole in 2x4, something my wife absolutely required. We used Roxul and fire foam for fire blocking. We used up the rest of the Roxul insulation as regular insulation so it didn't go to waste. We also added a cold air return at the bottom of the basement to keep the air moving. Red pole finally framed out. I didn't realize adding the wall around the pole would require another outlet. Our electrician was nice enough to add it in after we had another recessed light added.

Yay! No more $350 electrical bill!
I ended up cutting a hole in the ceiling of the basement/floor of the dining room in order to move the drywall into the basement. Nothing the circular saw couldn't handle. Luckily my brother lent a hand and helped me move the 4x8 pieces of drywall. We ended up putting the old plywood back in with 2x4s supporting it.

We needed 45 pieces, but I bought 55 just in case. As we were finishing up screwing the drywall in, we came to the conclusion that we were about 5 short. Luckily, we had just enough complete pieces in the basement to finish the wall. The other pieces for the soffit and small parts of the wall I had to measure, go to the garage and cut, then bring back down. This probably added a few days of work, especially since I was already working at a snails pace.

I absolutely hate mudding now. Due to my regular job and the time it takes to mud, there were multiple times I thought of just putting the drywall knife down, and hiring someone to finish the drywall. I actually had a company come and give me a quote! But in the end, after numerous coats and sanding, we moved onto priming and painting! 

We finished mudding early March 2014. My wife did all the priming and painting work over the span of a week. I was pretty hesitant about her painting considering she was almost 6 months pregnant, but she insisted and it turned out great! The drywall turned out much better than we expected as you'll see in the finished pictures. Glad we continued on and finished mudding ourselves. Saved us $700.

The baseboards were installed before the carpet. It was surprisingly easier than I thought it would be. Thanks to a cheap $80 miter saw from Harbour Freight, it took me 2 days to cut and caulk the baseboards. My wife painted it the day before the carpet was installed. While away for work, we had carpet installers come by and lay some carpet down! There is 8lb padding with built in moisture barrier underneath. Total came to about $1600 for ~500sqft.
Feet and Fresh Carpet!
Entryway into basement. Entire stairway needs to be primed and repainted.
Got all the doors installed. It took me a day to install two 30" doors and one 48" double door. The double door and a 30" had to be cut down to about 72". All the doors are slightly out of plumb. All the doors close fine but one corner of the door sticks out. Oh well.

The window got replaced and finished out. The same door trim was used for the window.

I already spent money on buying the network stuff for the basement so I decided to just mount the equipment inside the office storage room. This just makes sense since the Fios ONT is right there. Also, there is a CAT5 telephone line which goes to the kitchen. I ended up replacing the RJ11 port to a RJ45 for the WAP in the kitchen. Service is being provided from the ONT data port to the router. The router is connected to the Ubiquiti UniFi AP and GigE switch. The switch is connected to all the ports in the basement. Overall, networking cost ~$300. This includes 500ft of Cat6, jacks, router, switch, AP, etc.

Here is the office. Everything is slowly going into it's place. Hope to upgrade this area in the next year or so.

Custom built itx gaming PC and unRaid NAS.

With a 10% coupon, I got this Vizio E550I-B2 55in for about $650. This will get mounted about a foot or so higher so the kiddos don't try and hit it.

Videosecu Wallmount (Amazon). 2014 Roku HDMI stick to keep with the wall mount theme.

Finished product with kid's mess! The only thing left we have to do is add some crown moulding to go with the baseboard, and that will complete our basement project! We don't no how much value it added to the home, but the space is invaluable to our growing family. Thank you for reading and hope we can help other people tackle their finished basement project!