Click here to Skip to main content
Click here to Skip to main content

FreeNAS or Ubuntu

By , 7 Sep 2009
Rate this:
Please Sign up or sign in to vote.
A while back I read an interesting article here on CodeProject writen by John Simmons/Outlaw Programmer about building a Network Attached Storage (NAS) box using a computer that would otherwise be used as a door stop or for spare parts. Being the cheap SOB that I am this sounded like a perfect project for me, but at the time I didn't have a spare computer laying around. After
waiting for some time and not being able to find a free box I found that I cound buy a few parts new and use some of the spare parts that I did have laying around.  To make a long story short I found a deal on NewEgg and ended up with the following;

            System Specs          
                Biostar G31E-M7 Mobo
                Intel Celeron 1.8 Gb Processor
                1 GB DDR2 Ram
                550W Power supply
                Had an old case and CD reader           
            Total cost including shipping < $200

I installed FreeNAS and had it set up in a short time and was very pleased with the results but as is always the case I got a bad case of scope creep. Since I use Subversion as my source control of choice I wanted to set up a repository but found it to be a daunting task, and since I didn't have an intemit knowledge of FreeBSD I went looking for alternatives to FreeNAS. My son has used Ubuntu on occasion and recommended it but not having any Linux experience I shyed away from it. But after some prodding I decided to give it a go so I installed it on VirtualBox and set it up as a server to see how easy it would be and if it would do what I wanted it to do and was astounded at the results. In this article I will relate my experiences with both products and give some insight into the capabiities, problems and comparisons between the two.
 

 Introduction 

There are several reasons that got me motivated to spend the money and go ahead and set up a file server;

1) There are 3 of us in the house hold and we needed a place to backup our machines.

2) When I upgraded to Windows 7 from XP I lost a lot of data that I was able to replace at a great expense of time but I didn't want to have to go through it again.


Before I installed either product I first ran it through VirtualBox to get an idea of what I was getting into (learn how here), this was an experience in itself that I won't go into  other than to say I learned a lot about VM's in general. I've used VirtualBox on several projects and hightly recommend it.

FreeNAS

My first impressions of FreeNAS (get it here) is how fast you can get up and running with it, literally in a couple of hours. It has a small footprint and can be installed on a floppy, cd,           flash drive or on the same HDD as your data in it's own partition. Once you get it installed          (learn how here) the keyboard, mouse and display can be ditched as it has a very nice WebGUI to work with. I had some problems in the beginning as I was trying to use a MOBO that my son had replaced because he was having problems with it, but I figured he just wanted to upgrade his computer and was inventing problems but he wasn't wrong it ended up in the trash.
This project can easily be done in a weekend by anyone, even with limited knowledge of hardware and if you can install windows you will have no trouble with this application so if you've got an old computer lying around collecting dust what have you got to lose? Get that rascal out, download FreeNAS and give it a go, you won't be sorry. The only thing that I can see that would be a potential problem is that the media comes in an ISO or IMG format and you need to be able to burn it to a disk, I used  Nero to burn mine but there are others.
Since it's so easy to install and setup I won't go into the process but will refer you to the series of articles at www.dailycupoftech.com.



       

Just to give you a general idea of what FreeNAS WebGUI looks like this is a picture of the Start page I lifted from their site and what you'll see after logging on. (User Name: admin, Password: freenas)
 

 Ubuntu 9.04 (Jaunty Jackalope)

I chose the desktop version of Ubuntu as opposed to server edition because the server edition is GUIless and I do not have a lot of experience with Linux style OS's and I did not feel confident enough to attempt it, although I did learn quite a bit during this project. I'm not going to go into a lot of detail in this tutorial because there is so much good documentation out there that covers the various procedures much better than I could so instead we will go in steps and for each step I will point to another site and when you have completed that step wwe will move on to the next.
So let's get started with the installation. (get it here) When you go to burn the ISO I recommend that you burn the CD or DVD at the lowest possible speed your burner is capable of. I had to do it 3 times before I finally found out this little trick.

1) Install Ubuntu (here's how)
 
The next step is optional and only necessary if you plan to Remote Desktop into your server. I did this because I am running my server headless, (no keyboard, mouse or monitor) and from this point on I did the rest of the configuration using UltraVNC. I tried a couple of different applications and finally settled on UltraVNC and am satisfied with it enough to recommend it.

2) Install UltraVNC on your Windows machine. UltraVNC download In my case this was Windows 7.
Before unhooking my keyboard, mouse and monitor I rebooted a couple of times just to be sure that everything was OK and that there were no problems. After rebooting and waiting a short period of time I tried to Remote into the server and couldn't...WTF?  So I hooked the monitor back up only to find that if there's not a monitor hooked up Ubuntu goes into a low graphics mode and won't boot. I googled for a few hours and found that numerous other people had run into this same problem and hadn't found a way around it. I had just about resolved myself to the fact that I would have to temporarily hook up a monitor at least to get it past the boot stage but then I realized that my monitor, (An Acer Mdel X203H) had DVI-D and VGA inputs) and can
manually switch between the inputs...problem solved!

Next we want to set up file sharing and for this we want to install and configure Samba on the server box.

3) Install and configure Samba for File sharing. (find out how)

We're almost there and this last step is also optional and only necessary if you want to hook a printer up and use it as a Print Server.

4) Set up Print Server (here's how)

Getting the Printer up and running on the server was a breeeze and way easier than windows. The whole time I kept thinking this is to easy something has to go wrong and sure enough it did but not on the server side. I had printed a test document on the server and it worked just fine but when I got back on my windows machine and fired up Visual Studio 2008 and tried to print out a test page it went into the bit bucket...again WTF? So back to google to try to find a solution, after trying a few off the wall recommendations I went into Start->Devices and Printers and turned of Advanced Printing Features and lo and behold it worked. Problem solved!



One final step and one of the main reasons that I went from FreeNAS to Ubuntu was that as a programmer I wanted to have an SVN repository on my server. After getting used to TortoiseSVN <a href="http://tortoisesvn.tigris.org/">(get it here)</a> I was spoiled and figured there was a way that I could do it. After googling for a while I found there wasn't a whole lot of information on this subject so it was pretty much hit and miss but after trying a few applications I found that KDESVN would do the trick with only one gotcha, and this may be because I'm running the server at 32 bits and Windows 7 at 64 bits. Just not sure about this one! To be able to access the repository from windows you must create the repository on the server, again I stress this may be because of the mismatch in the tweo machines but it is a restriction I can live with.

5) Install and Setup Subversion

Remote into you server and from the system toolbar select Applications->Add/Remove. When it comes up do a search for or navigate to KDESVN, select it and apply. After installation select KDESVN from the Applications->Programming menu and set up your repository(s). At this point I will assume if you installed this application that you are familiar with version control systems and if not there is a manual/help provided that looks to be very thorough.

Performance Benchmarks

I ran backups using Acronis on both system and pretty much got the same results. To back up my System and Work drives took about 1-1/2 hours and transferred 65 gigs at approximately 10 mB/s, used around 18% CPU and 21% memory. Considering I used the onboard NIC i wasn't to shocked at the specs. of course results will vary with implementation.

Conclusion

As I have pointed out both products are excellent and are worthy of consideration but it ultimately boils down to whether you just want a place to store you files or whether you want to resort to a full blown server and is entirely a matter of your needs, what hardware you have to commit, amount of time and effort you are willing to spend and how much expertise you have in the different areas. In my case  I was willing to compromise and learn Ubuntu just enough to do the extra configuration that I required. Luckily the new version of Ubuntu (Jaunty Jackalope) is a very user friendly OS and I didn't have a great amount to learn.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Mike Hankey
Retired
United States United States
I'm an old assembler and C programmer self taught in the object oriented languages and Web design. Upon graduating from Murray State University in 1983 I Started doing embedded systems for the automotive industry, got a wild hair and moved to Florida in 1986 and did some work on DEC PDP and MicroVax computers.
My latest project:
ToDoManager extension for VS2010 and Atmel Studio 6.1

Comments and Discussions

 
GeneralMy vote of 2 Pinmemberdwivediknahal17-Sep-09 16:28 
GeneralRe: My vote of 2 PinmemberMike Hankey17-Sep-09 16:45 
QuestionWhy do you need a server for SVN?? PinmemberPeter Tewkesbury7-Sep-09 21:12 
Hi,
 
I run VS2005/8 with AnkhSVN add in for VS2005/8 and I use the "file:///C:/source" as a path to SVN source control. No server needed. Personally, I use a 16Gb USB Pendrive to store my SVN Source and it works fine, so no server needed.
 
I do also have a FreeNas server which works very well, and I have seems How To's on the internet to install print drivers onto as well.
 

P.s. very good article. Thanks.
 
Peter Tewkesbury

AnswerRe: Why do you need a server for SVN?? PinmemberPaul Selormey7-Sep-09 23:28 
GeneralRe: Why do you need a server for SVN?? PinmemberPeter Tewkesbury8-Sep-09 2:18 
AnswerRe: Why do you need a server for SVN?? PinmemberMike Hankey8-Sep-09 1:32 
GeneralThanks PinmemberPaul Selormey7-Sep-09 18:15 
GeneralRe: Thanks PinmemberMike Hankey8-Sep-09 1:27 
GeneralRe: Thanks PinmemberPaul Selormey8-Sep-09 3:26 
GeneralRe: Thanks PinmemberMike Hankey8-Sep-09 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 7 Sep 2009
Article Copyright 2009 by Mike Hankey
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid