Deciding on a NAS and installing FreeNAS

After my hardware build I looked into what operating system my NAS should be running. Because I have 4 drives it should be capable of doing a type of RAID, accessible by my Windows computers (CIFS) and media centers running XMBC (NFS) and be able to download automatically using Sickbeard and SABnzbd. On this blog post I explain how you can install FreeNAS and configure it with all my “lessens learned”.

grub boot menu
  • The choices
  • Installing FreeNAS on my Hardware
    • Recommendations
    • Setup Media
    • Remote Management 
    • Installation steps 
  • Setup FreeNAS
    • Creating Storage
    • Creating users and groups
    • Changing permissions
    • Creating Shares
  • Testing FreeNAS

The Choices

1. FreeNAS (http://www.freenas.org)
Boasting impressive enterprise features and ZFS, FreeNAS is my current NAS of choice. This bad boy just keeps getting better and better. I love the ZFS support and its huge repository of Extensions. It has a easy and extended GUI and support automatic updates. Its a bit of over-kill for low-spec hardware because it does require a lot of RAM. (My rule of thumb is 1 GB per TB)

2. NAS4Free (http://www.nas4free.org/)

Configure IPMI

This is the little brother from FreeNAS but requires less in terms of hardware specifications. It also has a repository with extensions though the GUI can be hard to navigate.

3. OpenMediaVault aka OVM (http://www.openmediavault.org/)
OpenMediaVault is a solid NAS and the brainchild of a former chief that worked on FreeNAS as a developer. If you don’t need enterprise features like ZFS and/or you prefer a Debian-based distribution, OVM could be your NAS ticket.

4. Nexenta Community Edition (https://community.nexenta.com)
This is a free community version of a commercial storage product running Solaris. It also has ZFS support though has a limitation of 18 TB (though that should be enough for home users). Though because this is a community edition its feature-limited.

Rufus Create Bootable USB

5. Openfiler (https://www.openfiler.com/)
Like FreeNAS, Openfiler (rPath Linux) has been around a long time now; but unfortunately its update schedule is lacking behind. It has a good fan-base which makes support using google easy and can be clustered. Though the lack of updates is not something good

6. Rockstor (http://rockstor.com/)
Rockstor (Based on CentOS) is rather new to the NAS world which makes it not as far along in development as many of the others. Its using the BTRFS file system (similar like ZFS). It also requires less heavy hardware than FreeNAS and has loads of plugins. Though the File system is pretty new so not my number 1

7. XPEnology aka DSM (http://xpenology.me)
Yes you can run DSM, the nice looking GUI and its OS, on your own hardware! Though its not really open like the other operating systems we compare it too. Also the setup is not pretty straight forward.

8. Windows Server (https://goo.gl/GtsF5L)
You can use just a Windows installation to run your NAS though you are limited to just Windows clients (CIFS) though you can do NFS its not straight forward. On top of this Windows needs more hardware than the average NAS distribution because you do need to run Windows 🙂 And you need a licence key compared to the other open-source distributions

Installing FreeNAS on my Hardware

Recommendations

First installation screen

FreeNAS is based on FreeBSD 9.2 which support both 32-bit and 64-bit CPU architectures. The only noticeable recommendation is RAM! FreeNAS requires atleast 8GB of RAM to work propperly and the more RAM the more performance. If you have less than 8GB of RAM and only have 32-bit system, you should not run ZFS (the file-system) but chose UFS instead. My rule of thumb for ZFS is 1GB per TiB you would like to host. (If you want to use de-duplication the recommendation is 5GB of RAM per TiB).

Setup Media

You need at least a 2GB Memory stick to install FreeNAS. Though I found out the hard way that FreeNAS has no USB 3.0 support during the setup (drivers missing). So I could boot from my memory stick, though it would fail because it was, later during the setup, unable to mount the setup files on the USB drive. Because I only had 2 USB 1.0 ports, I used my BMC (see next section) to use a remote keyboard and monitor to install FreeNAS (without a keyboard its kinda hard). One port was used for the installation USB drive, and the other is the USB drive is my destination for installation (Ultra Fit USB 32GB). I download the latest FreeNAS release (http://www.freenas.org/) and use Rufus (https://rufus.akeo.ie/) to create a bootable USB drive for your installation.

Remote Management

Because I have a Super Micro mainboard I can use baseboard management controller (BMC) to connect to the system. This allows

me to control the system without having a screen or keyboard attached to the system. This works over LAN and requires a client on your own PC to connect to the BMC. All mayor vendors have these on-board and have their own name for it.

Set root password
  • Super Micro – IPMI
  • Dell – iDRAC
  • HP – ILO
  • SUN – ALOM
  • IBM / Lenovo – IMM

The setup of the IPMI is done by the BIOS of the Super Micro main board. After booting enter the BIOS and there is a IPMI section. I have set it to a static IP so I can always connect to the system. After setting the IP I downloaded “IPMI viewer” from the vendor and add the BMC IP to the viewer with the default username and password (ADMIN:ADMIN). After I logged in I did launch the console and saw the screen remotely as seen in the screen-shot.

Installation Steps

After you have booted from the USB drive and have control of the system; select 1 to Install/Upgrade FreeNAS. On the next screen you see all your drives including the setup media (see screen-shot).

Selecting install media

I selected my 32GB USB drive named da0 and hit ok. On the next screen I had to create a root password. After that step the installation begin and it took a few minutes to complete. It tolled me to remove the

First Menu
Set a fixed IP address

installation media and reboot. After the reboot, which took longer than the actual installation because of more automatic configuration stuff, I saw the menu as displayed in the screen-shot. If you have DHCP enabled on your home router your FreeNAS already has been given an IP address. You can find out by checking the bottom of the screen like shown in my screen-shot. I strongly recommend to set a static (fixed) IP address so you always know where to find your NAS on your network. An alternative is to use your router to set a static lease where you have to match the MAC address of the Ethernet port used on FreeNAS to link to a fixed IP. This way your FreeNAS always gets the same IP address from your router using DHCP. If this is to complex or your router does not support Static Leases, walk thru step 1 and set a fixed IP address. After you have selected your Ethernet port, press N because we do not want it reset to defaults. In the following screen you can disable DHCP by hitting the “N” key. After you have to enter an IP address. If you do not know the format, just press [enter] and you will see an example. Below is my output from my setup.

If you do not know what network you have at home and are not sure what IP is still free, start a command prompt [cmd] on your own PC and execute a [ipconfig] to see your local network configuration. You can also start a [ping] to the IP you want to use and if you do not get a reply you should be fine to use that.

Thats it for the installation. You should be able to use your favourite browser to point to the IP address you set or got from the menu. You should be able to login with [root] and the password you set during the setup.

Setup FreeNAS

The following section describes my setup. You may use different number and type of drives therefore the screen-shots might not add up to your personal NAS setup. I also created users and groups to manage my home stuff. This is not needed (you can use guest for everything) though in the following up post where we install SickBeard and SABnzbd we will use the groups we created here. Also my storage (share) layout may be different that the one you want, though again; I will refer to these names in the follow up posts.

Creating users and groups

Before we are going to create Storage we are going to create a group and users to get access to our system. Navigate to “account” in the top left screen and collapse “Groups and “Users”. I have created a group called “users” with GID 1001. By kicking “add group” you can set a name and change the GID. Next are the users, hit the “Add User” and set a “Username” and make sure the “Primary Group” is “users” the group we just created. I set a password and select the checkbox “Microsoft Account”.

Creating Storage

We first have to create our RAID set. I have 4 drives installed and I want the a bit of safety but as much storage as possible. FreeNAS knows a lot of RAID types. The popular once I’ve listed below with a short description and equivalent to the normal RAID types. In my setup I have chosen RAIDZ which is a RAID 5 construction where 1 drive can fail while still serving data.

  • Striped – RAID0 – Stripes everything across all disks (no parity nor mirroring)
  • Mirrored – RAID1 – Mirrors everything across 2 drives (dual write)
  • Striped – RAID10 – similar to RAD1 but with more drives
  • RAIDZ – RAID5 – With one parity drive this is the best trade-off of hardware failure protection vs usable storage
  • RAIDZ2 – RAID6 – You get double parity to tolerate multiple disk failures
  • RAIDZ3 – This is like RAIDZ and RAIDZ2, but with a third parity point. This allows you to tolerate 3 disk failures before losing data

Navigate to “storage” and select “Volume Manager” to setup the storage. You will see a drag window which you have to drag to the right (not down) if you have all your 4 drives, you can select a volume-layout. Give it a name and hit “Add Volume”. Below is a screen-shot of my volume-manager after I have created my volume based on RAIDZ. I also created 3 Data-Sets for my different type of data (Media, Data and Backup). By creating separate Data-Sets you can enable and disable (i.e.) Compression and de-duplication by a per Data-Set volume. My movies and series wont compress but my data and back-ups will benefit from those technologies. Navigate to “Storage” and collapse “Volumes”. Underneath your created Volume (in my case “RaidZ”) you can select “Create Dataset” to setup a new Dataset. In the screen-shot you can see my layout of Datasets.

Changing permissions

We do need access to our datasets. We could allow “guest” access for everything but this is less secure. As I do have quit a few visitors on my network once in a while, I also visit LAN Parties/Events so I need to make sure my shares are protected. If you navigate to your dataset, there is an option to “Change Permissions”. The only thing I have changed is the “Owner (group)” to match my created “users” group from the previous step. As I am using only Windows clients, I set the permission type to “Windows” as the ACL (Access Control List) from Microsoft are more deeper than the Unix once where you can only control Read, Write and Execute. I changed it for all my datasets I’ve created.

Creating Shares

The next and final step is to create shares that point towards our Datasets. Everyone does this differently and exports the complete volume for example. But I like to create a share for every dataset as I use mount-points to point to these shares. Navigate to “Sharing”  and select “Windows (CIFS)” CIFS stands for Common Internet File-system (also known as SMB “Server Message Block”) and was originally invented by IBM. Microsoft merged it with its “LAN Manager” back in the days and made significant improvements to this protocol. Nowadays we are using SMB 3.0 in Windows 8.1/10. If you hit “Add Windows (CIFS) Share” in this menu, it will popup a screen where you can point towards the dataset using the “browse” button and set a name for the share. I used the same names as the names we used in the Datasets.

That’s it thats all for the basic installation and setup.

Share this Article
One Comment

Add a Comment

Your email address will not be published. Required fields are marked *