How to install and configure Free NAS storage system


This post explains how to install and configure Free NAS (Free Network attached Storage) Server. It is a very useful tool for sharing UNIX, apple and windows shares over networks. And it is very easy to install and configure too.

Installation:

Here for testing we will install FreeNAS in a VMware instance. The specifications are given below. You will need a dhcp server installed in your network.
FreeNAS1:
RAM – 1024M
Processor – Intel(R) Core(TM)2 Duo CPU T6400 @2.00GHz
Hard Disk (IDE) – 2gb
Hard Disk (IDE) – 10gb
Hard Disk (IDE) – 12gb
cdrom – FreeNAS-8.0-RELEASE-i386.iso
Network adaptor-1 – (bridged)
Network adaptor-2 – (Host Only)
Display – Auto detect

FreeNAS-1

We will install and configure a FreeNAS machine with following storage shares.

We have two disks.

  1. One of size 10Gb
  2. One of size 12Gb

We will create two shares

  1. One for unix systems
  2. One for windows systems

Our shares will be as follows

  1. /mnt/data1 type unix of size 10Gb
  2. /mnt/data2 type windows of size 12Gb

We will do the following tasks

  1. Mount /mnt/data1 to a Redhat Linux Enterprise Server 5 Machine IP 192.168.58.19
  2. Mount share named “data2” to Wndows 7 machine with IP 192.168.58.78

Check the permissions :

We will check read and write permissions of both shares on mounted systems.

Check the reports :

We will check the reports of memory usage, average load etc from FreeNAS web interface.

Mounts :

We will see how to mount the linux and windows shares permanently.

Step 1:

After starting the VMware FreeNAS vm, you will be prompted as follows:

FreeNAS-2

Step-2

Select 1. or wait for the default one to proceed automatically or select from menu for others.

FreeNAS-3

Select 1 and press ok to install.
Step 3:

FreeNAS-4

Normally we install FreeNAS into a usb device which has size of less than 2Gb. Because if u install FreeNAS in a partition of 10 GB,  those 10 GB cannot be used for anything else. So always install FreeNAS in a usb drive or a partition of less than 2Gb. So we will install FreeNAS in ada0 which is of size 2 GB.

Step 4:

FreeNAS-5

Press yes to proceed with installation.

Step 5:

FreeNAS-6

Installation in progress. Unzipping data.

Step 6:

Installation completed.

FreeNAS-7

Press ok to continue.

FreeNAS-8

Step 7:

FreeNAS-9

Change the settings of cdrom in vm’s settings from “use iso file” to “use physical drive”.

Step 8:

Start the vm.

FreeNAS-10

Press F1 or wait for the default one to proceed.

Step 9:
You will be prompted again. This time for select the boot menu.

FreeNAS-11

Step 10:
FreeNAS is success fully booted. The IP addresses for the Web interface will be listed.

FreeNAS-12

Step 11:
Access the web interface from your browser.

FreeNAS-13

Step 12:
Give the credentials

Username : admin

Password : freenas

Step 13:

When you are logged in successfully, it will show System information page.

FreeNAS-14

Step 14:
Now we will create storage volumes which we will use for sharing.

FreeNAS-15

Select storage. You can see no volumes are defined.

Step 15:

FreeNAS-16

Click on create volumes(in black box). Now a small window will pop up showing the disks in your system.   We have ada1 of 10G and ada2 of 12G.

Step16:

FreeNAS-17

Now we’ll create a volume named data1 on our 10Gb ada1 disk. You can either use UFS or ZFS. ZFS needs more RAM. It has more functions also. Now click on add volume.

Step 17:

FreeNAS-18

Now you can see volume data1 is create with path /mnt/data1. You will lose some space for writing headers.

Step 18:

FreeNAS-19

We will create a storage volume data2 on the other ata2 disk of size 12G in the same manner.

Step 19:

FreeNAS-20

Now we have two storage volumes. data1(/mnt/data1) and data2(/mnt/data2). We will use one for unix share and one for windows share.

Step 20:
For using these volumes as shared disks, we need to create corresponding shares. Using FreeNAS we can  create there type of shares. Unix, Windows and Apple.

FreeNAS-21-2

Now goto sharing tab(in small box). See that there is no shares defined yet.

Step 21:

Creating a Unix/Linux share: Go to the Linux tab on sharing section. Now there are no shares defined. Click on add UNIX share button to create one.

FreeNAS-21

Step 22:

FreeNAS-22

Now a new pop up window appears where you can define parameters for share. Comment you can give as unix(not imp). We are using our share data1 for linux. So select path to /mnt/data1. Give the IP/CIDR of the destination machine which the share to be mounted. And select other permissions according to your requirements. And click OK to create the share.

Step 23:

FreeNAS-23

The unix share is created.

Step 24:

Creating a windows share.

FreeNAS-24

Click on windows tab in sharing section. You can see now share is defined yet. Click on add Windows share to create one.

Step 25:

FreeNAS-25

As we did for the unix share configure the windows share also. The windows share will be named as “data2” (here). We will use /mnt/data2 volume for windows share. Give browsable permissions and the destination IP details. Configure other parameters as required. Click OK to create windows share.

Step 26:

Now you can see that the windows share is created

FreeNAS-26

Step 27:

Now, we have created both the Unix and Windows shares. For accessing these shares from unix and windows machines we need to start two services. Unix/Linux shares are mounted using NFS service and Windows shares using CIFS. We need to start these services.

FreeNAS-27

Step 28:

Setting Default Gateway: If you have a dhcp server in your service all your Ip’s, gateway, nameservrs will be set automatically. I strongly recomments using dhcp server.

FreeNAS-28

Step 29:

Chaning the permissions of storage device. Goto “storage” page and in “active volumes” tab the volumes will be listed. You can change the permissions as required.

FreeNAS-29

Step 30:

Now all the volumes and shares are created and defined. Now we need to mount the shares to corresponding destination system.

Mounting the Unix share. We are mounting unix share /mnt/data1 to destination system 192.168.58.19.

Login to 192.168.58.19 and execute the following command.

Execute the following command to mount.

[root@server ~]# mount 192.168.58.131:/mnt/data1 /mnt

Check whether the share is mounted or not

[root@server ~]# mount

/dev/sda2 on / type ext3 (rw)

proc on /proc type proc (rw)

sysfs on /sys type sysfs (rw)

devpts on /dev/pts type devpts (rw,gid=5,mode=620)

/dev/sda1 on /boot type ext3 (rw)

tmpfs on /dev/shm type tmpfs (rw)

/dev/hdc on /media type iso9660 (ro)

none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

192.168.58.131:/mnt/data1 on /mnt type nfs (rw,addr=192.168.58.131)

So it is mounted.

Now we will go inside the directory and check the read and write permissions.

[root@server ~]# cd /mnt/

Creating a file (write):

[root@server mnt]# touch test_writing_permission

Listing files (read):

[root@server mnt]# ls

test_writing_permission

Writing data to the file (write):

[root@server mnt]# dd if=/dev/zero of=test_writing_permission bs=1024 count=100000

100000+0 records in

100000+0 records out

102400000 bytes (102 MB) copied, 17.4445 seconds, 5.9 MB/s

Checking the size:

[root@server mnt]# du -h test_writing_permission

98M test_writing_permission

[root@server mnt]#

Everything is fine. All the permissions are working.

FreeNAS-30

Step 31:

Mounting the Windows share “data2” to 192.168.58.78.

Searching the windows shares in FreeNAS system from Windows destination system.

FreeNAS-31

Step 32:

Windows share is listed.

FreeNAS-32

Step 33:
Mounting the windows share permanently

FreeNAS-33

Right click on the data2 share and click on map network drive.

FreeNAS-34

Select the mount point (Z here) and click finish.

Step 35:
Now the share is mounted perfectly.

FreeNAS-35

Step 36:
Testing write permissions by creating a folder.

FreeNAS-36

Step 37:
Testing permissions by creating a file.

 

FreeNAS-37

Step 38:
Checking the reports :

Report1 : CPU usage, Physical Memory Usage, System load and Swap utilization

FreeNAS-38

Report2: Processes, Disk space (data1) and Disk space (data 2)

FreeNAS-39

Step 39:
Changing the Timezone

FreeNAS-40

Step 40:

Setting nameservers. Use dhcp instead.

FreeNAS-41

With this configuration of FreeNAS has been completed.

About Alex Hunt

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in VMware Software India Pvt Ltd as Operations System Engineer (vCloud Air Operations). I have around 5 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in Linux/CentOS. Bookmark the permalink.

One Response to How to install and configure Free NAS storage system

  1. vinod mehra says:

    hi alex your artical is very informiticals and based on 4 plus exp as vmware admin what knowledge is required and could u plz mail to me some interview question based on 4 plux exp in vmware admin

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s