Storing files with NAS4Free 10.3.0.3



A phrase I find myself repeating over and over, to family, friends and clients is "Make backups of your data." If a file is not backed up then it is one electrical storm, hardware failure or accidental key press away from no longer existing. This naturally leads people to wonder where copies of their data should be stored. There are any number of solutions from optical media to external hard drives, cloud storage to backup tapes. This week I want to talk about a network attached storage (NAS) solution which uses the NAS4Free operating system to manage disks.



NAS4Free runs on ARM and x86 processors which are found in most personal computers and servers which means we can run the operating system on just about any spare computer we have lying around. The project's website describes NAS4Free as follows:



It supports sharing across multiple operating systems, including Windows, Apple, and UNIX-like systems. NAS4Free is easy to set up in most home and enterprise environments and will allow you to manage and share large amounts of data easily across your network. NAS4Free also incorporates many different streaming features for sharing your multimedia with other devices on your network. NAS4Free is an embedded Open Source NAS (Network-Attached Storage) distribution based on FreeBSD It supports sharing across multiple operating systems, including Windows, Apple, and UNIX-like systems. NAS4Free is easy to set up in most home and enterprise environments and will allow you to manage and share large amounts of data easily across your network. NAS4Free also incorporates many different streaming features for sharing your multimedia with other devices on your network. NAS4Free is available for ARM, 32-bit x86 and 64-bit x86 builds. I decided to download the 64-bit installation media which is 357MB in size. Booting from this media brings us to a text console. The console displays a welcome message and the computer's IP address. Under the address is a menu where we can kick-off certain administrative functions. I soon found the menu will display different options depending on how much memory is available. For all of the menu options to be shown, the NAS needs to have at least 2GB of memory available, when less is present some options are hidden.



Looking over the menu we can find options for configuring our network connection, running ping tests, resetting the NAS's web interface and restoring the operating system to "factory defaults". We can also shut down the NAS, access a command line and run the project's system installer.



NAS4Free's system installer shows us a series of text-based menus. We are first asked what type of installation we would like to perform (Full or Embedded) and whether we would like to use GPT or MBR disk layouts. These options are covered in the project's documentation. Next we are asked which disk in the NAS will be used to hold the operating system. We can then set the size of the system's swap partition and I found swap had to be 512MB or larger. The installer then told me it was setting up the disk with at least three partitions: partition #2 would hold the operating system, partition #3 would be set aside for swap space and partition #4 would be reserved for data. With this information shared, the installer finishes its work and we can reboot the computer to start using the NAS.





NAS4Free 10.3.0.3 -- The status overview page

(full image size: 205kB, resolution: 1280x1024 pixels)



The first time I started NAS4Free from my computer's hard drive I noticed it was booting slowly. It appears as though the entire operating system is loaded into RAM during boot. This makes the initial boot time longer, but makes for a very responsive system once it is up and running. Once the operating system boots, we are once again shown the device's IP address and the options menu. Using the menu, I configured the network interface to use a static IP address, reset the web interface's password and told the NAS to block all connections to the web interface which did not originate from the LAN. I particularly like this last option as it provides an extra layer of protection against outside attacks.



NAS4Free uses a web-based interface to manage services, set up storage and monitor the system. By default, the operating system uses plain HTTP connections, though we can switch to using HTTPS exclusively once we get signed in. We can login to the web interface using the username "admin" and the password provided when we reset the account from the text console. Upon logging into the web interface we are shown a status screen. This screen displays the NAS's uptime, memory usage, available disk space, some hardware information and the status of any connected UPS device.



A menu across the top of the web interface offers us general categories of options we can access. The menus drop-down to provide more specific tools. Selecting a tool loads a new page which may have its own sub-menu near the top of the window. This gives us three levels of menus to browse, which may seem like a lot, but I found the available options were well organized and I always found it easy to find what I wanted.



There are a lot of options and controls available through the NAS4Free web interface and I'd like to quickly go through them, menu by menu.



The first menu is System and here we can find options for dealing with the NAS4Free operating system, software updates and some basic security options. Looking through the System menu we can find options to change the administrator account's username and password. We can also toggle between accessing the web interface over the HTTP or HTTPS protocols. We can also set DNS servers and set the system clock.



There is a section of the System menu dedicated to downloading and installing operating system (firmware) updates. NAS4Free does not download software updates directly. Instead we are given a link to available upgrades and we can download the new version using our web browser. Once the file has been downloaded to our local computer we can then upload it to the NAS through the web interface. During my trial, one update of 133MB was available and it installed cleanly.



There are additional options for backing up and restoring our NAS's configuration settings and there is an option to reset the NAS to its default settings. There is also an Advanced section where we can specify kernel parameters for the NAS, set up e-mail notifications and create extra swap files/devices for the system. We can create cron jobs and use the web interface to set system variables in the operating system's start-up configuration files. Perhaps my favourite "Advanced" feature though is the ability to lock the NAS's text console. This prevents people who have physical access to the machine from being able to use the admin menu to change settings.



The next menu over from System is labelled Network. As one might expect, here we can configure our network interface, set our NAS's IP address and configure network proxies. We can also supply a list of known host names and enable blocking certain remote hosts from accessing the NAS. The Networking menu also features a page for configuring the NAS4Free firewall. I found the firewall blocks incoming connections to the FTP and OpenSSH services by default.



The primary reason to use a NAS is to store information, usually large amounts of it on multiple disks. The Disks menu provides us with tools for managing physical disk drives, setting up volumes and working with partitions. NAS4Free is capable of formatting partitions with UFS, ZFS and FAT file systems. The Disks menu also gives us the option of mounting existing disks and ISO images which may be useful if we have old archives we wish to make available to the NAS's users.





NAS4Free 10.3.0.3 -- Managing storage pools

(full image size: 178kB, resolution: 1280x1024 pixels)



One aspect of using NAS4Free I found interesting is, when we use the web interface, it insists we create a virtual device from available disks/partitions before we can create a ZFS storage pool. There are reasons this is a good idea, but it is not always required by other platforms that leverage ZFS for storage. Once we have created virtual devices from the disks, we can then create a storage pool and set up mount points inside the pool. Once a ZFS pool has been created we can manually create (or schedule the creation of) snapshots of each mount point, giving us archives we can go back to and access later.



The Services menu helps us set up background services and methods for accessing the files on the NAS. The NAS4Free operating system supports working with Samba shares, FTP, OpenSSH, NFS, AFP and rsync. This should make it easy for us to remotely access our files in just about any environment. I focused on working with OpenSSH and Samba shares and found they worked well. NAS4Free also supports setting up a web server and bittorrent to help us share files. Each service has its own configuration page with an enable/disable toggle switch. The default options will usually be suitable, but we can tweak each service quite a lot when it is needed.





NAS4Free 10.3.0.3 -- Configuring the bittorrent service

(full image size: 212kB, resolution: 1280x1024 pixels)



I was a little puzzled by the purpose of the next menu, called VM. The VM menu has a section for VirtualBox and selecting this option brings up a page in the web interface where we are asked to supply the "home directory of VirtualBox". I'm not sure what this function intends to do and I did not find any reference to it in the NAS4Free documentation.



The next menu in the list is labelled Access. There are just three entries in this menu. Two assist us connecting to Active Directory and setting up LDAP authentication. The third entry brings up a page where we can manage user accounts and groups. The account management screen is straight forward and makes it easy to set up new users on the NAS.



Something I find interesting when working with different NAS technologies is some systems want us to create a user first and then create a storage volume which will be owned by that user. Others want the storage pool to be in place first and then we place a user's directory into the pool. NAS4Free falls into the latter category - we need to have a storage pool in place so we can create a home directory inside the pool for our user.



Next, we come to the Status menu. This menu provides us with several options for checking on running processes, seeing which services are active, the status of our disks and the amount of memory being used. The Status menu also helps us create and schedule e-mail reports for the administrator. While most of this section contains fairly standard monitoring options, I do like how detailed we can make e-mail reports, including specific logs and information.





NAS4Free 10.3.0.3 -- Checking the status of services

(full image size: 168kB, resolution: 1280x1024 pixels)



The Diagnostics menu helps us trouble-shoot issues on the NAS. Through this menu we can check logs, see a list of who is accessing the NAS, see what disks are attached to the system and how much space is being used. We can also test network routes and ping remote hosts to make sure our network connection is working.



The penultimate menu is called Advanced and contains just a few entries. The first Advanced page we can access brings up a file editor. The file editor helps us edit text files through our web browser. We cannot open any configuration text files which are part of the operating system, but we can access and edit text files in the users' directories. A user's files are, by default, stored under the /mnt directory.



The Advanced menu also includes a file manager. Any user with an account on the system can sign into the NAS's file manager where we can browse and manipulate files. The Advanced menu features another option which allows the administrator to run any command line on the NAS or execute supplied PHP code. I'm a bit wary about having these options available at all as they are likely to be used to do more harm than good, but it does give the administrator access to a command line through the web interface.





NAS4Free 10.3.0.3 -- The web-based file manager

(full image size: 248kB, resolution: 1280x1024 pixels)



The final menu is called Help. The Help section mostly provides links to on-line resources. From the Help menu we can access the NAS4Free documentation, open the project's on-line forum in a browser tab, see a summary of the project's release notes and send NAS4Free a donation via PayPal. There is a menu entry for accessing an IRC chat room to get live help, but the website hosting the IRC channel was off-line at the time of writing.



NAS4Free has a nice, fast interface. The operating system, even when loaded in memory and managing a ZFS volume and running the web interface, only used about 300MB of RAM (including inactive memory). This makes NAS4Free suitable both for larger deployments and use in low-resource environments.



Conclusions



Most of the NAS operating systems I have used in the past were built around useful features. Some focused on making storage easy to set up and manage, others focused on services, such as making files available over multiple protocols or managing torrents. Some strive to be very easy to set up. NAS4Free does pretty well in each of the above categories. It may not be the easiest platform to set up, but it's probably a close second. It may not have the prettiest interface for managing settings, but it is quite easy to navigate. NAS4Free may not have the most add-on services and access protocols, but I suspect there are more than enough of both for most people.



Where NAS4Free does better than most other solutions I have looked at is security. I don't think the project's website or documentation particularly focuses on security as a feature, but there are plenty of little security features that I liked. NAS4Free makes it very easy to lock the text console, which is good because we do not all keep our NAS boxes behind locked doors. The system is fairly easy to upgrade and appears to publish regular security updates in the form of new firmware. NAS4Free makes it fairly easy to set up user accounts, handle permissions and manage home directories. It's also pretty straight forward to switch from HTTP to HTTPS and to block people not on the local network from accessing the NAS's web interface.



All in all, I like NAS4Free. It's a good, general purpose NAS operating system. While I did not feel the project did anything really amazing in any one category, nor did I run into any serious issues. The NAS ran as expected, was fairly straight forward to set up and easy to manage. This strikes me as an especially good platform for home or small business users who want an easy set up, some basic security and a solid collection of features.



