Build a Simple NAS Setup with FreeNAS 8By Gary Sims
FreeNAS, the open source Network Attached Storage (NAS) solution, has seen lots of changes in the last couple years since iXsystems invested heavily into the project.
FreeNAS 8, which was released in early 2011, is a very different beast to its predecessor. FreeNAS 0.7 had minimal system requirements (in terms of memory and CPU power), and was intended for the home and small office environment. However FreeNAS 8 is aimed squarely at the professional NAS market. The minimum memory requirement is 4GB (compared to 0.7′s 256MB), and for production systems at least 6GB is recommended. This is because FreeNAS 8 prefers ZFS over the simpler UFS used in FreeNAS 0.7. If you don’t have a monster server with 6GB of RAM, it is still possible to use FreeNAS 8 with more modest hardware, but without ZFS. Here are more details on the FreeNAS hardware requirements.
In this tutorial we will go through the steps needed to boot and install FreeNAS 8 on a modest system with two hard drives. The first hard drive is a small 2GB drive to hold the FreeNAS operating system and the second a 2TB drive for serving data to the network.
FreeNAS 8 Setup Guide
Get hold of a copy of FreeNAS 8 from freenas.org. FreeNAS comes in 32 bit and 64 bit flavours so make sure you download the right .ISO image for your hardware. Burn the .ISO files onto a CD. If you don’t have software to burn .ISO files, then imgburn.com is a good place to start.
Put the CD into the PC that you want to use for FreeNAS, and boot it. The chances are that the machine will boot from the CD, however if it doesn’t then you will need to enter the BIOS (normally by pressing the DEL key during the initial boot phase) of the PC and configure the machine to boot from CD.
Wait for the setup menu to appear and press 1 to “Install/Upgrade to hard drive/flash device, etc.” Select the hard drive where FreeNAS will be installed. This is likely to be ad0 (the first hard drive in FreeBSD-speak). Confirm that you would like to continue with the installation.
Note: FreeNAS 8 can also be installed on a USB flash disk. This saves a disk slot which can be used for data storage.
The install should only take about 30 seconds. When prompted remove the CD, hit the Enter key and select option 3 to “Reboot System.” The system will now reboot from the first hard drive (or the USB key).
Once booted, you will see the Console Setup menu. From here you can configure the networking, configure DNS, reboot the system, and so on. Towards the bottom you will see the current IP address of the server, under where it says “You may try the following URLs to access the web user interface.”
Note down the address (eg. http://192.168.1.167) and move to a PC which is connected to the same network as your FreeNAS server. Open a web browser and enter the address of the FreeNAS server.
Setting a Static IP Address
It is often useful to have servers on fixed addresses rather than relying on DHCP. Click the “Network” icon in the toolbar below the FreeNAS logo. Click “Interfaces” in the “Network Settings” tab which has now appeared in the right pane.
There will be one (or possibly two) interfaces listed. Click “Edit” on the primary network interface. Enter a name for the network card in the “Interface” field (you can just copy what is in the NIC field). Un-tick “DHCP” and enter the static IP address you wish to use in the “IPv4 Address” field. Select the appropriate netmask from the “IPv4 Netmask” drop-down, probably “/24 (255.255.255.0).” Click “OK.”
Reboot the server using the “Reboot” option at the bottom of the left hand menu. In the web browser enter the new static IP address into the URL bar.
Before a disk can be used it needs to be added to a Volume. Besides the small disk for the FreeNAS system, my test server has a single 2TB hard drive for data. To configure the storage, click the “Storage” icon in the toolbar below the FreeNAS logo. Click “Create Volume.” Enter a “Volume name” (eg. “Data”) and click the disk (ada1 on my test server) from the list. Choose “UFS” and click “Add Volume.”
Add a User
Unless you want to grant universal unrestricted read and write access to your data over the network, you will need to define one or more users who are allowed to access the FreeNAS server. The first step is to add a Group to which all users who access the FreeNAS server will be members. To do this, click “Account” in the left menu tree. Click “Group” and then “Add Group.” Enter a “Group Name” (eg. freeusers) and click “OK.” To add a user, click “Users” and then “Add User.” In the “Add User” dialog enter the “Username,” “Full Name” and “Password” (twice), and click “OK.”
Click “View All Users” and then click “Auxiliary Groups” for the new user. Find the “freeusers” group and click the double chevron (“>>”) to add this user to the group. Click “OK.”
Before configuring the network shares, the storage needs to be configured so that the “freeusers” group has write access. Click the “Storage” icon in the toolbar and then click the “Change Permissions” icon (the one with the key). Set the “Owner (user)” to “nobody” and the “Owner (group)” to “freeusers”. Tick the “Write” permission for “Group”, tick “Set permission recursively” and click “Change.”
Sharing over the Network
Click “Sharing” on the toolbar below the FreeNAS logo. Click “Windows” in the “Shares” tab and then click “Add Windows Share.” Enter a “Name” for the share and a “Comment.” Enter the path to the disk in the “Path” field. This path is made up of “/mnt/” + the volume name entered when the storage was added; for example, “/mnt/Data”. You can also use the “Browse” button to find the volume. Click “OK” to create the network share.
Click “Services” on the toolbar below the FreeNAS logo and then click “CIFS” (Common Internet File System) to switch the service from “Off” to “On.”
Connect from Windows
On a Windows 7 machine double click “Computer” (or click on “Computer” from the Windows start menu). In the address bar enter “\\freenas\data”. Enter the username and password from the “Add a User” section above and click “OK.” The PC is now connected to the FreeNAS server with access to read and write files.
The steps are very similar for a Windows XP machine. Double-click “My Computer” (or click on “My Computer” from the Start menu). In the address bar enter “\\freenas\data”. Enter the username and password from the “Add a User” section above and click “OK.” The XP PC now has read and write access to the FreeNAS server.
About the Author
Gary Sims has been a technical writer and author since 2003. He is an expert in system administration, networking protocols and several programming languages, previously serving as a software engineer for 10 years. He has a Bachelor of Science in business information systems from a UK University.
Author's Website: http://garysims.co.uk/
- Build Your Own Open Source NAS Device Using FreeNAS – Part 2
- How to Setup iSCSI Drive Using FreeNAS
- Build Your Own Open Source NAS Device Using FreeNAS – Part 1
- How to Setup User Authentication in FTP 7 on IIS 7.0
- How to Setup Your Own FTP Server
- How to Setup a Small Home Network — Part 1
- How to Setup a Small Home Network — Part 2
- How to Share Files between Mac and PC — Leopard and Vista
- Will Windows 7 Work for You? Find Out in 3 Simple Steps!
- Cisco CCNA: Get Up to Speed with Simple Networks and SNMP