So we have our FreeNAS box up and running, connected to the network and accessible via the web-based interface. One of the first configurations I made was setting a static IP address for my NAS box. I did this from the console (via option 2), but you can also do this via the web interface under Network->LAN. Have your network’s gateway IP address handy. If you use a router you bought at a retail store (LinkSys, NetGear, etc.), it most likely will be 192.168.1.1.
At this point, I went headless with my NAS. I won’t need a monitor connected anymore because I won’t need console access for the remainder of configuration and operation. I tucked my NAS box in my entertainment center in my bedroom.
Configure the Array
Next I added the disks and built the RAID array. Like I mentioned in an earlier post, I decided to use FreeNAS’ software RAID rather than the RAID controller on my motherboard. The first step is to add your disks. You do this from the Disks->Management menu in the FreeNAS web interface. Again, the documentation on FreeNAS.org is sufficient to step through this process.
When adding my disks, I chose to set the “Hard disk standby time” to 60 minutes. I’m using my NAS as a raw storage device (backup and archive) rather than an active working device, so allowing the disks to spin down after 60 minutes of inactivity will save power and keep the drives cool. I also set the “Advanced Power Management” option to “Level 1 – Minimum power usage with Standby (spindown).” Again, to keep power consumption low and the drives cool. I activated the S.M.A.R.T. monitoring on all of my drives so I could use the reporting features and monitor the temperature of the drives.
Because of the case I chose to stuff my NAS into, as you can tell, I’m most worried about heat. Typically NAS cases are small towers with stacked drives with efficient airflow from front to back. There are also minimal components inside, so there’s not a lot of additional heat created. My case—as you saw from prior posts—is a media center case with the guts of a full computer. Keeping a hard drive cool can extend the life of the drive, so to help me monitor this, I setup the S.M.A.R.T. reporting features under Disks->Management S.M.A.R.T. tab. I set the “Difference” value to 5°C and the “Critical” value to 36°C. This means if a single drive’s temperature rises 5° or more since the last polling (which I set to 5 minutes) or if any of the drives reach 36°C, I will receive an email notification. Be sure to click the checkbox to activate the email report and set the destination email address at the bottom of the page.
After adding each disk in your array, you’ll format the disks, create the RAID5 using the disks you added and format the new RAID array (I used UFS file system). The FreeNAS.org documents explain how to do each step.
With four 1TB drives added to my RAID5 configuration, it took FreeNAS approximately six hours to build the volume. This created a volume of 2.6TB of usable storage space. If you’re building your own NAS and wondering how much usable storage you’ll get from different RAID configurations, check out RAIDCalc.
After the RAID was initialized I created a mount point (Disks->Mount Point). The mount point presents the volume to the operating system and makes the disk available for use. Don’t confuse this with a share (CIFS or SMB), which makes a disk or directory available to other computers on your network.
Sharing the NAS
The last few steps to a functioning NAS is making it available to other computers on your network. On my network I have a couple Macs, a couple Windows machines and an Ubuntu virtual machine. The easiest way to share disks in this environment is to enable the CIFS/SMB service (Services->CIFS/SMB). For authentication, I’m using Local Users since I do not have a LDAP server running on my network. I gave the box a NetBIOS name, set the Workgroup and description, but left the rest of the settings as defaults.
I created one share (Services->CIFS/SMB, Share tab) to the root mount point just to verify everything was working. However, before I could test and since I’m using Local Users for authentication, I added myself as a user (Access->Users and Groups). I then went over to my MacBook Pro and sure enough, my NAS box was listed under the Shared section in the Finder window. I clicked the server and could see my NAS01 share.
Benchmarking the NAS
I plugged my MacBook Pro into my new gigabit router (I bought a new router specifically to get more I/O out of the NAS) and performed a couple of benchmark tests (images below). And so we have a functioning FreeNAS installation with 2.6TB of usable storage space.
Protecting the NAS
The last thing I needed to do before starting to use the NAS for production is protect it from power events.
Power outages, surges, and brown outs are deadly for storage devices. If the unit loses power in the middle of a write to disk, you can potentially lose your RAID. Enterprise-level storage devices have built-in protections against these events, but lower-level storage devices do not.
I purchased an APC Back-UPS XS 900 from Best Buy for $129.99. This unit is sufficient to run the NAS and another workstation for about an hour on battery. If I’m around during a power event, that’s plenty of time to gracefully shutdown the NAS to prevent trouble from a sudden power loss. But I’m not around all of the time. Fortunately, FreeNAS has a built-in UPS service. Once connected to your UPS device (via a USB cable that comes with the UPS), it can react to power events. Under Services->UPS, you can enable this UPS service. I couldn’t find the driver for my exact model of APC, so I used the generic “usbhid-ups” driver. I also couldn’t find any specific help for the port setting, but I ran across a post on an Ubuntu forum that used “auto” as the port, so I tried that. I set the “Shutdown mode” to “UPS goes on battery” and the “Shutdown timer” to 30 seconds. In a power outage and after 30 seconds on battery the NAS will initiate a graceful shutdown. I tested this by yanking the power cord on the UPS, and to my delight, FreeNAS shut itself down.
In the next post I’ll review the entire parts list and then talk about where this FreeNAS project fits into my over all backup/archive strategy.




Great write up and thanks for the information! Is there anything I should be looking for, regarding the UPS? My setup (when built) will only be the NAS box, so if I can get a smaller UPS, that would be ideal.
Some of the forums looked that the UPS can be troublesome… how has it been for you?
Thanks
Great write up and thanks for the information! Is there anything I should be looking for, regarding the UPS? My setup (when built) will only be the NAS box, so if I can get a smaller UPS, that would be ideal.
Some of the forums looked that the UPS can be troublesome… how has it been for you?
Thanks
just a followup to my question.
Best Buy had the APC 550VA UPS on sale cheap ($40). Since I am only using this for the freenas, I didn't need a lot of power. It is not listed on the approved hardware list, but thought I would take a chance. (http://www.bestbuy.com/site/APC+-+550VA+Battery… )
I used the generic “usbhid-ups” driver and set the port to “auto”
Works perfectly. Setup took all of 45 seconds.
Anyone looking for a cheap UPS to use on your freenas box, this might be an option for you.
Wow, Thanks so much for your write up. I hope to do something similar but not so pretty (it will be in my basement). I have been worrying about FreeNas or Win. Home Server.
Also, Thanks for the benchmarking. It is surprisingly difficult to find real world numbers for FreeNas's gRaid 5 with a proper system such as your Core2Duo 1.8ghz.
I'll put it in my favorites.
Indeed, a great write up. I've a very similar environment, but struggle most with the performance of reads and writes over the network. I'm using a gigabit network as well, but get only in average 25Mbps/2.4MB/s and my graphs are also very spiky if I drag and drop a file via pathfinder on a NAS drive. I wonder whether my test procedure is correct. May I ask you what tests you did and how to retrieve the graphs in the article above?
Many thx
Great write up, indeed. I'm trying to do more or less the same thing. Everything works as expected if there wouldn't be the low I/O performance I get which is in the order of magnitude of about 12-15MBs for SMB file transfer and 20-25MBs for AFP via a GE switch. From the figures above I see a much higher numbers. In order to compare them properly may I ask what you did in order to see these performance numbers? I'm under the impression that something must be wrong in my setup, but first want to make sure to compare apples with apples.
As a side node – when I transfer a file via SMB or AFP my performance line is much more spiky and goes up and down quite dramatically. That seems to be much less the case in your setup.
Can the UPS also power up the FreeNAS when the main power returns?
[...] My FreeNAS Project Part 5: The Config – Jonathan BrownJonathan David Brown, Singer, Songwriter, Musician, Contemporary Christian Music Producer, Music Production, Music Producer, CCM Legend … We’re under construction, and it may take a bit to get this site in shape. However, if you’ve come here to contact Jonathan David Brown for music production, or just to say "howdy," [...]