Creating a NAS Box Using OpenFiler

In a recent walkthru we outlined the steps for taking an existing server and converting it into a NAS box. That article assumed that you already installed Linux on the server and you will maintain that installation (i.e. updates, security, etc.). This article takes examines an alternative: a dedicated NAS distribution called OpenFiler that allows you to very simply create a stand-alone NAS box that can be administered over the web.

Using OpenFiler

There are a number of tutorials on the web including the OpenFiler home page that describe how to install OpenFiler on a new system. For this particular article I simply chose a 1GB swap space and a 100GB “/” partition. The rest of the space was left unused so OpenFiler could be tested.

After the installation is complete and the system reboots you can log into the OpenFiler web GUI to begin your NAS journey. The IP address for the system test is The web GUI is reached by simply going to (after the box reboots it tells you this on the screen). Figure 1 below shows you the initial screen of the GUI.

Figure 1: Initial Screen with OpenFiler

You can then login into the OpenFiler server with the login being “openfiler” and the password “password” (don’t use the quotes though).

After you login you are presented with a GUI that has a number of tabs representing different administrative tasks or information. The default page is the “Status” tab. The information is quite extensive requiring two screen shots to list everything. Figure 2 is the top of the Status page and Figure 3 is the bottom part of the page.

Figure 2: Top of the Status Tab After Initial Startup

Figure 3: Bottom of the Status Tab After Initial Startup

We can glean some details about OpenFiler from these screen shots. The version of OpenFiler tests, 2.3, was released about 2 years ago and uses the 2.6.28 kernel (appears to be a custom built version). It is running a 64-bit SMP kernel (always good to check).

The next tab, the “System” Tab is shown below in Figure 4.

Figure 4: System Tab After Initial Startup

On the initial login to the GUI, this tab obviously consists of just the network configuration of the box. If you add NICs to the server then this is the tab you use to configure the device. Also note that the bottom part of the screen labeled “Network Access Configuration”, is very important for NFS as we will discover.

The third tab, “Volumes”, lists the volume information about the system and allows you to create and control any volumes you want. Figure 5 is a screenshot of this tab when you first login into the GUI.

Figure 5: Volumes Tab After Initial Startup

Notice that there isn’t much there because we haven’t defined any volumes (yet). But it’s fairly obvious from the terminology on the screen that OpenFiler probably uses LVM.

You can’t click on the Quota tab yet since there are no volumes on the system. So that moves us to the 5th tab, the “Share” tab. Figure 6 below is a screenshot of that tab when we first login into the admin GUI.

Figure 6: Shares Tab After Initial Startup

Again, nothing to really see since we haven’t created any shares yet.

The next tab is the “Services” tab as shown in Figure 7.

Figure 7: Services Tab After Initial Startup

This tab is where you enable and disable the various services of OpenFiler. The one that we’re going to use in this article is the NFSv3 server service (NFSv4 is still undergoing testing).

The last tab, the “Accounts” tab, is where you can configure OpenFiler for user management such as LDAP and Active Directory. Figure 8 shows the tab after you click on it.

Figure 8: Accounts Tab After Initial Startup

Notice that there are two “views” on this tab. The “standard view” is a little more user friendly while the “expert view” gives you more flexbility and control.

One can click on the “Expert View” option and the resulting screen is quite long. It is split into 3 screen shots in the figures below. Figure 9 is the top part of the screen shot, Figure 10 is the “middle” of the screen shot, and Figure 11 is the bottom of the screen shot.

Figure 9: Accounts “Expert” Tab (Top) After Initial Startup

Figure 10: Accounts “Expert” Tab (Middle) After Initial Startup

Figure 11: Accounts “Expert” Tab (Bottom) After Initial Startup

This is the tab you use if you want to use NIS and/or you want to set up Kerberos for secure authentication.

Now that we’ve had a quick tour of the tabs on the main page, let’s get down to business and create an NFS share and share it with clients. The steps are fairly simple but sometimes a bit confusing so they are listed here.

  1. Setup a Volume Group and a Volume
    • Create a new Physical partition
    • Create a new Physical Volume (PV) (remember – we’re using LVM)
    • Create a new Volume Group (VG)
    • Create a Logical Volume (LV) which is called just a Volume in OpenFiler
    • Create a file system on an LV
  2. Create a NAC configuration for your server (remember Figure 4)
  3. Enable the NFSv3 Server (remember the Services tab in Figure 7)
  4. Create a new “folder” on the Shares tab that is to be shared with clients
  5. Once created, click the share name to edit it to make it shareable over NFS

The first step is to basically use LVM to take unused hard drive space and ultimately create a Logical Volume which is then formatted into a file system for our shared storage space. To do this we need to start by creating a new physical partition on the drive. For the purposes of this article I used just a single drive and only used a bit over 100GB of the 500GB on the drive (even though OpenFiler needs far less than 100GB).

The first step is to go to the Volumes Tab on the GUI. If you recall in Figure 5, the GUI tells you that you need to “create new physical volumes”. If you click on this link it will take you to the Block Device Management screen as shown below in Figure 12.

Figure 12: Block Device Management – Initial Screen

Alternatively, you could have clicked on the link from the menu on the far right hand side of the screen, labeled “Block Devices”. You can see the see the existing partitions by clicking on the “view” option under “Partitions” labeled “view”. This pops up a subwindow listing the existing partitions on the particular drive as show below in Figure 13.

Figure 13: Block Device Management – View Existing Partitions

From this window you can compare the total space of the existing partitions to the space on the drive which is listed in the main window of the GUI. So you know that you have space to use for creating a partition.

Once you are on the Block Device Management screen you can click on the specific device, in this case /dev/sda to create a new partition (this is listed under “Edit Disk” in the Block Device Management window. For the system used in this article you will see a new screen pop up that lists the existing partition details followed by a section that allows you to create a new partition. Figure 14 below shows that screen.

Figure 14: Block Device Management – Edit Disk (Adding New Partition)

The upper part of the screen tells you how much free space you have (about 79%) that has not been partitioned. The lower part of the screen allows you to create a partition by defining the following characteristics of the partition:

  • Mode
  • Partition Type (primary or extended)
  • Starting Cylinder
  • Ending Cylinder
  • Size (a result of selecting the number of cylinders)

Once you are happy with your selections, you just press the create button and it will create the partition for you.

For this this article I created a single partition for NFS space (primarily user space). I was happy with the default options that OpenFiler presented so I just pressed the create button and let it create the partition. Once it is done it comes back and lists the partitions again including the new one as shown in Figure 15.

Figure 15: Block Device Management – Partition Listing Including New Partition

At this point the partition has been made but remember that OpenFiler works with LVM. So we need to create a Physical Volume (PV). You can tell that we need to add a PV since the amount of free space is still showing 79%.

At the bottom of Figure 15 you will notice that the GUI is prompting for a new PV since the “Mode” is Logical instead of “Primary.” By default OpenFiler wants to create a PV from the entire partition. To make things easy I will accept the defaults to create a single PV from the partition. After clicking on the “Create” button the updated screen is shown in Figure 16 below.

Figure 16: Block Device Management – After Creating New Physical Volume

At the top you will immediately notice that the new PV is listed (Linux Physical Volume). You will also notice that at the bottom of the GUI it says that you can’t create any new partitions (must mean that the entire disk has been used).

If you remember your LVM skills, you should remember the next step is to create a Volume Group (VG). In Figure 16, if you look at the menu list on the far right hand side near the top, you will see the menu item “Volume Groups” listed. Click on that menu option and you will see a screen as in Figure 17.

Figure 17: Volume Group Management – Initial Screen

At the top you will see that we have not created any Volume Groups (VG’s) yet. At the bottom we can actually go in and create them by starting with a label for our VG and associating it with a Physical Volume. Since we have a single disk we will associated the VG with the one PV we have as shown previously. Then you just click on the “Add volume group” button and OpenFiler creates the VG for you.

When OpenFiler is finished with creating the VG you will see the list of VG’s at the top of the page as shown in Figure 18.

Figure 18: Volume Group Management – After Creating the Volume Group

In this case you will see the VG, mainvg, it’s size, how much space is allocated and how much space is free. You also have the ability to list and manipulate the Physical Volumes (PV’s). For example you can list the PV’s associated with a VG for this case as shown in Figure 19.

Figure 19: Volume Group Management – List of the PV’s Associated with the VG

For this particular case, things are easy because there is only 1 PV associated with the single VG we have created.

After creating the Volume Group (VG) you next create a Logical Volume (LV). OpenFiler calls it just a volume. In Figure 18, in the upper right hand side, you see the menu option “Add Volume”. Clicking on that brings you to the screen as shown in Figure 20 below.


Figure 20: Logical Volume Management – Initial Screen

At the top of the screen you can select the particular VG you want to use and the middle of the screen updates the information about the VG including a pie charts showing how much space is free.

Since OpenFiler is primarily about files it has combined the steps of creating a Logical Volume (LV) and formatting a file system on it. The bottom part of the screen allows you to create the LV and pick a file system for it. You also enter the space for the LV. I chose to use all the space for the LV and after OpenFiler created the file system it updated the GUI as show in Figure 21.

Figure 21: Logical Volume Management – Result of LV Action

The second section of the screen lists the LV’s, which OpenFiler refers to as just “Volumes.” It lists the details of the LV and includes the ability to edit, delete, or create snapshots.

We have just finished Step 1. We have created a new partition, a new Physical Volume (PV), a new Volume Group (VG), a new Logical Volume (LV), and formatted it with a file system. At this point the next step in OpenFiler, Step 2, is to create a Network Access Configuration (see Figure 4). You just click on the “System” tab and at the bottom of the screen is the NAC (Network Access Configuration) input. Since the system only has one NIC I just used its IP address, and gave it a specific name. The result is shown in Figure 22 below.

Figure 22: Defining the Network Access Configuration (NAC)

The next step (Step 3) is to enable NFS. That’s fairly easy by going to the “Services” tab (see Figure 7) and enabling NFS. Once you enable it the “Services” tab should look like the following:

Figure 23: Enabling NFS

Under “Status” you will see that NFSv3 Server is enabled.

In Step 4 you go the “Shares” Tab in the GUI to create a share on the file system associated with the LV. So go to the tab and click on the folder listed as “Home Directories on OpenFiler”. This is the name of the file system I created in Step 1. OpenFiler requires that you create a folder underneath the file system you just created rather than export the file system. So I just created a folder named “Users”. Figure 24 shows you the result of this step.

Figure 24: Creating Folder that is to be Shared

Notice that next to the folders (shares) it lists the full path (nice touch).

After the creation of the folder, you click on the name to edit it’s properties. This is where you define how the folder is to be shared including associating it with a NAC. Figure 25 shows the screen when you click on the folder to edit it.

Figure 25: Editing Properties of Shared Folder (Initial Screen)

Just click on the “Make Share” button and you will be taken to the screen show in Figure 26.

Figure 26: Editing Access Options for the Shared Folder

Notice the large number of ways you can share the folder.

  • NFS
  • http/WebDAV
  • ftp
  • Rsync

You can share most of them in Read-Only mode (RO), or Read-Write mode (RW), or not at all (“No”). Since all we want to do is create an NFS directory to share I will only select that option and I will select “RW”. Then click on the “Edit” option under NFS to change the NFS settings. Figure 27 shows the screen that pops up when editing the NFS properties.

Figure 27: Editing NFS Properties

You may notice that the NAC listed in Figure 27 is instead of I too this screen shot from some early experimentation I was doing (my apologies for any confusion this might cause).

For the purposes of the article I didn’t use NIS or LDAP or any other method of network user accounts. So to test the NFS share on other machines I had to chose the “no_root_squash” option. It’s probably not the best idea in the world, but I wanted to be able to check that it worked. Once you have the options you want, you just click on the “Update” button.

At this point you are finished with the OpenFiler configuration. Not too terribly bad but a little clunky in some spots (perhaps the Admin Guide would help).

Now that we’re finished with the server we need to go to the client to configure it to mount the storage. However, before leaving the OpenFiler GUI, you need to make sure you have the IP address of the server ( in this case) and the path to the exported folder (/mnt/mainvg/openfilerhome/Users).

I won’t go into details about the client configuration since that was covered in the previous article. In /etc/fstab I added the following line,   /mnt/test  nfs  rw,auto  0  0

Be sure the mount point, /mnt/test exists. Then you just type “mount -a” on the client (do it as root) and the NFS file system should be mounted.

To check that it is mounted correctly I just check the disk usage.

[root@home8 laytonj]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda2             57685564  10188100  44567208  19% /
/dev/hda1               248895     19792    216253   9% /boot
none                    517404         0    517404   0% /dev/shm
/dev/md0              38464276  21801028  16272468  58% /home
/dev/md1             307663736 119669056 187994680  39% /data
/dev/hda5             18737852     77896  18659956   1% /test1
                     384827392      4608 384822784   1% /mnt/test

You can easily see that the NFS exported file system from OpenFiler is mounted and is ready to be used.

As I mentioned earlier I used the “no_root_squash” option. I did this so I could create subdirectories (accounts) on this NFS file system for various users. I won’t show the details but as root I just created the directory and used “chown” to change the ownership of the directory on the client to whomever owned that storage. It is beyond the scope of this article to discuss account management and best practices, but to be honest this method is really brute force and not the way you should do things. I would use NIS or LDAP and then export the directories so there is no need to create “local” accounts on the client.


While not my original intent when I started this article, I believe I have set a new record for the longest article in Linux Magazine history. However, I wanted to walk through the process of setting up OpenFiler to create an NFS export including screen shots, to understand how OpenFiler worked for this scenario. Personally, while screen shots add a lot to the length of the article, I think they are important because all too often when new versions of a GUI come out, things have changed so being able to compare what’s on the screen to the what the article contained helps in determining if the steps have changed (that happened during the writing of this article so I’m keenly aware of this).

Overall OpenFiler offers a great deal of flexibility in a dedicated distribution. It is laser focused on being a good network attached storage (NAS) system. The GUI is fairly good but determining the steps in creating a simple NFS export was a bit cryptic. The steps were actually listed in one of the OpenFiler forum postings but they were a bit out of date. So after some experimentation, the steps listed here were created.

While the GUI is great for getting an NFS server going and maintaining it, it does limit you a bit. For example, there are no real “monitoring” tools in the free version of OpenFiler (there might be in the enterprise version but that was not tested). In addition, it’s not possible to really “tune” the NFS server inside the GUI and use the options that OpenFiler provides (which might be quite good – they simply were not tested in this article). For example, how do you enable Jumbo Frames from the GUI?

Overall OpenFiler is a pretty straight forward distribution for creating a dedicated NAS. It has a number of very flexible features and is easy to install. Configuration is more of a challenge due to the lack of a free Users Guide, but Google is our friend in this case or we can just purchase the manual. I understand that the commercial company backing OpenFiler needs to maintain it’s existence so it sells the manual commercially (that’s a reasonable compromise in my opinion). Moreover, for people needing support there is a commercial company supporting OpenFiler. Not a bad thing to have available when the going gets tough.

Fatal error: Call to undefined function aa_author_bios() in /opt/apache/dms/b2b/ on line 62