Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators
FreeNAS is an open source network-attached storage (NAS) operating system based on BSD and the
ZFS filesystem with integrated RAID support. FreeNAS operating system is totally based on BSD and
can be installed on virtual machines or in physical machines to share data storage via a computer
network.
Using FreeNAS software you can easily build your own centralized and easily accessible data storage at
home and same can be managed via a dedicated web interface originally written in PHP language, later
re-written using Python/Django language from scratch.
FreeNAS supports Linux, Windows and OS X and numerous virtualization hosts such as VMware and
XenServer using protocols such as CIFS (SAMBA), NFS, iSCSI, FTP, rsync etc.
Home users can build FreeNAS storage to store there videos, files and stream from FreeNAS to every
network devices or to smart TVs etc. If you are planning to build torrent site, you can use FreeNAS to
setup one for you. There are several plugins available for FreeNAS which is as follows.
Features of FreeNAS
In this FreeNAS 4-article series, we will cover the installation and configuration of FreeNAS with
storage and in later articles will cover setting up a video streaming & torrent server.
To set up a FreeNAS operating system, you will need to download latest stable installation ISO Image
(i.e. version 9.2.1.8) from the FreeNAS download page, or you can use the following links to download
image for your system architecture. Ive included download links for CD/DVD and USB bootable
images of FreeNAS, so select and download images as per your requirements.
CD/DVD Images
USB Images
1. Now its time to install and configure FreeNAS. As every Operating system FreeNAS too have the
similar steps for installation and it wont take more than 2 minutes to Install.
2. After you download FreeNAS ISO image from the links above, if youve a CD/DVD drive, burn that
ISO image to a disc and then boot it, or if youre using USB Image you can directly boot it.
3. After booting the system with FreeNAS image, by default it will start the installation, if not we have
to press enter to continue the installation.
Booting FreeNAS
4. For installing FreeNAS, we have to choose Install/Upgrade. This will install the FreeNAS if its not
existed.
Install FreeNAS
5. In this step, we need to choose where FreeNAS should be installed. We have total 9 drives, so here
Im using first 5 GB ada0 drive for my FreeNAS installation and other 8 Drives are used for Storage
(will be discussed in next part of this series).
Choose ada0 drive from the listed drives and press Enter to continue.
Choose FreeNAS Install Drive
6. After selecting the drive, on the next screen you will warned for data loss, If you have any important
data in that selected drive, please take a backup before installing FreeNAS on the drive.
After pressing Yes all the data in that drive will be destroyed during installation.
Warning: Please take a backup of selected drive before starting FreeNAS setup.
7. After few minutes it will take us to the end of the installation process. Choose OK to reboot the
machine and remove the installation Disk.
FreeNAS Intallation Completed
8. On the next screen, choose the 3rd option to reboot the machine and remove the setup Disk.
Reboot System
9. After FreeNAS setup completed, we can get the console setup menu to add the DNS IP Address to
access the FreeNAS web dashboard.
By default at first it will assign a dynamic IP address and we have to configure it manually. Here we
can see that, weve got a dynamic IP address as 192.168.0.10 now we have to configure our static ip.
FreeNAS Console Setup
Note: First let me configure the DNS, I have a valid name resolver at my end, so let me configure my
DNS settings.
10. To configure DNS choose number 6 and press enter, then we have to enter the DNS information
such as domain, IP address of DNS server and Press Enter.
Configuring the DNS settings before IP Address will resolve the name from DNS. In your side, if you
dont have a valid DNS server you can skip this step.
Configure DNS for FreeNAS
11. After configuring DNS settings, now its time to configure network interface. To configure the
interface, press 1 and select the default first interface.
Finally, at last choosing IPv6 no and pressing enter will configure the interface and get saved
automatically.
Configure FreeNAS Network
12. After configuring network interface settings, you will see that the IP address has been changed to
192.168.0.225 from 192.168.0.10. Now we can use this address to access FreeNAS GUI from any one
of the web browser.
13. To access the FreeNAS GUI interface, open the web browser and enter the ip address which we had
used to configure the interface setup.
http://192.168.0.225
At first login, we need to define a PASSWORD for the root user to access GUI interface. Set a strong
password for your storage server and continue login.
14. After login, you will see informations about FreeNAS server such as domain name, version, total
memory available, system time, up time, system load, etc.
FreeNAS Server Information
Thats it, In this article, weve installed and configured the FreeNAS server. In the next article we will
be discussing on how to configure FreeNAS settings in step by step process and how can we define
storage in FreeNAS, till then stay tuned for updates and dont forget to add your comments.
Configuring FreeNAS to Setup ZFS Storage
Disks and Creating NFS Shares On FreeNAS
Part 2
by Babin Lonston November 27, 2014
Download Your Free eBooks NOW - 10 Free Linux eBooks for Administrators
In our previous article, weve shown you how to install FreeNAS server. In this article we will cover
configuration of FreeNAS and setting up storage using ZFS.
Requirements
After installation and configuration of FreeNAS server, following things needs to be done under
FreeNAS Web UI.
After making above changes in FreeNAS Web UI, we have to save the changes under System ->
Settings -> Save Config -> upload Config -> Save to keep the changes permanent.
My Server Setup
My Client Setup
For using FreeNAS, we have to configure with proper setting after the installation completes, In Part 1
we have seen how to install FreeNAS, Now we have to define the settings that we going to use in our
environment.
Step 1: Configuring FreeNAS Basic Settings
1. Login to the FreeNAS Web UI, once you login you will see Settings and System information TAB.
Under Settings, change the Protocol of our web interface to use whether http/https and set the ip
address that we going to use for this GUI Interface and also set, timezone, Keyboard Map, Language for
GUI.
After making above changes, hit on Save button at the bottom to save the changes.
2. Next, setup email notification, go to the Email tab under the Settings. Here we can define the email
address to get the email notification regrading our NAS.
Before that, we have to set the email in our user account, Here Im using root as my user. So switch to
Account Menu in Top. Then choose Users, here you will see the root user, selecting root user you will
get the modify option in left side bottom corner below the users list.
Enable Email Notifications
Click on Modify User tab to enter the email address and password of the user and click OK to save the
changes.
Enter the the username and password for authentication and save the changes by clicking on Save.
4. Now we need to enabled Console message in the footer, to do this go to Advanced option and
choose Show console messages in the footer and save the settings by clicking on Save.
Enable Console Message
5. To add ZFS storage devices, go to the Storage Menu in the Top to define the ZFS volumes. To add a
ZFS volume, select ZFS Volume Manager.
Next, add a new name for your volume, Here Ive defined as tecmint_pool. To add the available disks,
click on + sign and add the disks. There are totally 8 drives available now, add them all.
Add ZFS Storage Disks
6. Next, define the Raid levels to use. To add a RaidZ (same a Raid 5), click on drop down list. Here
Im adding two disk as the spare drive too. If any one of the disk fails spare drive will automatically
rebuild from the parity informations.
7. To add a RAIDz2 with double parity, you can choose the Raidz2 (same as RAID 6 with double
parity) from the drop menu.
Define Raid6 on ZFS Disks
8. Mirror means cloning the same copy of each drive with better performance and data guarantee.
10. Here Im going to use RAIDZ2 for my setup. Click on Add Volume to add the selected volume
layout. Adding the Volume will take little time according to our drive size and system performance.
Add ZFS Disks
11. After adding volumes, you will get the volume list as shown below.
12. Data-set is created inside the volume, which we have created in above step. Data-sets are just like
folder with compression level, Share type, Quota and much more features.
To create a Data-set choose the volume tecmint_pool at the bottom and choose Create ZFS data-set.
Choose a data-set name, here Ive chosen tecmint_docs, and select compression level from the list and
select a share type, here Im going to create this share for a Linux machine, so here Ive selected the
share type as Unix.
Next, enable Quota by clicking on advance menu to get the Quota. Let me choose 2 GB as my Quota
Limit for this share and click on add Data-set to add.
Create ZFS Datasets
13. Next, we need to define permissions on tecmint_docs share, this can be done by using Change
Permission option. To do we have to choose the tecmint_docs, at the bottom and define the
permissions.
14. Once ZFS datasets are created for Unix share, now its time to create a data-set for windows. Follow
the same instructions as explained above, the only change is to select share type as Windows while
adding the data-set. Those shares can be accessible from windows machines.
15. To share ZFS datasets on Unix machines, go to Sharing tab from the Top menu, choose the
Unix(NFS) type.
Share ZFS Datasets
16. Next, click on the Add UNIX (NFS)Share, a new window will popup to give a comment (Name)
as tecmint_nfs_share and add authorized networks 192.168.0.0/24. Note, this will be differ for your
network.
Next, select All Directories to allow to mount every directory under this share. At bottom choose the
Browse and choose the directory tecmint_docs which we have define for the data-set before and then
click on OK.
Add Unix Share
17. After clicking on OK a confirmation message will prompt and ask Would you like to enable this
service will be shown. Click Yes to enable the sharing. Now we can see that NFS service has been
started.
NFS Share Enabled
18. Now login to your Unix client machine (Here Ive used Ubuntu 14.04 and with IP Address
192.168.0.12), and check whether NFS share from FreeNAS works or not.
But, before checking FreeNAS NFS shares, your client machine must have NFS package installed on
the system.
19. After NFS installed, use the following command to list the NFS share from FreeNAS.
# showmount -e 192.168.0.225
20. Now, create a mount directory under /mnt/FreeNAS_Share in Client machine and mount the
FreeNAS NFS Share in this mount point and confirm it using df command.
21. Once NFS share is mounted, go inside that directory and try to create a file under this share to
confirm that the root user having permissions to this share.
# sudo su
# cd /mnt/FreeNAS_Share/
# touch tecmint.txt
Create File in NFS Share
22. Now go back to the FreeNAS web UI and choose Settings under system TAB to save the changes.
Click on save config to download the configuration file.
After clicking on upload config system will reboot automatically and our settings will be save.
FreeNAS Rebooting
Thats it! we have configured the storage volume and defined a NFS share from FreeNAS.
Conclusion
FreeNAS provide us Rich GUI interface to manage the Storage server. FreeNAS support a large file-
system using ZFS with data-set which included compression, Quota, permission features. Lets see how
to use the FreeNAS as a Streaming server and torrent server in future articles.