As we learned last week, NAS provides hard disk space that attaches to a data network and works as a file server
We took a closer look at FreeNAS — a free open source NAS software that 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.
If you haven’t already, check out what FreeNAS is all about and learn how to install it in Part 1 of Build Your Own Open Source NAS Device Using FreeNAS.
Now let’s get to the good stuff!
Now that the installation is complete and we have the general server settings done, we need to get disks setup so our NAS can fulfill its primary purpose in life.
1. Select Disks and then Management from the top menu.

2. From the Management tab you can see all the disks that are currently configured and add a new one by click on the plus sign in the lower right corner
3. In the dropdown next to Disk you can choose the hard drive you want to work with. I am going to setup both of the disks I have.
I am going to leave the rest of the options at default, but I want to mention the last one which is the Preformatted File System. If you have disks that are already formatted you can choose that format here. If they are unformatted just leave the default as you can format them later.
When done with your setting click Add. I am going to repeat this for the other hard drive I have on this virtual machine also.
4. Now select Disks and then Format from the top menu.
5. I am going to create a Mirror 1 Raid pairing with these drives, so I am going to choose the first disk in the Disk dropdown, and then in the File System dropdown I am going to choose SoftwareRaid.
Click on Format Disk to start the setup. After clicking Format you will get a warning that all data will be lost. If you are good with that click Ok. I am going to repeat this same process for the second drive.
6. From the top menu choose Disks, and then choose SoftwareRaid.
7. The RAID 1 tab should be selected, click on the plus sign in the lower right corner.
8. Put a name for your new RAID 1 drive next to Raid name, choose the Balance algorithm you want to use, and select the disks you want to add to the array. Then place a check in the box that says Create and initialize RAID and click on Add.
9. You will be taken back to the main RAID 1 tab now and have to click on Apply changes.
10. On the top menu choose Disks, and then Format.
11. In the Disk dropdown select the RAID drive we just created and depending on what you are going to use this for you might want to change the File System, but in our case where we are just using this for extra storage leave the default UFS in place.
If you want, give your volume a name and then click on Format disk. After clicking you will get a warning about erasing all data, click Ok to start the format.
12. From the top menu now select Disks, then Mount Point.
13. Click on the Plus sign to mount the RAID disk.
14. For the Disk dropdown choose the RAID drive you created, in the Partition dropdown we will leave the default; enter a name next to Share name. I will leave the rest of the settings as is and click Add.
15. You will be taken back to the Mount Point page where you are asked to Apply changes to confirm mounting of the disk. Click on Apply changes.
16. Now that we have the drive setup and mounted, let’s turn on the CIFS/SMB service so our Windows clients can access the drive. In the top menu click on Services, and then CIFS/SMB.
17. On the Settings tab click the box that says Enable then click Save and Restart at the bottom. I am going to leave all the other settings at their default. You can always come back at a later time and tweak for performance.
18. Click on the Shares tab and then click on the Plus sign.
19. To setup the share you need to enter a Name, Comment, and Path. The path is easily set by hitting the … button and choosing the top level path.
I am going to leave the other settings default, but there are some options there that might be of use so make sure you look through them. When you are done click Add.
20. You are then taken back to the Shares tab to confirm your selection. Click on Apply changes.
You have now successfully setup the drives as a RAID 1 drive and also setup a service/share to allow Windows clients to access the drive. Let’s test it out.
We can quickly and easily test this from a Windows Vista machine. I am going to go to Start and then Network. As you can see, the FreeNAS server is in my network browsing.
If I click on the FreeNAS server I can see the Data share that was setup.
From here I could map a drive or just setup a shortcut to access this drive.
This demo walked you through creating a RAID 1 shared NAS using the open source FreeNAS software.
FreeNAS is a very powerful software package and I only scratched the surface of what it can do with it. I will be using this server in some upcoming tutorials focusing on ISCSI and open source backup solutions.
I strongly encourage you to download and take a look at the feature set to see where you could use this low cost NAS solution.
Copyright © Train Signal Inc. All Rights Reserved.
HarshReality Says:
January 15th, 2009 at 5:19 am
Yoiur neglecting to mention that the embedded OS looses all changes when a power loss happens and the way to recover from such an event.
David Earle Says:
January 15th, 2009 at 10:56 am
I’m enjoying these articles and have set up my server using them. I had tried a similar posting for an earlier version but was unable to make it work. I’m waiting for the installment relating to Windows (XP & Vista) client interfaces. I’ve been able to do a direct backup using DeltaCopy Client in Vista but have been unable to do a task started backup.
A tutorial on setting up USB printer server functions would be nice, if that’s possible with freenas.
Thanks for the articles.
David
Oscar K Says:
January 17th, 2009 at 4:24 pm
Hi Dave
Just finished setting up a NAS by using your tutorial….It works great the system is up and running in no time (1 hour).
…thanks…
/Oscar
Gary Says:
January 22nd, 2009 at 8:27 pm
Hi Dave,
Great tutorial! I’ve set up my FreeNAS following your tutorial and it seems to work great! I’m using RSYNC and Delta Copy to make incremental backups to of my wifes Laptop running XP to a Raid1 setup and using RSYNC to then copy to an external USB drive. Now what? I have no idea how to restore files should her laptop harddrive crash. Any thoughts you anyone else can share? I find all kinds of stuff on the web about backing up, but nothing about restoring.
Morely Dotes Says:
January 30th, 2009 at 3:57 pm
“HarshReality Says:
Yoiur neglecting to mention that the embedded OS looses all changes when a power loss happens and the way to recover from such an event.”
Mine does not lose all changes, unless the power failure happens before I hit Apply Changes.
In any event, after hitting Apply Changes, exporting the configuration to an XML file on another device (a USB thumb drive would serve, the XML file is tiny) would allow you to restore the changes if they did get lost.
Carlo Says:
January 30th, 2009 at 9:32 pm
Hi,
Just set it up. Works like a charm. Thanks for the tutorial. No complaints.
Thanks again.
Hasan Says:
March 10th, 2009 at 5:55 am
Hello,
Thanks for Tutorial.
I have a question I hope you can help.
If I have mount point “Data” , and I want to add more space to it, what would you do? … is it possible?
The reason I want the same mount point space to be expanded, is that it will be used by an archiving software as a mapped drive.
Andrew Says:
April 27th, 2009 at 5:18 pm
I am having a bit of trouble, I used your tutorial to set up freenas and my computer recognises that the NAS is there, but says it only has 78 MB, (it has 6 1TB drives in it) Any suggestions on where to start, i am racking my brain trying to figure this out and i am getting nowhere
Brad Says:
July 28th, 2009 at 10:48 am
Hello,
Thanks. However, can you please talk about how to do authentication with FreeNAS shares? I am having problems connecting to FreeNAS with my Mac and I would really like to have authentication enabled, not just Anonymous access. I can’t find anything on authentication other than to manually edit the /var/etc/samba.conf file.
venom Says:
August 17th, 2009 at 5:02 pm
Is it possible to add a external usb hard drive to FREENAS………….If so please explain and THANK YOU in advance.
Rob Says:
September 14th, 2009 at 8:33 am
Rock and Roll! I just set mine up.
1.5 TB in Raid 1 (3 TB on two drives) with a 30GB boot drive (couldn’t get my bios to boot from a USB key).
Now I need to figure out how to make it accessible from the web so I can host my media files and stream when I travel.
Jason Says:
September 24th, 2009 at 10:58 am
Hi Dave,
This morning i was looking for a cost affective NAS Solution and came across your Article on Build Your Own Open Source NAS Device Using FreeNAS.
and i will have to say it was one of the best tutorials i have seen in a very long time, you get straight to the point & deliver end results with little fuss.
I hope to see many more article in the future.
Hitesh Says:
December 3rd, 2009 at 3:18 pm
Hi,
This is awesome tutorial! I love it.
This is what exactly I was looking for.
I want to setup free NAS server and storage 1 TB using this tutorial) with AIX 5.3 that i can support 2 VIO server and couple of LPARs.
What is the best way to implement this with AIX. I saw windows client were used to access to drives.
what do I need on AIX to see the ISCSI disk.
what storage is supported by free NAS and AIX OS.
Please guide…
Again, this is really nice tutorial I ever seen.
You help will be much appreciated.
Thanks
Hitesh
Lewis Says:
February 7th, 2010 at 7:38 pm
Thanks for the step by step. Setting up freeNAS was very straight forward. However, I ran into issues trying to configure 2 drives properly for RAID 1. Most other help pages I visited on this subject were a little vague on the sequence of steps. Yours were spot on and we’re RAIDing away now for the photo library.
Many Thanks,
Lewis
Leo Says:
February 17th, 2010 at 12:18 pm
@David Earle
There is a document: http://www.instructables.com/id/FreeNAS_as_a_Print_Server/
combine this with the instruction at the freenas forum.
Worked for me: Canon MP600
Mike Says:
March 15th, 2010 at 3:38 pm
Thank you for this good and clear tutorial. Especially on the RAID config.
Up and running!