Sunday, 18 August 2013

How to Set Up and Configure FreeNAS


I have been playing around with old hardware recently and one of the things I have done is install and set up FreeNAS NAS storage. This tutorial will show you how. Before we do anything you must first find out your network configuration. In windows open up a command prompt and type ipconfig /all. In Linux open up a terminal and type ifconfig. Write down your IPv4 address, default gateway, subnet mask and DNS servers as we will be using this information later. Now we need to get our hands on a copy of FreeNAS. Once downloaded burn a copy to CD. The next thing you have to do is decide where you are going to install it. I chose an old computer I had lying around (thanks Rob) but you could just as well install it within a virtual machine. The computer had 10Gb of storage and I installed another 1.5Tb. FreeNAS can be installed on a USB penstick thus saving your hard drive for network storage but since I had the 10Gb disk I used that instead. Insert the CD into your computer and allow the software to install. Once installed you will arrive at the console setup which will give you the URL to access your installation via a web interface. For example mine was 192.168.1.12. Open up your browser of choice and enter your FreeNAS URL. When prompted the default username and password are: admin and freenas (we will be changing this later) You will then be faced with the FreeNAS interface where you can configure your server. Network The first thing you need to configure is your network interface and you do this by using the network tab. Click on the network tab and you will be presented with more settings. In Global Configuration choose a hostname, enter your default gateway (e.g 192.168.1.1) and your nameserver (usually the same as your default gateway). Once done press ok. Next click on Interfaces and then add interface. You need to set your IPv4 address as static so it doesn't change. So for example my network goes from 192.168.1.1 - 192.168.1.255 so I chose 192.168.1.3. When you set this the web interface from now on will always be the address you enter so mine is now set to 192.168.1.3. Also set your netmask. Mine was 255.255.255.0 (so /24). Users Next thing we need to do is set the users who will be able to access our shares. Click on Account (left menu) and go to Users - add user. Add a username and a password (make sure this is the same as the user on your computer that will be accessing the shares). Now expand Account - Groups - add group and add a new group who will be able to access the shares. Final thing is to add your username to the new group. Click on Account - Groups - view all groups and then find the new group and click on members. Add yourself to the new group. Storage Now we come to adding your storage. Click on the storage tab and then add volume. Choose volume name, disk and filesystem type (use ZFS). Once done click add volume. The disk should now be visible with ONLINE next to it. Next we need to set the permissions. Click on Change Permissions and then chose who owns the file (should be set to your username). Then in owner group add the group you set up earlier and then set the permissions as required. Once completed press save. Sharing We will now set up the shares. Click on the sharing tab. If you will be sharing to Windows machines click on Windows, Apple for Apple and Unix for Linux. Add the share and set up as required. Services We now have to make sure that we can see the shares over the network. Click on the services tab at the top of the screen. For windows turn on CIFS and for Linux NFS. Your FreeNAS server is now set up. Accessing Shares over the network For windows: right click on computer (Windows 7) and select map network drive. Browse for the share. For Linux: enter the following line into the fstab file 192.168.1.3: /mnt/MyDisk1 /media/dev/MyDisk1 nfs hard, 0 0 where:  
  • 192.168.1.3 is the static address of your FreeNAS server
  • /mnt/MyDisk1 is the path to your FreeNAS storage
  • /media/dev/MyDisk1 is the mount point
  • nfs is the filesystem
  One final thing is to change the default password to the web interface. To do this expand Account - My Account - Change Password and enter your new password. Do not forget this!!
Here at ComTech I spend a large portion of my time protecting my clients data. I can advise on backup strategies that suit you or your business and then implement and maintain them for you whether it be a Windows, Linux or FreeNAS solution. Please go to http://www.comtech247.net for more information.
 

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...
Us Online Casino