My Home NAS, Part 5: Finally, Hard Drives
Well, it's been a couple of months since my last post, and I've gotten quite a bit more work done on my home NAS project. When I last posted, I had finished installing the basic hardware and operating system, but hadn't quite settled on the right set of hard drives. But all that's changed; in fact, the ol' Wind PC has been up and running pretty solid for the last month or two, and I'm happy to report that the project is a success. In this post (and any that might follow it) I'll tell you a bit more about the rest of the setup.
First, the hard drives. I decided to break with one of my initial project requirements; the final NAS has only 500GB of usable storage. For scalability's sake, I decided to install two disks in a RAID-1 configuration, one of them a 500GB from Western Digital, and the other a 750GB from Seagate.
Since the size of a RAID-1 array is always equal to the size of its smallest member, that gives me 500GB of usable storage; however, if I later replace the 500GB drive with, say, a 1TB drive, the size of the array is increasable to 750GB. And so on, and so forth, etc., etc. I've tested this procedure on a virtual machine, but so far haven't had the chance to try it out on the actual box...so if a year from now I try it and it fails, please don't blame me :)
Anyway, there were a few steps I wanted to take to make sure things stayed running smoothly. First, simple disk monitoring using the Debian smartmontools package. Make sure it's installed with a simple
apt-get install smartmontools; then, in /etc/default/smartmontools, make sure you've got a line (uncommented) that says
start_smartd=yes . And, just to make sure we've got a clean slate...
cp /etc/smartd.conf /etc/smartd.conf.org echo "# /etc/smartd.conf config file" > /etc/smartd.conf
Then, for each installed drive (on the Wind box, they're /dev/sda and /dev/sdb), add appropriate monitoring instructions to /etc/smartd.conf. If you're the copy-and-paste type, this should get you going:
echo "/dev/sda \ -d ata \ -S on \ -o on \ -a \ -I 194 \ -n standby \ -m firstname.lastname@example.org \ -s (S/../.././01|L/../../6/03)" >> /etc/smartd.conf
Obviously, you'll want to put your own email in there, and run that code a second time with /dev/sdb in the first bit so that both your drives are monitored. Then, run
/etc/init.d/smartmontools restart to make sure your new settings take effect.
You can also check on things manually using the smartctl command; for instance, the following command will get you all the monitoring data for /dev/sda:
smartctl -d ata -a /dev/sda
When I first set all this up, I'd mounted one of the drives in the Wind PC's 5.25" bay using a set of simple metal adapter brackets:
However, in this setup, both drives were floating around 45 degrees Celsius, which is really a bit too warm for my tastes. I've since installed the 750GB drive in a Vigor iSurf II cooling unit (I did have to reverse the fans to get it right), and things are down to 38 on both drives. Great news.
Anyway, the next step is to set up the RAID array and the filesystems...which I will show you next time.