A trite narrative device that seems obligatory for every police procedural tv show I watch is the opening scene where the protagonist is in great peril, seemingly with no chance of escape, and then the scene cuts to a scene labelled “36 hours earlier”. Cut to the opening music and credits, and in the fullness of time we see the protagonist easily escape from said peril and turn the tables on the bad guys. Alfred Hitchcock pioneered this narrative device to create suspense in the 1930s, and presumably its novelty and suspense generating powers didn’t become tiresome until the 1940s. Having said all that, I thought perhaps it wouldn’t be so trite if I applied it to network attached storage. 😉
Cue suspense music: “I powered down the NAS using its web-based administrative interface and installed the new disk drives. This involved plugging all of the drives into different SATA slots. When the time came to power it back on, I didn’t know whether Freenas would be able to find the mirrored pair on its new sata ports, whether it would be able to bring the pair back online, whether it would lose my data…”
36 hours earlier:
I had been running my Freenas based NAS for a week or so, and decided I needed to upgrade the disk drives. It was running a mirrored pair of 1.5 TB drives that were manufactured in 2009, and aside from the potential for running out of space, I had been wringing my hands quite a bit about the age of the drives. I picked up a pair of 4 TB drives and commenced the upgrade. When I first set up the NAS, I had plugged the two 1.5 TB drives into the two 6 TB ports on the motherboard. After doing some reading, I learned that no spinning platter drive is going to find 3 GB SATA a bottleneck and only solid state storage will be able to take advantage of the 6 GB ports. So, I decided that when I upgraded the disks, I would use the 4 3 GB sata ports for the spinning platter drives.
I will note that while I believed the case and motherboards to be excellent choices when I purchased them, when put together the multiple power supply cables, SATA sockets on the motherboard, and placement of the 3.5 inch drive bays lead to an extreme and undesirable degree of crowding in the sata socket area.
After booting the NAS back up, I was not able to contact it through the web based administrative port. As it was a headless server, I had to bring it upstairs and plug a keyboard and monitor in to see what was going on. I was specifically wondering if the sata cable moving had confused Freenas as to the location of the solid state sata boot drive. It turned out, the NAS had booted properly and I had simply plugged the ethernet cable into the wrong RJ45 port (the motherboard has 3 RJ45 ethernet sockets). Once I tried a different port, the administrative web page appeared in all its glory.
At this time, I noted that Freenas had sent me an email indicating the 1.5 TB mirrored volume was missing one drive and running in a ‘degraded’ state. I also noted the ‘alert’ button in the upper right hand side of the web page was showing red rather than its usual green, and I was able to determine that the mirrored pair was missing one if its drives. I checked and I was able to access the CIFS share from this volume, so I was impressed.
As is my normal practice in these matters, I had the case open and I upon examination, I saw that during the plugging in of new drives and wrestling with the power supply cables hanging over the sata sockets, the power plug on one of the disk drives had become unplugged. Without turning off the PC, I plugged it back in. Freenas reported that the second disk was present and the volume was no longer running in a degraded state. Since there had been no updates to the volume while it was running in single disk mode, there was no syncing up process to be performed. I was really impressed.
Freenas can be frustrating to work with, mostly when one is deep in the weeds trying to connect to the shares from other computers and wrestling with permissions issues. I had been toying with the idea of converting the computer over to a virtual host and running some sort of linux variant as the NAS host. After seeing Freenas gracefully handle a missing disk drive, I decided that it would be better to stick with it. Admittedly I didn’t test its ability to put in a fresh drive and watch Freenas copy the data over to make it part of the mirrored pair, but I will take that on faith.
My objectives when setting up a computer as a NAS for my home network included raid-like protection from a single disk failure, and the ability to expose CIFS (a fancy re-branding of the good old Microsoft SMB), NFS (The unix file sharing protocol), and iSCSI. While not on my wish list, Freenas also provides AFS (Apple File Sharing) which enables the device to be used as a Time Machine repository–just remember to set a quota lest Time Machine consumes your entire volume.
I did a fair amount of reading and tried a few different open source (free) NAS programs. I would install them and once I encountered either too many hassles setting them up, or they didn’t work properly, I discarded them. Sorry, but I don’t recall any details except that Nas4Free simply would not boot on my pc.
Another factor in favor of Freenas is that it supports ZFS, a journaling file system developed by Sun which is a software “raid” type filesystem that maintains checkdigit type hashes of files and directories whereby a worker process can “scrub” the drives and upon identifying corruption in the form of a file no longer matching its hash, the worker process will replace the data from another drive provided its hash indicates it is not corrupted. Enthusiasts claim this is better than raid due to its ability to detect and cure corruption due to disk errors. All this is not free, however, as all of that magic slows down the performance of the NAS.
Another nice thing about Freenas is that the administrative web page allows one to check for update packages and install them. The updates I applied did not incur any downtime–I don’t know if sometimes updates require a re-boot.
The Freenas administrative interface is nice in that it is entirely web based and works on Safari and Internet Explorer. In addition to managing volumes, shares, and the operational aspects of a NAS, it provides a view into the busyness/use of the system components like CPU, RAM, Disk, and Network interface. While running a 600 GB data transfer from the old volume to the new, a task which took over 8 hours, I noted the CPU usage rarely exceeded 20%, so I believe I bought too much CPU for the task and will look into BIOS settings to see if the CPU can be slowed down a bit as a power-saver during times of no NAS usage.
The drawback in my mind, to Freenas, comes when one is having difficulty getting a client to connect to one of the shares. When attempting to connect to a NFS share, the VMware Free iSXI virtual host would return a cryptic “cannot connect” message, and lacking the knowledge to drill into operating system logs and the like, I either failed to get a connection working, or used much internet surfing and trial and error to get things going. Folks on the web anecdotally note that permissions are often the problems of connection issues, and I had more success once I learned how to enable guest access and the like. For my home network/lab this is not a concern. To be fair, a lot of this can be laid at the feet of the folks writing the client software for not providing better diagnostics for connection problems.
So, in conclusion, I found Freenas to be free software that provides enterprise quality NAS features, multiple sharing protocols, and a convenient web based interface that enables headless server operation. There may be better packages out there, but this one worked for me and I am going to stick with it for the time being. My impression, from web surfing, is that Freenas isn’t too picky about which hardware devices it supports (unlike Vmware iSXI), but I will list my hardware for those interested. In an effort to maintain data integrity, I chose hardware that supports ECC (error correcting) memory that is normally used only on servers. It turns out that Intel 4th generation Core i3 processors support ECC, so I used one of those. As I said, one could probably find one with half of the horsepower and do just as well with their NAS.
2X: HGST DeskStar 4TB 7,200 RPM SATA III 6.0Gb/s 3.5″ NAS Internal Hard Drive. I spent much time looking at reviews on websites like Amazon and Newegg to get a better idea of the reliability of different drive models. This one seemed to have less ‘disk failed’ reviews and was in stock at Microcenter, so that is what I went with. Running on freenas as a mirrored pair, I have a slightly less than 4 TB volume. This should cover my needs for quite some time.
Intel Core i3 3.7 GHZ LGA 1150. Nothing scientific in my methods here. I just looked at benchmarks and tried to find a good price/performance compromise. I chose this rather than a Xeon which also supports ECC memory but is more expensive per unit of performance (to the best of my knowledge).
Supermicro X10-SLL-F LGA 1150 Intel mATX motherboard. Nothing magic here, its just what Microcenter had in stock for LGA 1150 and ECC. One nice surprise is the fact that it has a little cpu on the side of the main one that exposes and administrative web page for the motherboard–one can look at the console, install BIOS upgrades, and monitor device temperatures if one wants. A very useful feature for one running a headless server configuration. As I said, the placement of the USB sockets was inconvenient, but I chalk that up to me buying a case with too short of a distance between the hard drive bay and the motherboard.
EVGA 500B Bronze 500 watt power supply. While my setup does not need 500 watts, the reading I have done indicates that these sort of switching power supplies are most efficient when running at about 1/2 rated power. The “Bronze” designation indicates it is 80% efficient–so easier on the electric bill. From what I have read and seen in my career, all power supplies are not created equal, and it is prudent to spend a bit more than the cheapest one to avoid problems in the future.
NZXT Classic Series Source 210 Mid Tower ATX computer case: As I said, this one got a bit crowded if one wants to use the higher up 3.5 inch slots which can abut the SATA socket block. To address this, since I am using only two hard drives, I will place them lower in the case to keep them out of this crowded area. Also, the case has its power supply at the bottom rather than the top. That leads to really great cable management and air flow for the motherboard, but as I said, the cables tend to pass over the SATA socket area. I wish it had a cross bar I could zip tie the cables to and keep them away from the hard drives. The Intel CPU fan doesn’t have much of a cage on it, and once a stray cable touches a fan blade and stops it, the CPU will overheat and one is out of business at that point. The case has one built in fan on the top of the back, and spaces for many more fans to be installed. I would like a fan in the front of the case to vent the disk drives better, but I don’t think they will have any trouble without one as the case is spacious and the drives are mounted about an inch and a half apart.