Category Archives: FreeNAS

FreeNAS 0.8 Beta 2/12/10 – Installation and Basic Configuration


Back in August I explained how to Install FreeNAS 0.7 Network Attached Storage Server on to a low specification PIII PC with plenty of disk storage.

Back in November iXsystems announced FreeNAS 0.8 Beta with the following changes:

  • FreeNAS 0.8 has undergone a complete rewrite.
  • The GUI has been redesigned to be easier to use and extend. Rewritten using Python and Django.
  • Improved hardware support, faster I/O, better modularity, and easier upgrades (see Note below).
  • The base system has migrated from FreeBSD 7.x and the m0m0wall build system to FreeBSD 8.1-RELEASE and NanoBSD.
  • The installation types have changed; there’s no longer an embedded or full install, nor can the image be installed on a data disk. You must now install FreeNAS onto a dedicated device.
  • FreeNAS 0.8 features ZFS version 14
  • The media centre features of the box have not been reimplemented in the core FreeNAS package. This will be added as an add-on at a later date.

So as the user interface has changed, I though it worth rewriting my August blog post.

One thing to note is FreeNAS version 0.8 currently ONLY supports upgrades to FreeNAS 0.8. It is not possible to upgrade from 0.7 or earlier.

These instructions were written using the FreeNAS 0.8 Beta release of the 02/12/10 running in a VirtualBox VM. I do not recommend using any Beta software for any purpose other than testing, as by it’s nature it is incomplete and undergoing rapid development.

What you Need!

  • One low specification PC, the less power it consumes the better as a NAS box generally gets left on for hours/ days on end. A Pentium III is probably a good starting point, with 512Mb of RAM, but if you are serious about power consumption then an Intel Atom or similar CPU is recommended.
  • A 512Mb (for RC2 this is now 1Gb, thanks to vyccid for letting me know about this change) USB stick (assuming the PC can boot* off a USB device) or a low capacity hard disk on which to install the operating system
  • At least 1 hard disk to store your data.

* If your PC does not support USB boot a work-around is to use http://www.plop.at/en/bootmanager.html

Installation

Boot off the FreeNAS 0.8 CD, you will briefly be shown the following screen before the default option is selected and you are taken to the main installation menu.

The main boot menu will then be displayed.

Choose option 1 and select OK

All available physical disk media will now be displayed. In my case below I have one 256Mb hard disk available. This will become the FreeNAS system disk. I will add my data disk later, although this is not a requirement.

Select the disk you wish to install FreeNAS on (remember this disk is only for the operating system) so does not need to be large. Select OK.

Before FreeNAS is installed on the chosen disk, you will get the following warning message. Read it and if happy select Yes.

The disk will now be formatted and the operating system installed.

Once this has completed, the following screen will be displayed. Follow the instruction and then press OK.

On reboot you will be given a FreeBSD login prompt as below.

Enter the username of root and the password of freenas to login.

The first problem you will encounter is that there is no menu for setting the IP address or even a display of what it current IP address is set to! Hopefully, it will be recognised by the FreeNAS developers that this is an oversight.

To display you IP address enter the command ifconfig, you will see something similar to the following screen-shot which shows an IP address of 192.168.1.66

Setting the IP address is now only possible, unless you like using Vi editing Unix configuration files, via the web interface. Whilst this may seem like a backward step, I think it is a good move as it means that all configuration is now done through the GUI.

Open a web browser and type in the IP address. In our case this is 192.168.1.66. You will then get the login screen.

Enter the defualt username of Admin and the password of freenas

You will be taken to the FreeNAS Home page

The first thing you need to do is change you Timezone in the settings tab, using the drop-down, then click Save Settings.

Setting a Fixed IP Address

To do this, in the toolbar click on Network and then in the Network Settings tab, select Interfaces.

Click Add Interface.

Normally you will select em0 if you only have one NIC in your PC. lo0 should not be used as it is local.

You can give your interface any name you wish but I tend to stick to calling my interfaces eth followed by a number in this case 0.

Then enter an IPv4 IP address, I will use 192.168.1.200.

Click Add Interface.

At this point your connection with your FreeNAS web interface will be lost as you have changed the IP address of the server from a variable DHCP address to a fixed address.

In your web browser change you IP address to the new fixed address. In our example this is 192.168.1.200.

You will be asked to login again and you will then be shown your network interfaces window

Attaching Storage

So far all we have done has been to install the FreeNAS operating system and set a fixed IP address. The next step is to make our FreeNAS server useful and turn it into a network storage device by adding disks.

To do this click on Storage on the FreeNAS toolbar.

Now click Storage Wizard. The following window will be displayed

Enter a Volume Name, we are going to use NASDISK1

Select the file system type, I’m going to use UFS as the future of ZFS remaining opensource under Oracle in currently in question. A real shame as this is a good file system.

Finally select the disk you want to assign to the Volume. I have two ad1 and ad3. I will select ad1.

Click Next>>

You will now get a summary screen of your settings, click Save

Having repeated this process for my second disk, the store screen now looks like the following, showing two active disks.

I’m now going to edit some of the default settings for each of my disks by doing the following:

  1. Click the View Disks button for NASDISK1
  2. The Disks in volume 1 window will appear, click Edit for ad1
  3. I’m going to set the following:

HDD Standby will be set to 30 seconds

Adcanced Power Management will be set to Level 1

Th results will look as follows

Click Update ad1 (ad1) and then repeat for all remaining disks.

Sharing the Disks (Windows Shares)

With the disks mounted and a file system allocated, the next step is to share the disks. In this example I’m going to use Windows Sharing as this is universal to all operating systems.

From the FreeNAS toolbar click on Sharing. The following screen will be displayed

Click Add Windows Share. You will be asked for the following

  • Share Name, in this example I will call it WINShare1
  • Path, this is the disk you want the share to be associated, so in this example we will select /mnt/NASDISK1 from the drop-down menu.

The results will look like the following screen-shot. Click Add Windows Share to save the settings.

Repeat for all remaining disks you wish to share.

Once you have finished your Sharing screen will look similar to the following

With your shares set-up, you now need to start the Windows Shares service. To do this click Services on the FreeNAS toolbar.

Click on the OFF button adjacent to Windows Shares, this will turn on the service, the button will change to ON.

Note: I’m not sure of this is a problem or not, but I found that after setting up the shares, it was necessary to reboot the server otherwise you will be asked for a login id and password and nothing seems to work! This might have been because I enabled the Samba service for the first time for Windows Shares.

When browsing for Windows shares, some reason they appear under the workgroup of MyGroup. This is not configured in /usr/local/etc/smb.conf as the Samba workgroup is set to FREENAS. So I assume must be a unexposed configuration setting in the FreeNAS configuration file and I can’t find a setting in the GUI.

Conclusion

The interface is considerably easier to use when setting up shares, in fact is it very “polished” compared to FreeNAS 0.7. and should attract a lot more non-technical users. The issue of not displaying the default DHCP IP address on boot-up is a problem in this respect and I hope this is addressed before the final release candidate is published.

Currently, in terms of functionality FreeNAS 0.8 does not compare to 0.7 as a lot of the functionality is missing. Anyone planning to move to 0.8 from 0.7 will find that unless they use FreeNAS as a basic NAS server, this is a retro step, especially as there is no upgrade path from 0.7.

From what I can tell, the following functionality is currently missing when compared to 0.7:

  • User Account creation and permission setting on shares – currently absent and this needs to be urgently addressed via the GUI.
  • File Browser and Editor – currently absent
  • Plug-ins – currently absent
  • System Information screen only provides Basic details, Live CPU, Memory and Disk Space Usage is missing
  • The Backup option is missing, as are system packages.
  • Not sure whether a Firewall is present and if it is there is no GUI to configure
  • Users and Groups are missing
  • Only file sharing services are currently present, thing like iTunes, Webserver, and BitTorrent are missing

Hopefully this will be partly resolved in the final release, bearing in mind that this is only a Beta and a lot can change! Furthermore, it would be very unfair to disregard the amount of progress made in the past 12 months in the development of FreeNAS. If this pace continues, then I’m sure it won’t be too long before missing features are restored.

What is very clear is that a lot of effort has been put into making FreeNAS very easy to use. In my opinion the developers have done an really excellent job.

A lot of the missing functionality is because 0.8 is a complete re-write and therefore the developers have had to effectively start from scratch, so the absence of features is very understandable

I really look forward to watching how the FreeNAS 0.8 development progresses in 2011. If most of the missing features in 0.7 are eventually restored in 0.8, then I’m definitely upgrading to what looks like becoming the ‘killer’ NAS solution outside of using dedicated hardware.

Congratulations to the FreeNAS team for continuing to create a excellent NAS solution.

=-=-=-=-=
Powered by Blogilo

FreeNAS Network Attached Storage Server – Part 3


In Part 1 I covered installing FreeNAS

In Part 2 I covered basic FreeNAS configuration, including adding disks

In Part 3 I am now going to cover some of the more advanced topics:

  • Setting up Software RAID
  • Users & Groups
  • File Management and the File Editor
  • Backing up your System Configuration

Setting up a Software RAID

NOTE:

In Parts 1 & 2 I had 256Mb of RAM configured for our FreeNAS server. If you are creating a software RAID, you will need to have at least 512Mb of RAM, otherwise you may experience unpredictable behaviour when creating the RAID.

FreeNAS supports many types of disk RAID Arrays including:

  • RAID 0
  • RAID 1
  • RAID5
  • RAID 0/1/5

See Wikipedia for more information on what each of these types of RAID offer in terms of protection against failure and performance.

JBOD is also supported but is not RAID, it stands for Just a Bunch Of Disks.

In addition to the drive FreeNAS is installed on, we have two hard disks in our FreeNAS Server which we are going to set-up as a Software RAID.

Follow the instructions in Part 2 in the section titled Adding Disks to FreeNAS, but before clicking Add, change the Preformatted file system to Software RAID. It should look something like the following screen-shot for the first disk which I’ve called Disk1. The choice of name is up to you!

Click Add and then repeat for the second disk, the Disks Management window should now look like the following

Click Apply Changes to put the disks online.

We are now ready to create our RAID.

From the menu bar select Disks > Software RAID. With RAID 1 selected (see screen shot below)

click on the + sign to create a RAID array.

Give the RAID a name, we will call it Disk in this example (see note later on).

Select the drives you want to be added to the array and then check the box titled Create and initialised RAID

Click Add. You will be taken to the previous screen where you newly created array is displayed.

Click Apply Changes. You should now get the following screen displayed

Note: in the following screen shot the RAID name was changed from Disk to RAD1

As we have chosen RAID 1 (disk mirroring) even though we used 2 x 2Gb hard disks, only 2Gb is available as usable storage. This is a feature of RAID 1.

The RAID Array now needs to be formatted.

From the menu bar select Disks > Format.

For Disk, select the RAID we have just created from the drop down menu.

Now give the volume a label, I this example we will call it RAID1

Now click Format disk to format the disk.

You will be asked to confirm your choice, click OK.

You will now see formatting information below the Format disk button similar to that below

Done! will appear once formatting has completed.

The final thing left to do is to mount the disk.

From the menu bar select Disks > Mount Point

Click on the + sign on the far right to add a new mount point.

Select the disk to mount in the Disk field and in the Mount point name field give it a name, we will call it DataRAID.

Click Add.

You should see the following in Disk Mount Point Management window

Click Apply changes to mount the disk.

To check the disk is mounted, click on System on the menu bar. You will see something like the following

Note: Although my ‘live’ FreeNAS server is a re-cased Compaq DeskPro EN Pentium 3 800MHz PC with 512Mb RAM, for this tutorial I created a Virtual FreeNAS server in Virtualbox. Hence the rather higher CPU specification!

With the disk mounted, you can now share it. Information on how to do this can be found in Part 2 of this series of FreeNAS articles.

Setting up RAID 5 is very similar, the difference is that at least three disks are required. Gary Sims, author of Learning FreeNAS which can be purchased online, has created a great video which you can view here on how to set-up RAID5 in FreeNAS.


Users & Groups

In Part 2 I touched upon creating a user account in the section Setting up a User Account to Remotely Access the Share. I will now cover this in a bit more detail in relation access permissions to Disk Mount points.

When you create a disk mount point, there is a section called Access Restrictions.

The defaults can be seen above, this is for my mount point called NASDisk1.

The owner is by default the account which created the mount point, normally Admin in FreeNAS. The Group, in this case wheel, restricts which group of users can access the mount point. The Mode section determines which collection of access permissions (Read, Write or eXecute) each category of user has, be it Owner, Group or Others.

From The FreeNAS menu bar select Advanced > File Manager and if asked to login login with your Admin account and password.

As FreeNAS runs FreeBSD, disk mount points are located in the /mnt directory. Open the /mnt directory by clicking on it.

On my FreeNAS server I have two disk drives and therefore two mount mount points, which like any Unix/ Linux OS take the form of a directory.

In the Perm’s column (short for Permissions) you will see the standard Unix Linux file permissions for the directory

Owner

Group

Other

r

w

x

r

w

x

r

w

x

r = Read w = Write x = eXecute

The above is prefixed with a ‘d’ if it is a directory, as with all PC operating systems, a directory is just a special type of file

Where permissions are absent, as in the following example for a file

the earlier table would look like the following

Owner

Group

Other

r

w

x

r

w

x

r

w

x

r

w

x

r

w

r

Which looks like this in File Manager

So, how does this all relate to users?

Well by default, if you create a directory using File Manager logged in as Admin, the default permissions are

drwxrwxr-x

When you create a user in FreeNAS, your primary group is Guest and no additional group is defined by default. Because your account is not the account which created the mount point i.e. Admin, you are therefore not the Owner and so Owner permissions do not apply.

As your account belongs to the Group guest, the Group the mount point belongs to is wheel, therefore Group permissions do not apply which means your account falls into the Other category. In this case this only allows you to Read and eXecute files but does not allow you to write!

There are two ways round this problem:

Either:

A. Change the mount point to it’s group matches that of the user, or better still change the group membership of the user to match the mount point. So make the user a member of the group wheel..

Or:

B. Login to File Manager with the account with which you wish to access the shares remotely, in this way that account is the owner of the directory and therefore has rwx access by default.

Note: It would not be advisable, for security reasons to change the permissions for Other to Write unless you were confident that allowing write access to all users was not going to be a problem, now or in the future.

For more information on Linux/ Unix file system permissions see Wikipedia

File Management

As we have already touched on File Management, it is worth covering it a bit more although there isn’t a massive amount to cover as it is mainly self explanatory.

The File manager supplied with FreeNAS is QuiXplorer which is a simple web based file manager.

You can:

  • create, copy, move and delete files and directories
  • change file and directory permissions
  • browse the FreeNAS file system
  • search for files
  • change users permissions

The last item is probably the most interesting as you can manage user passwords, set whether the user can see hidden files and the level of permissions they have for managing users. An account can also be disabled from this option.

File Editor

Also in the main FreeNAS menu under Advanced is the File Editor, which allows you to browse for a file, Load it, edit it and then Save it. It is by no means advanced, but a useful addition to the toolbox should you feel brave enough to edit FreeNAS configuration files directly!

Backing up your System Configuration

Whilst it is great ‘tweaking’ your FreeNAS system configuration either via the menus or directly using the editor, mistakes do happen and things can go horribly wrong, So it is worth while to backup your system configuration on a regular basis.

From the main menu, click on System > Backup / Restore. The following screen will be displayed.

Click on Download configuration, this will allow you to save your configuration file locally to your PC. It will not save it to the FreeNAS server disks for obvious reasons!

To restore your configuration, browse to where your backup file is stored and click on Restore configuration.

Finally, if all else fails, rather than re-install FreeNAS you can reset the server back to Factory defaults by selecting System > Factory defaults.

Use with care and best to backup your configuration before resetting.

In part 4 of this article, I’ll be looking at e-Mail notification and some of the additional services FreeNAS can run like BitTorrent, which I had to leave out of this article due to space!

=-=-=-=-=
Powered by Blogilo