Gonzalo Rivero
I am Gonzalo, I live in Salta, a city located in the NW of Argentina near the border with Bolivia and Chile (in South America). I play the guitar and a little harmonica, I love blues music and heavy metal but any kind of music is fine. I also like to bike; I used to mountain bike a lot, but now I have a condition on my back near the neck and because of that I have to choose plain terrains to ride and not very long distances. I hope my days of going up hill or down hill aren't over yet.

How to setup a NAS with XigmaNAS

In this article I will show you how to setup a NAS with XigmaNAS, formerly known as Nas4Free.

A NAS (Network-attached Storage) is a network server specialized for serving files. With a PC, a couple of disks and XigmaNAS you can build a low-cost ZFS-based NAS with little effort.

Downloading

Go to https://xigmanas.com/xnaswp/download/ and choose the correct format for you:

  • LiveCD/LiveUSB: allows you to run in live CD mode (or USB if you don’t have a compact disk drive) or install to hard disk
  • Embedded installation: they provide an image file to install in an USB key or a compact flash card and is the preferred and recommended method. This way you can have an extra spare SATA. Also all the system will load into memory which is faster than run from hard drive.

Because of this isn’t a real installation (just for the tutorial), I’m using the Live CD image on a virtual machine.

My setup

For this tutorial I’ve created a virtual machine with the following specs:

  • 4 CPU cores, for no particular reason (it was the my default on gnome-boxes)
  • 1Gb RAM. Also for no particular reason. On real NAS, the more memory the better
  • 5 small hard drives. 4 of them for the data and 1 for the system, that last 1 isn’t mandatory but gnome-boxes just created. More disks means more fault protection. Also bigger disks means more space to save your data

Let’s get to work

After you boot your XigmaNAS you will see the following screen:

Console menu

Screenshot of the console menu
Screenshot of the console menu

There is not much to do here, most of the configuration is done via web, but take a look at some options:

  • Configure network interface, Configure network IP address and Ping host: if the system did not detect correctly the interface to your LAN (because you have more than one) press 1. The system will try to configure the network with DHCP, press 2 to change that. Test the connection by pinging some host.
  • Reset WebGUI password: useful if you forgot your admin password
  • Reset fo factory Default: start over from almost 0
  • Shell: open a command line to do things by hand
  • Configure hosts allow for webgui: disable host allow/deny if you locked yourself and can’t enter the webadmin

WebConfigurator

Point your browser to the ip (or hostname if you have properly setup your dns), and you will see the login screen:

screenshot of xigmanas login
Default username: admin / default password: xigmanas

After you login, the first screen shows some basic system and status information:

XigmaNAS main screen

Also it shows a warning about never made configuration backup. It’s ok, because this is a fresh install. The first thing to do after the initial configuration is a backup of that.

Go to Disks → Management to start the configuration.

Where are my disks?!

The first thing you’ll notice in this screen is that the system seems to haven’t any disk installed:

Don’t panic and click Import (under Import disks section)

As I said before, I’ve created my VM with 4 really smalls disks only for demonstration purposes and another one for the system:

There are my disks

Click on Apply changes and let’s format the disks.

Formatting disks

Go to the HDD Format tab, select all the data disks, choose ZFS Storage Pool as File system and click Next:

The system disk is locked because it contains the system.

On the next screen choose GPT partition, a volume name if you want and click next. Then confirm the format by clicking in Format:

Wait a couple of seconds and continue with the next section…

Before going to the next section, it would be a great idea to enable SMART so the system can warn you when a disk is about to fail (disks will fail, maybe you replace before and didn’t see them failing, but they will fail) so you can replace soon enough to keep your data safe. Just go to the S.M.A.R.T. tab and enable it.

ZFS

The next task to do is configure ZFS pools and datasets to store your data. ZFS is a file system and volume manager originally developed for Solaris. The number of features is so big that I’m only linking to the wikipedia article: https://en.wikipedia.org/wiki/ZFS.

Virtual Device

Before we can add a pool we need to create the virtual devices. Go to Disks → ZFS and choose Virtual Devices under the Pool tab and then click the big + sign on the right.

Screenshot of VirtualDevice creation

Choose a good name and description, select all the disks and create a raidz1, which is similar to raid5 (tolerates one device failure) with the advantages of ZFS.
The other options are:

  • Disk: creates a vdev containing a single device. Unless you have just one disk, I don’t see the point in choosing this.
  • Stripe: creates a vdev containing concatenated devices.
  • Mirror: creates a vdev containing mirrored devices
  • Raid-Z2: creates a vdev which tolerates a 2 device failure
  • Raid-Z3: creates a vdev which tolerates a 3 device failure

zpool

With our virtual device created, now we can add our zpool. Go to the Management tab under Pools tab and click on the big + sign to create one.

Screenshot of the configuration of a new pool
Screenshot of the configuration of a new pool

In this screen the most important options are the name of the pool and which device is assigned to. By default the pool will be mounted on /mnt/<poolname>, you can change to other path with the mountpoint option.

Dataset

Finally, let’s create a couple of datasets and we will be ready to share to the network.

Go to the Dataset tab and click on the big + sign to see this screen:

Creating a dataset

Most options are ok in the default values, others like name or the zpool where the dataset will be created speak by themselves.

To save space you can set some quota to prevent user abuses. You can also set compression, at cost of performance. And lastly, you can set deduplication to save space, but don’t do it unless you have read the warning in the XigmaNAS wiki, you have a lot of RAM and you know what you are doing.

When you finish to create the datasets needed click on save, and in the previous screen, apply.

I’ve created two datasets

Sharing your storage space to the network

Services available

As you can see in the screenshot, XigmaNAS comes with support for several services to publish your storage space on the network

SMB

Samba is one of the most common ways to share folder in a lan. You can even connect to an ActiveDirectory but now I’ll show you with workgroup.

Go to Services → SMB and click on enable and then on Edit.

Samba enabled but didn’t configured yet

The most important options are netbios name (how your xigmanas server will bee seen on the network, workgroup and authentication method. If you choose Local user (the easiest) you need to add users and groups by going to Access → User and Groups.

After you click apply and then click on apply the changes, go to Shares tab to create a share by clicking the big + sign:

Creating a share

Choose any name you want, the path to your zfs dataset and take a look at the other options.

To check if every thing is properly configured, go to \\xigma netbios name\sharename in a windows machine:

Screenshot of windows 7 browsing the network

DLNA/UPnP

This NAS was intended to share multimedia among the devices I have at home. This is pretty much the same procedure as with samba, but you can choose between Fuppes and MiniDLNA as service providers.
I’ve choose MiniDNLA for no particular reason:

configuring minidlna

Go to Services → DLNA/UPnP → MiniDLNA, click on enable then edit. Finally choose the path to share and click on apply to save and enable changes.

And that’s it. You can see your ‘new’ device on the network:

I have my old windows 7 in spanish. Your nas should appear under Multimedia Devices

If I double click on the multimedia device shown, windows 7 starts windows media player:

I’ve only stored two video memes on my NAS to made this screenshot

And this is it all for now. Explore the other services as needed and don’t forget to backup your data.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

x