Build Your Own Open Source NAS Device Using FreeNAS – Part 1By Dave Lawlor
NAS stands for Network Attached Storage, and is basically a box full of hard disk space that attaches to a data network. Its sole job is to be a file server to as many protocols as you want to configure. If you’re anything like me, you have multiple computers in your house of all types and ages running a variety of applications and OS’s. This doesn’t even take into account the rest of my family, of which even my 6 year old has her own desktop AND laptop.
One of the things I really wanted to do was consolidate my storage space so that a variety of devices can access them. Also I wanted to start using ISCSI in a few demos so it made sense to look at getting a NAS into the family.
Now the cost of these devices really depends on configuration and manufacturer, but there are other options that not only give you more control but can give you a lot more bang for your buck.
In this demo I am going to walk you through setting up one of those alternatives, called FreeNAS. FreeNAS, as you might have been able to garner from its name, is free open source NAS software that is pretty robust.
It supports CIFS/SB, FTP, NFS, RSYNC SSH, AFP, Unison, UPnP, ISCSI, local and Microsoft Active Directory authentication, SoftRAID, disk encryption, and has a WebGUI interface. FreeNAS can also be configured to run off a USB Key to keep all that hard drive space for storage. It is built on the FreeBSD platform but you won’t need to know any Linux to get it up and running.
For this demo I am going to setup a RAID 1 drive and make it so I can access it from Windows Vista. I am actually going to use a virtual machine so I can capture screenshots easily and I am using the following configuration:
- 512MB RAM (96MB RAM is the min necessary to run base FreeNAS functions)
- 3 Virtual Drives, 1 for FreeNAS installation, and 2 for data (not formatted at this time)
You can get the current version FreeNAS from: http://www.freenas.org/index.php?option=com_versions&Itemid=51
For this demo I am going to use the LiveCD ISO option with the current build which is 0.69RC1.
Ok to get started you will need to burn the ISO file to a CD/DVD, or in the case of a virtual machine, mount the ISO. Once that is done go ahead and boot the machine from the CD/DVD that you are going to use for FreeNAS.
1. When it boots up you will see the FreeBSD kernel loading up and after seeing a lot of text flying by you will get to the Console setup menu.
2. From the console menu I am going to select 9) Install/Upgrade to hard drive/flash device, etc. so we won’t have to boot from CD/DVD anymore.
The first screen that comes up asks what type of install you want to do. From this menu I am going to choose 1 Install ‘embedded OS on HDD/Flash/USB, then select Ok.
3. You will get a quick overview of the limitations of what this type of install does. Go ahead and read through this then select Ok.
4. In this screen you will choose your installation drive, if you only have one CD/DVD drive it will be highlighted for you. If you have more than one choose the one that has the installation media and then select Ok to move on.
5. Next we are going to choose the target HDD. As you can see I have 3 drives attached to this machine, I am going to choose the one I dedicated specifically for this task which is ad0. Choose the disk you want to install to and then select Ok.
6. You will now see the system image copy over to the HDD from the CD/DVD drive. Once it is finished it will tell you to remove the installation media and press Enter. Go ahead and do both of these steps.
7. This takes you back to the Install menu, choose Exit.
8. Now from the Console setup menu select 7 Reboot System.
9. Confirm that you want to reboot the system by selecting Yes.
10. After the reboot you will go back to Console Setup and see the current networking configuration. I only have one NIC setup for this computer, but note that you can configure different adapters by going into the Assign Interfaces menu.
11. As you can see it grabbed an IP address by DHCP, so the first thing I am going to do is assign it a static IP address by selecting 2 and hitting Enter. The first screen you will see will ask you if you want to use DHCP for this interface. Select NO and hit Enter.
12. Type in the static IP address you want to use and then select OK.
13. Next you will enter your subnet mask in CIDR notation or bit counts. For 90% of you this will be 24 which is equivalent to 255.255.255.0, if you have a different subnet make there are some hints on the screen or you can convert it using a subnet calculator. After entering your notation select OK.
14. Enter your default gateway and then select OK.
15. You now will enter the DNS server you want the FreeNAS installation to use. After entering the IP choose OK.
16. Now it will ask if you want to configure IPv6 for this interface, but in this instance I do not, so I will choose No.
17. After a few seconds it will configure itself and you will see a screen showing the IP address you configured and how to access the WebGUI interface. After noting down the URL go ahead and hit ENTER.
18. This now sets us up for getting into the WebGUI, go ahead and open your browser and enter the URL you got in step 8. You will be prompted for a user name and password. The defaults are:
19. Once you authenticate you will be brought to the main status screen of FreeNAS where you can get some quick status info, which as you can tell is that no disks are configured. Seeing that this is a NAS, this is something we should remedy!
20. First let’s go in and do some general setup tasks to get us started on the right foot. Select System, then General from the top menus.
21. On the General Setup page you can set some standard things for the server such as:
Hostname – Hostname and Domain
DNS – For both IPv4 and IPv6
WebGUI – Username, Protocol (http/https), Port, Language
Time – Timezone, Current Time, NTP Options
After setting your choice of options click on Save.
Note: You can also change the default password by choosing the Password tab.
In Part 2 of Build Your Own Open Source NAS Device Using FreeNAS we’ll get the disks setup so our NAS can fulfill its big role. We’ll also test the FreeNAS installation to make sure that everything is working correctly.
About the Author
Dave Lawlor (MCTS, MCP, A+) has been working in the IT field since leaving the U.S. Army in 1996. Working his way up from printer hardware repair to running a corporate datacenter for a multinational corporation, Dave has seen many environments throughout the years. Focusing on web sites and search engine optimization the last few years, with the release of Server 2008 it has renewed his passion for the Wintel platform and server technologies. David also runs Windows-Server-Training.com where he posts free videos and walk-throughs for a variety of server technologies. David currently works as a freelance technical consultant and writer for a variety of companies in the Chicago area.
Author's Website: http://www.DaveLawlor.com
- How To Install Exchange Server 2007 in 13 Easy Steps
- Windows Server 2008: Install Active Directory Domain Services
- How to Install VMware ESX Server
- How to Install Windows Server 2008
- Install MySQL on IIS7 Server 2008
- How To Install Windows Small Business Server 2008
- A Security Primer: Do You Leave Your Front Door Open?
- Install DHCP Role on Windows Server 2008
- How To Back Up and Restore Configuration on CISCO Devices
- How to Install and Use Windows Live Writer – Windows Live Tools Beta 3