Subscribe to the TST RSS Feed

Build Your Own Open Source NAS Device Using FreeNAS – Part 1

Dave LawlorNAS 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)

Download FreeNAS

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.


Install FreeNAS

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.



Build Your Own Open Source NAS Device Using FreeNAS - 1

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.



Build Your Own Open Source NAS Device Using FreeNAS - 2

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.



Build Your Own Open Source NAS Device Using FreeNAS - 3

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.



Build Your Own Open Source NAS Device Using FreeNAS - 4

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.



Build Your Own Open Source NAS Device Using FreeNAS - 5

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.



Build Your Own Open Source NAS Device Using FreeNAS - 6

7. This takes you back to the Install menu, choose Exit.



Build Your Own Open Source NAS Device Using FreeNAS - 7

8. Now from the Console setup menu select 7 Reboot System.



Build Your Own Open Source NAS Device Using FreeNAS - 8

9. Confirm that you want to reboot the system by selecting Yes.



Build Your Own Open Source NAS Device Using FreeNAS - 9

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.



Build Your Own Open Source NAS Device Using FreeNAS - 10

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.



Build Your Own Open Source NAS Device Using FreeNAS - 11

12. Type in the static IP address you want to use and then select OK.



Build Your Own Open Source NAS Device Using FreeNAS - 12

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.



Build Your Own Open Source NAS Device Using FreeNAS - 13

14. Enter your default gateway and then select OK.

Build Your Own Open Source NAS Device Using FreeNAS - 14

15. You now will enter the DNS server you want the FreeNAS installation to use. After entering the IP choose OK.



Build Your Own Open Source NAS Device Using FreeNAS - 15

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.

Build Your Own Open Source NAS Device Using FreeNAS - 16

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.



Build Your Own Open Source NAS Device Using FreeNAS - 17

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:

username: admin
password: freenas



Build Your Own Open Source NAS Device Using FreeNAS - 18

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!



Build Your Own Open Source NAS Device Using FreeNAS - 19

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.



Build Your Own Open Source NAS Device Using FreeNAS - 20

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.



Build Your Own Open Source NAS Device Using FreeNAS - 21


Stay Tuned!

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.


Related Posts:

11 Responses to “Build Your Own Open Source NAS Device Using FreeNAS – Part 1”

  • Tyler Says:

    I have a copy of Datacore Sanmelody lite $99 I have never set up a san I want to use vmware HA options to vmotion my live vm’s from one box to another

  • Tyler Says:

    there is also xtravirts XVS free virtual san software
    http://engineering.xtravirt.com/products/phd-technologies/xtravirt-virtual-san.html

    The Xtravirt Virtual SAN appliance for VMware ESX3 Server is a free solution to provide the benefits of shared VMFS storage without the cost of a SAN. Utilises otherwise unused local storage in the ESX server to facilitate enterprise level features such as vMotion, DRS and HA.

    All volume data is synchronously replicated between hosts, providing full fail-over capability with data integrity in the event of host, disk or appliance failure. The appliance has been designed to be as easy to configure as possible, and full documentation is provided.

  • Gary Sims Says:

    Great post. I have blogged about it on the LearnFreeNAS.com web site.

    Thanks, Gary.

  • Tyler Says:

    Yes it is nice Gary but he did not talk about HA or auto failover of his vm’s and virtual sans for better utilization and energy saving.

  • Gary Says:

    Hi,

    I’m currently trying to set up a home NAS and have already downloaded and burned a copy of FreeNas. Your article is ABSOLUTELY perfect for me. When will part 2 be ready? Thank you so much!

    Gary

  • Dave Lawlor Says:

    Gary – I am glad you like it, the 2nd part should be up now and you can find it at
    http://www.trainsignaltraining.com/build-your-own-open-source-nas-device-using-freenas-part-2/2009-01-05/

    Tyler- You are correct I did not go into some of the more advanced features as I have to keep my articles around 1000 words and like to keep them targeted to a larger audience. You do sound like you know quite a bit, if you are interested in writing an article that goes further into the subject please contact Kasia at the “Contact Me” form, she is always interested in new authors.

    Dave

  • Lers Says:

    Hi Dave,

    I have to say, excellent article… I managed to set up Samba and Transmission (bittorent client) in no time using your second guide…
    You made my day…
    Incredible what you can do with an old Celeron 1Ghz, 512MB 133Mhz SDRAM, IDE CDROM, 2×10GB IDE HDD (for testing for now) and a 128MB USB stick… I’m booting off CDROM for now… As I said, I’m just playing with it…
    Thanks again…

  • Allan White Says:

    I only have a moment, but will check back later: any suggested hardware configs? I’m really tempted by the DIY route.

  • David Lawlor Says:

    Allan-

    The real value of the DIY is that it works reliably on some really old equipment, I recently set one up on a Pentium 4 that was destined for the trash heap. Usually you are more limited by the FreeBSD OS that FreeNAS is built on so if you have an old PC that can run FreeBSD you should be fine. If your looking for definitive configs out there, the FreeNAS wiki has some and there are others in their forum.

    http://www.freenas.org/index.php?option=com_openwiki&Itemid=30&id=freenas_users_hardware

    Hope that helps,
    Dave

  • Grant Says:

    Hi,

    Is there a way to create a single share with multiple disks (not raid)? I’ve just added a second disk

  • hi, looks interesting and certainly a good alternative to the ubuntu fileserver which might be a bit more complicated for some users. I won’t even mention the windows based server systems… which are simple not reliable enough, too much overkill, and ble ble ble..

Leave A Comment: