Random Thoughts...

[Sunday December 13] - My DIY home NAS

So, I've had more than a few people ask me to explain how I built the NAS I currently have at my house. I decided to put together this extensive post to both show physically what I used and how much it cost, but also - why I built it the way I did.

I used to be like you. Also like most of my friends; content with a few big on-board hard drives on my desktop PC, or perhaps even an external, 2-bay Linksys or Dlink NAS unit. Sure, a terrabyte or even two is fine for the most part. Once you want more than one PC accessing your movies, TV shows, etc however - it becomes a problem. It becomes an even bigger problem when your 2 x 1.5GB, JBOD or RAID-0 set fails because one drive dies. Sucks, eh?

I needed more. More reliability, more data protection, faster access speed, access from more PCs, etc.

The last dozen years of my technological life have consisted of numerous media downloading technologies. I've pretty much done it all:
- Private FTPs (1995 - 1999)
- Napster/Limewire/Soulseek (1999 - 2001)
- Rapidshare/Megaupload (2001 - 2003)
- BitTorrent (Torrentspy, Mininova, etc.) (2003 - 2008)
- Newsgroups (Newsbin, Usenetserver, etc.) (2008 - present)

Obviously it goes without saying that I've collected a hell of a lot of digital media since I first logged onto the Internet. Way back in the 90s, storing crappy sounding MIDI & MOD files as well as low-resolution GIFs & JPEGs was no sweat. A couple hundred megabytes maybe, and even then if I was jonesing for space, I'd bring my hard drive over to my buddy's place and make use of his sweet 2X external CD burner to copy a bunch of media to a couple discs.

Oh, how times have changed. About 3 years ago, after I got upwards of the 1TB mark in media files, I decided that I would need some sort of separate storage system, independent of my desktop PC. My first NAS I built was somewhat of a failure - I won't go into details, but suffice it to say, NEVER use software-based RAID if you can help it.

So, this brings us to my current NAS
My NAS Requirements:
a) Enough space to copy over my existing ~2TB of media from my old NAS
b) Also enough space to be able to copy my physical DVD movie collection, and be done with physical discs (~300 DVDs, or another 1.3TB or so)
c) After both a & b are taken care of, enough additional free disk space to give me at least a few years of growth. (About 40GB of new media per month, or 500GB/year)
d) All of the above, in a RAID-5, array.

So, after thoroughly reviewing the requirements above, I decided that I'd need no less than 5TB of usable
After having nothing but problems with software RAID, my first hardware choice was a hardware RAID option. I wanted RAID 5, but to accomplish this and still meet my space requirements, I'd figured that I would need no less than 5 hard drives. (Assuming I used 1.5TB drives). Unfortunately for my chequebook, at the time no motherboard manufacturers made a board with onboard, hardware-based RAID that would support five SATA drives in a RAID-5 set. This left me with no option but to buy an add-on RAID card.

RAID Controller
There are a number of low-to-mid range RAID controller manufacturers out there, and after careful research I chose the Areca ARC-1220 - a card on the more expensive end, yet an extremely impressive RAID controller. With 8 SATA channels, and supporting RAID levels 0,1,10,3,5 and even 6 (wow!), this 8x PCI-E card does it all using hardware ASICs, and as a result it's performance is really impressive - especially since it uses a PCI-Express slot, rather than the now ancient standard PCI slot.. As I eluded to a moment ago however, all it's advantages do come with a hefty price tag. The going rate online for this card when I purchased it (July 2009) was between $475 - $525 USD.
Areca ARC-1220 8-channel SATA RAID Controller
Yep, ouch. But after being burned too many times by JBOD and software-raid configurations, I was ready to shell out the cash for a proper RAID card.

When I was actually ready to buy this card, through sheer luck, Newegg not only had it on sale for just $459 CAD, but the additional bonus was that they also included a free LCD Control Panel that mounted in a front CD/DVD bay and connected internally directly to the controller. Normally, I wouldn't bother buying this accessory ($80!) since it's a completely optional add-on. Not only did I get it for for free, but it's turned out to be a completely awesome and useful add-on! I can access all of the BIOS functions via the front panel interface.
Sample menu items from the Areca LCD Panel

Motherboard / CPU / RAM
My choice for a motherboard was actually not a choice at all. Over the past year of upgrading components of my desktop PC as well as my Home Theatre PC, I'd ended up with a spare, fairly new motherboard. It actually had almost everything I needed, which was pretty much just a PCI-E slot for the RAID controller. It didn't have any on-board GPU, but that actually worked out for the best, since I dug up an ancient PCI ATI Rage Pro Turbo which was a great choice since compared to modern GPUs (even on-boards) it uses next to no power - it doesn't even have a heat sink! For a PCI, I chose a 2.66Ghz Celeron since it was on sale super cheap at the time, and I had thought that a NAS with hardware RAID wouldn't actually need much horsepower. 1.5GB of RAM later, and I was off to the races.

Case
I am quite proud of the case I chose. The Antec P182 Super Mid-Tower is a great case that easily fit 5 hard drives across both it's middle and lower bays. There's no lack of cooling fans either. I bought a 650W Antec Earthwatts PSU to go along with it.
Antec P182

Operating System
The Achilles heel of most home-built NAS systems is that their Operating System needs to be installed to hard disk. This instantly either eats up some of your system's available space, or you're forced to go out and put in a separate drive just for the OS. (And if that drive isn't in a RAID set, it becomes a single point of failure). The solution to this problem that I choose is FreeNAS. An open-source, NAS-centric OS that runs either directly from a CD, or right off a USB key. With an easily-configurable web GUI, and a huge Smörgåsbord of connectivity options, it easily takes the cake as far as open source NAS software goes. Based on FreeBSD, you can even SSH directly into the system itself if needed.
Disk Managment screen in FreeNAS

I ensured beforehand that FreeBSD had a driver / kernel module for the Areca RAID card - and sure enough, as soon as I booted from the FreeNAS CD, it was able to see the hardware RAID-5 array presented as a single disk drive. Format, mount, and share the drive with CIFS/Samba, and my NAS was complete!


Cost breakdown (July 2009)
Areca RAID Controller - $459
Seagate 1.5TB SATA Drives - $140 (x 5 = $700)
Motherboard - $0
CPU & RAM: $110
Case: $140
Total: $1409 + tax ($183)

Expensive, yes. Worth it? Yes:
Free space - RAID-5

11:42:00 - Jeff -


[Monday August 31] - Fan Expo

My first (and definitely not last) Fan Expo was amazing... aside from it being a total Nerd Fest (which was entertaining in and of itself), some legendary actors were present. Avery Brooks (Captain Sisko), Walter Koenig (Lt. Cmdr. Pavel Chekov), Robert Duncan McNeill (Lt. Tom Paris), Linda Hamilton (Sarah Connor) and Lou Ferrigno (The Incredible Hulk) are just a few examples of people present. The absolute star of the event however, was Mr. Leonard Nimoy. To say that his role in the latest Star Trek movie (2009) was a "cameo", would not be doing him justice. Leonard was definitely the character who provided this new re-incarnation of the Star Trek franchise with a tie to the Original Series from 1966.

Jeff meeting Leonard Nimoy & getting his Autograph

Signed Leonard Nimoy Photo - NOT A PHOTOSHOP!

09:11:00 - Jeff -


[Sunday April 19] - Enable scroll-back during remote SSH session inside SCREEN

Nerd Alert! Unless you are geeky enough to use Linux regularly, this blog entry is not for you.

If you are a regular Linux user, especially if you use Linux primarily via the command line (eg. remotely via SSH), then you've probably heard of and / or used an application called SCREEN. If you haven't, in a nutshell, it is a console tool that allows you to open multiple command-line consoles within the same SSH session. If you still don't quite get it, think of when you're logged in directly to the console of a Linux PC/Server - you know how you can press ALT/SHIFT + 1,2,3, etc. to switch between "consoles", all running on the same physical server? Well SCREEN is the software equivalent, except it lets you do that over a remote SSH session. It's an absolutely essential application for any Linux server admin.

If you are brand-new to SCREEN and first start using it, you won't really appreciate the power of what it can do until you grasp one of the most important productivity enhancements that it allows: You can open any number of "command-line windows" at once, work in each one, and at any time you can disconnect your remote SSH session without losing any of your command line sessions. Go ahead; leave one window tailing a log file, have a config file open in VI on another, heck, even have a third open with your command-line IRC or MSN client running. Don't worry, your applications will keep running when you disconnect your SSH client. SSH back in, hours, days, or weeks later. All you need to do is type "screen -r" and all your command-line windows will re-appear just as if you never disconnected. Once you've gotten past the somewhat complex learning curve required to learn the keyboard commands that let you perform functions such as switching between windows (CTRL+A, N), opening new windows (CRTL+A, C), etc., you'll find it an application that you can't live without.

Now, other than prompting this great application, what is this blog entry about? Well the whole inspiration for this post is an issue that I'm sure virtually all SCREEN users (myself included) inevitably come up against. While working inside SCREEN windows over a remote SSH session (using Putty, SecureCRT, etc.), Eventually you will get pissed off with the fact that SCREEN breaks your SSH client's ability to scroll back up to view my console inputs/outputs that have been pushed up past the top of your SSH client's window. For the longest time this "bug" frustrated me. I'd have to constantly remember to use |more or other such commands to ensure that any output I needed wouldn't scroll go past the top of my SSH client's window.

FINALLY (a long time ago actually) I found a simple way to fix SCREEN's behavior in a way that it would "play nice" with Putty's scroll-back buffer. The fix is quite easy actually.

Assuming you've run SCREEN as your current Linux user at least once before, you should find a file named ".screenrc" inside your user's home directory. Sometimes you won't - I don't quite know when it gets created and when it doesn't. If you don't have the file, create a new file named ".screenrc" in your home directly. If you have the file, there will already be a whole plethora of configuration items in there. Don't worry about any of those. Just add the following line to that file (don't erase any of the other lines in the file).

termcapinfo xterm ti@:te@

If you're competent using VI, edit the file like so: (Don't have SCREEN running at this time)
vi ~[username]/.screenrc
Then add the line above.

Or, you can add the line it right from the CLI:
echo "termcapinfo xterm ti@:te@" >> ~[username]/.screenrc

Now, go ahead and start SCREEN. As long as you start is as the user who you added the above line to their .screenrc file, you'll magically find that the scroll-back buffer on their SSH client works (within the same screen window anyway - if you switch to another window, it won't be able to change the scroll-back buffer to the new window).

I hope this has been helpful to all the Linux geeks out there - give SCREEN a chance!

11:06:00 - Jeff -


[Tuesday August 21] - Carbon Credits

From: info@zerofootprint.net [mailto:info@zerofootprint.net]
Sent: August 20, 2007 2:01 PM
To: jeff.moon@gmail.com
Subject: Zerofootprint Flight Offsets Purchase

CONGRATULATIONS,
YOUR FLIGHT IS CARBON NEUTRAL!

Your Zerofootprint Offsets purchase represents 0.1 tonnes of carbon dioxide.
The Zerofootprint team would like to thank you for your carbon purchase. Thinking about your lifestyle in terms of its carbon footprint and doing something about it is an important step towards living a sustainable lifestyle and fighting climate change. The $1.60 you have contributed to offset your flight from NORTH BAY, CANADA to TORONTO, CANADA will help sustain the important work of supporting Canada's forests.
Our offsets are certified by ISO 14064-2 and fight not only climate change but deforestation, biodiversity loss, and watershed degradation as well.
When you offset with Zerofootprint, you know that you�re working with an organization that is as serious about getting real results in the fight against global warming as you are.
Aug 20, 2007
www.zerofootprint.net

09:25:54 - Jeff -


[Saturday August 11] - Centos 5 minimal install

One thing I love about CentOS, and the thing I love most about installing it, is that while the entire installation of CentOS spans 6 CDs (That's right, six. There are a LOT of packages.) If you're going to be running a Linux server, during the installation there's a nice option called "minimal install", which automatically removes pretty much everything except what's needed to get a lightweight linux system with network connectivity and sshd up and running. Who needs Xwindows anyway? From there the CentOS package installer, yum, can take care of the rest by downloading whatever you need.

Even cooler, and for me the main reason I use the minimal install option, is because only the first CD out of the 6 CD install set is actually needed. Not having to download 5 extra ISOs really saves a lot of time, not to mention blank CDs.

Here's where it gets good. Today, I was shocked and appalled when I went to install CentOS 5 for the first time. Going through the installation was all find and dandy until I came up again a problem. I couldn't find the "minimal installation"! What a fantastic feature, and they removed it. Hoping to do the same as it did, I went and unchecked all the packages in each group on the install list. After a few "Next" screens, the install politely let me know that I'll still need 4 disks!! Well I was broken hearted. The developers had taken my favourite distro (BTW I know it's RHEL so no sarcasm) and either poorly arranged their required packages on multiple disks, or added so much bloat that it would probably sink! (Or does bloat float? I'm not sure.)

After a lot of work and trying different combination, I was finally triumphant! Now I will tell you, It is still possible to do a minimal install that works great and only requires the first CD.

Here's the steps. It's easy!
1. Boot to CD 1
2. Type in "linux text" to get the text installation setup
3. Proceed normally with the installation until it asks which packages to install
4. De-select all of the packages and then check the "customize package selection" check box
5. Hold down the "-" (hyphen) key, which will scroll through all of the package options, and de-select them all for me.
6. Finish the install and you're done!

Why this doesn't work in the graphical installation, I'll never know. As long as you are comfortable tabbing your way through fields in the text installation, the prompts you receive are pretty much identical. And since the graphical installer uses a whopping ~200MB of RAM just to run, the text installation is probably much faster.

Be sure to perform a "yum update" as root user to update your packages to the newest versions.
Once that's done, you're rocking. For CentOS newbies out there, you'll find "yum install " for what ever program you want usually works great.
I might write a separate article about CentOS in general because I'm in love with it. (you can't marry Linux distros yet, right? Damn right-wing government!) If I do, the part above will probably move there.

10:38:00 - Jeff -


Powered by Apache!Get Firefox! | Admin | Awstats | Contact Me |