A while ago, I was looking for an ‘easy’ and ‘inexpensive’ way to provide file sharing on my home network that would satisfy both WinTel and Macs whereupon a work colleague mentioned FreeNAS might fit the bill… so I jumped right in…

I had an older motherboard with 32GB of RAM on it with an AMD 6 core processor, so I thought, what the hay, I can use that and it will be cheap and easy (queue the Count’s laugh) not to mention the 2 by 2TB drives spinning in Wintel box and two more that were spinning in that old Linux box that was donating its memory and brains (see above), plus two more 2TB drives in a third confuser that I could re-purpose! Nirvana, 10TB of consolidated, RAID5 volume that everyone could use…Needless to say, things did not go quite as planned.

First up, I didn’t want to ‘waste’ 50% of my disk by mirroring, so I decided to go with RAID5 and only ‘lose’ one drive of capacity… well, this led to me realizing that the case my Linux box was in (the new FreeNAS server) could only accommodate 4 HDDs…for those of you who were keeping count at home, I had a total of 6 2TB drives, plus the existing 256gb “boot” drive… uh oh, I need a new case. Well, I can tell you that ended up being quite a search because I wanted one that would take my micro-ATX while being able to handle the (at least) 6 HDDs for my NAS. I finally found one that could handle 10 full size drives, plus 2 SSDs cleverly hidden in the front of the case… Ok, crap, not available on Amazon with free delivery in two days… off to NewEgg and a 7 day wait..

Perfecto! Now we’re cooking with gas! Not so fast David. Somehow in all of the machinations, I damaged a SATA connector on the motherboard… now only space for 5 drives to be hooked up (4 x 2TB and 1 x 256GB SSD). Ok, ‘only’ 5.5TB of usable space available with this config, I can live with that. Off I went and got everything configured. My PC was as happy as a clam, but for some reason the Macs kept hiccuping… Many share adds/deletes and changing of the mount points later, everything was working…nobody breathe on it. The interface wasn’t bad, but it could get confusing. Apparently creating a mount point on the pool and a SMB share doesn’t work for Macs, even though most Macs can ‘see’ SMB shares… I still don’t know why, but I had to create an Apple share as well… enough carping, it works.

After a few months, I got to thinking about the apocalypse scenario and I heard that you can have your FreeNAS backup automagically to an AWS S3 bucket in the version I was running. A couple of weekends of fumbling around, I finally figured out how to do that. Here’s the steps for posterity:

  • Create a user in AWS IAM (you do NOT want to have root user for this) and generate an access key for it. Make sure you download the secret key and stash it in a safe place!
  • Next, create a group in AWS IAM and enable S3-ReadWrite
  • If you don’t already have a bucket created in AWS S3, create one now
  • Now, bounce over to your FreeNAS dashboard and click on ‘System’ then ‘Cloud Credentials’
  • Add a Name for this credential that is meaningful to you (note, this has nothing to do with the IAM user name you created above).
  • Choose provider as ‘Amazon S3’
  • Next, cut and paste your access key and the secret access key that you downloaded in step 1.
  • Click save.
  • Now, head over to ‘Tasks’ on your FreeNAS dashboard and then click ‘Cloud Sync Tasks’ and ‘Add’
  • Add a task name that is meaningful to you (note, you can create discrete tasks for different directories/shares if you like).
  • For the ‘Credential’ choose your credential you created in FreeNAS
  • To backup your stuff to S3, choose the direction as ‘Push’
  • Choose the S3 bucket destination you want
  • For class of service, I choose Glacier as it is the cheapest and there’s not a criticality on restoration speed…remember, if you have RAID5 on your FreeNAS already, this is just to protect you from that apocalyptic event…but feel free to choose whatever you are willing to pay for.
  • Transfer mode as ‘Copy’ (remember, S3 is an object based store, so doesn’t update individual changes, it just replaces the object)
  • Choose whether you want it daily, weekly, monthly, etc. I choose daily as it is only going to sync changed/new files, so after the initial dump into S3 it typically only takes a few minutes to run each day (note, if you are on a restricted data plan, you might want to rethink this… I get only 500GB a month, and my initial uploads chewed up a good part of that)
  • Click save and you are good to go… in the morning, check your S3 bucket and see all your glorious backed up files 😀

This was cool! Everything is awesome, everything is available everywhere, my files are backed up in the cloud for me automagically, and then… well, I tried using Windows Media Server to serve up my 1.2 TB of movies and my 16k+ music library… uh ohs, that doesn’t seem to work as Media Server keeps puking trying to ingest my library from the mounted FreeNAS mapped drive…but wait, what’s this ‘Jail’ thing on FreeNAS. Oooh, shiny object, I can install MediaPlex to serve up all my content! Let’s give this a whirl…

After an afternoon of frustrated attempts trying to create a test jail and getting maddeningly unhelpful error messages, I found buried on a blog post that you can’t have jails on the same pool that has a share pointed at it… uh oh, ALL my drives were in one pool that was shared and the only way around that would be to blow away my whole server and start over. Sigh…and then, off to Amazon to buy an 8 port SATA controller and two cheapie 128GB drives to mirror for my ‘Jails.’ A few days later, I added the controller and drives, crossed my fingers, and Et Voila, two new drives show up in the dashboard. I create a new pool, add them as mirrored, and then swung back over to the ‘Jails’ and create a test one. Eureaka, it worked! So, now over to plugins and MediaPlex and answer a couple of questions and…well, I can see the free stuff but none of my stuff, but wait, I can add my libraries… except, the MediaPlex server is in ‘jail’ and it won’t be able to find my content.

More reading…oh, ok, I can create a mount point to my pool for the MediaPlex server. Piece of cake, except, you must first stop your jail instance… ok, that ended up not being too bad. I added mount points to my individual content types, fired up the MediaPlex instance and was able to add my content by creating individual pieces. Now for the Piece de Resistance! I scoot downstairs and fire up my Fire HD dongle, install MediaPlex and… no personal content. Damn! Oh, wait, let’s try signing in…so I click sign-in and…back up stairs with my ‘magic code’ and URL to link my Fire HD to my MediaPlex server… that seemed to work, so, back downstairs to TV and there’s all of my content.

If you’ve read this far, I salute you intrepid reader. I will now try and get to the point. Here are some things I wish I’d known before starting on my FreeNAS journey:

  • Plan from the beginning to have more than one pool so you can have jails as well as a giant share. If I was to start over I would create three pools from the get go: 1) a ‘jails’ pool, 2) a ‘share’ pool, and 3) a ‘snapshot’ pool.
  • Setup Cloud Sync from the get go.
  • Setup regular snapshots and sync these snapshots to S3.
  • Get an extra SATA controller from the beginning, even if you don’t need it right away–an 8 port controller was only $40 or so and it will save you time later.
  • Cheap SSDs for the jail & snapshot pools are the way to go, use regular spinning HDDs for your share pool as these are read heavy and with FreeNAS’ caching will be more performant than SSD in reads.
  • Find a case that will handle the maximum drive count and matches your budget and motherboard size. This is perhaps one of the more important things you’ll have to do.
  • Expect to spend some time researching everything–some technical knowledge is necessary and exposure (even as a hobbyist) to Linux/FreeBSD is exceedingly helpful as it is assumed you have a basic understanding of various things.
  • Jails are perhaps one of the most powerful features of FreeNAS, use them wisely grasshopper! The ability to mount your FreeNAS shares to the Jail means no more annoying copying of files and wasting space…share once and use all over.

Leave a Reply

Your email address will not be published. Required fields are marked *