Posts Tagged FreeNAS

Building a File Server (Part 2)

The install of FreeNAS is pretty easy, but it’s command-line driven. You basically configure the network card, and then tell it to install either embedded or full. There’s not a whole lot to it.

On my first build, I decided to use a 256MB CompactFlash card as a hard drive and use the FreeNAS embedded install. Basically, that means that you have an image of the OS and a configuration stored on the card. It boots up from the card and then runs completely from RAM. There aren’t the constant rewrites to the card (like a hard drive) which will wear them out. However, what this also means is that you really can’t install anything else other than the base operating system, which meant this wasn’t going to work for me.

I found an old 60GB hard drive in one of my storage bins and reinstalled FreeNAS on it using a “full” install this time. I set up my drives as a RAID 5 which basically means that all of the drives are combined as one large drive. They need to be the same capacity, and you add their total storage up, and then subtract it by one of the drives. The space for that drive is used for redundancy in case one of them fails, so you won’t lose all of your data.

As I was copying data over to the “monster” I noticed that the FreeNAS server was rebooting randomly during periods of high disk usage. When the data finished copying, I began validating file integrity (checksum, cfv is a wonderful tool!) and realized that not only had I spent 2 days copying everything to the server, but many of the files were actually corrupt.

I immediately started reading and found some people reporting compatibility issues with the SATA card I’d purchased and FreeNAS. I had resigned to having to purchase a new card, when I ran across another forum post with a workaround. The trick is to format each disk using the controller bios utility and then soft format it using FreeNAS without erasing the MBR. Luckily with the troubles I was having, I hadn’t deleted anything from my original drives yet.

In all of my reading, I had also discovered that FreeNAS has native support for a file system called ZFS and can build its equivalent to a RAID5 which is known as a RAIDZ. A RAIDZ is basically the same as a RAID5 for me except one major difference: filesystem snapshots. ZFS snapshots allow to you take a picture in time of how your filesystem looks today, and roll it back if necessary or just retrieve certain files you’ve lost.

Are you wondering how this is any better than a Recycle/Trash bin? Well, imagine you’ve been working on an important document all week, and you were putting the finishing touches on it tonight. You don’t realize it, but somehow you accidentally delete pages 10-13, but 1-9 are fine as are 14-23. When you saved over your file, your original document is now gone normally, right? It wouldn’t be in the Recycle Bin because it wasn’t deleted. However, if you were taking snapshots, you can go back to last night’s snapshot, grab the saved file from yesterday and open it back up.  It’s really cool in a really nerdy kind of way.

Sorry, back to the server…

I had to reformat the drives and recopy the data over anyway, so I went ahead and switched it to a RAIDZ. I’ve set up cron tasks to take hourly, daily, and weekly automatic snapshots with help from this tutorial.

Some utilities I’ve found to be very useful to have on the server are unrar, cfv, and of course, SETI@Home.

On a side note, I’ve had one of those hard drives go bad already. Thankfully, FreeNAS has SMART monitoring and sends an email when a drive tests bad. I’d had it 33 days, so I couldn’t return it to Newegg. I had to send it back to Seagate, which I must say, their RMA process is pretty crappy compared to Western Digital. Seagate charges $20 for what WD offers for free. I’ll be purchasing Western Digital in the future simply because of this.

Tags: ,

Building a File Server (Part 1)

Anyone that knows me knows that I’m a pack-rat. However, I’m a pack-rat in the sense that I download everything I see on the internet and store it on my hard drive. I do it a little in life also, but I try to keep it contained mostly to virtual stuff. This keeps me from driving Jenny too crazy.

In October 2009, I purchased a 1.5TB hard drive. I realized recently that it was pretty much full, and I was having to move things over to a 500GB drive. I figured that it’s time to upgrade again, so I began looking into a standalone Network Attached Storage device.

Now, I mentioned that I do hoard some in real life, and one of those things is old PCs. In my closet, I had an old AMD Athlon XP 1900+ Processor and Asrock K7VM3 motherboard. It had 512MB of RAM still in it. I’m always looking for ways to reuse these old systems for various things, so I figured I could serve files from it. It had onboard video and lan, so all I really needed was to figure out what OS I wanted and a SATA card.

I did some searching on the internet and found two choices that really stood out, FreeNAS and Openfiler. To be short about it, I basically chose FreeNAS because I had never used FreeBSD before, and I wanted an excuse to learn a new OS.

I ordered my parts from Newegg as I usually do. My friend Brian gave me an old Thermaltake full tower case he had, so I ordered a 380W green power supply, SATA controller, and 4 2TB green hard drives. I went with the green drives and PSU because I wasn’t so concerned with performance as I was storage space. This way they will run slower and (hopefully) save power.

Part 2 coming soon…

Tags: