Adventures in home data backups: Part 1 – FreeNAS to the rescue!

I thought I had a pretty good data backup strategy for my home network. I have several PC’s that all access a central NAS as a fileserver (a 250GB La Cie Etherdisk Mini), which is a nice little Linux-based device that has been running like clockwork for years. This was manually backed up, along with Vista Complete PC Backup Images of each, to a 500GB Western Digital My Book external USB drive. The latter I usually kept unplugged, in a drawer, so it wouldn’t get any wear and tear.

This is fine for years, then one day I made the mistake of leaving out the My Book, it got bumped by a houseguest, and the drive started making clicking noises and then couldn’t mount to my PC anymore. I tried removing the drive and manually connecting it to a Linux PC (running the Knoppix 5.1 Live CD), but that had no luck either.

So began the quest for a better backup strategy. I figured that in this day and age I would be able to buy a cheap little box that would sit powered off most of the time, but be able to automatically power itself up in the middle of the night to backup my NAS drive, then turn itself off to save energy (and the drives). So in order of priority:

  1. It must run rsync, immediately knocking out the Windows-based solutions like Windows Home Server. I have tried SyncToy (and even programmed with the Microsoft Sync Framework SDK) and am not impressed with it. It may work fine for small syncs, but I have a lot of files, and it doesn’t scale well in my experience.
  2. I must be able to open an SSH console to the box in case I want/need to change something. It will otherwise, of course, sit “headless” in a closet in the dark. This requirement implies that there is an active community of people that hack this particular model (since for some reason, no NAS manufacturers offer this out of the box).
  3. It must be cheap (i.e., under 150 bucks).
  4. (Nice to Have) It should be able to function as well as an NTFS-based external USB drive, so I can put Vista Complete PC backups on it for each of my PC’s (the NAS only has my documents, so I would hate to have to reinstall all my programs if one of my PC’s died). For Vista, I’ll have to manually plug it into each PC periodically to do this, but when I ultimately upgrade to Windows 7, apparently that lets you do a complete PC backup over a network, so the box will be able to stay in its closet all the time.

I figured this would be easy to find in this day and age, right? Wrong. Based on #2, the most active community seemed to be the one for Buffalo devices like the LinkStation. I came across a new model from them, the 1TB HD-CELU2 DriveStation FlexNet, which was designed to function as a NAS or a standalone USB drive. And it was cheap. So I picked one up and took it home, figuring I could hack it open, install rsync like people had done, configure some setup scripts, and then put this in the closet and let it do its thing every night.

I’ll go into more detail another time, but long story short, the LinkStation FlexNet doesn’t do any of that. Turned out that no one has had any success hacking this model, and neither did I. I’m not even sure of the tech specs. Some Japanese guy was nice enough to show how to safely open the box though. I was unable to mount the root filesystem in my Linux PC, I couldn’t use any of the hacked firmware developed for the other LinkStations, and I couldn’t use the apc_commander exploit. After a week of getting really low-level (i.e., fdisk, parted, dd, and dd_rescue). I learned some neat stuff about digital forensics though.

I was forced to admit failure. Oh, and by the way, I also discovered that if I was to change the filesystem type from FAT to NTFS so I could do the Vista backups, I could no longer use the box as a NAS. So it turns out that for all my needs, the NAS function of this device was worthless and I was left with a rather expensive USB drive.

So on to plan B – time to build my own backup device. I had some old hardware lying around, a PC and a few fairly large old IDE drives so my new plan was to convert a low-end PC to a NAS box, install as many drives as I could, and then use that as my backup device. Enter the excellent FreeNAS project.

It’s not hard to do this, and dare I say, after all the experience I had with commercial products, it’s rather satisfying as well. And I didn’t spend a dime to do it.

Here are the steps:

  1. First, burn an ISO of FreeNAS. The official FreeNAS site is a more extensive resource but in my experience was a little dated on some of the details.
  2. On the box you want to use, you will need a working CD-ROM. Set the BIOS to boot the CD-ROM first, then stick in your disk and go. I did find one PC that wouldn’t boot FreeNAS (it was a 2-year old Dell that halted on boot because of, if I recall, some USB problem), but an older Dell Dimension that I tried booted like a charm. FreeNAS is designed to run on almost anything so my experience there may have been unusual.
  3. You can run FreeNAS as a LiveCD, but I chose to just install it to the primary hard drive for simplicity. I followed the instructions to install it to the drive, removed the CD, rebooted, and was done. In the space of a few minutes I had a functioning NAS that was running Samba (so it could be mounted as a network drive by my PC’s), was running rsync, and was running sshd so I could log in and check it out. With that, the box was promptly moved to the closet.
  4. Now it was time to configure the drives. Just followed the directions, with one note: since I had installed both the FreeNAS root partition and my data partition to a single disk, when I mounted the data partition, I chose “MBR Partition”, Partition # 2, UFS file system type (this isn’t clearly documented). The other drives I had stuffed into the box were just mounted as single UFS partitions.
  5. A nice little configuration that you can make is to set the drives’ standby behavior. I set them all to spin down after 5 minutes, which should extend their lifetime.

And so I now have a backup device. Next step – after all this, actually backing up the NAS via rsync. That means I have to hack the Etherdisk Mini.

Leave a Reply

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