How To configure of ZFS in hero operating system?

If you need a NAS server that has a file system that provides the best data integrity, QNAP with the QuTS hero operating system is one of the best options. This new QuTS hero operating system is exactly the same as the popular QTS that the manufacturer has in the vast majority of NAS, but has a differential feature: it uses the ZFS file system , one of the most advanced that we can find today . Do you want to know how to configure ZFS step by step on a QNAP NAS server with QuTS hero?

What is the QNAP QuTS hero operating system?

QNAP’s operating systems for its NAS servers are QTS and QuTS hero, both of which are based on the Linux operating system, but they have a big difference between the two. In QTS we will have the EXT4 file system to store all the information, in addition, we can create different types of RAID, configure SSD cache acceleration and even Qtier for tiered storage. In QuTS hero we will have the ZFS file system to store all the information with the best possible integrity, in addition, we will be able to create different RAIDZs, we will also have the possibility of configuring the SSD cacheto speed up the read and write speed of ZFS logs. So QuTS hero is still the same old QTS operating system, but now the data storage uses the ZFS file system instead of EXT4, with all that that goes into protecting data integrity .

The manufacturer QNAP has been launching different models compatible with QTS or QTS hero, but not both at the same time. However, computers such as the TS-473A allow the installation of one operating system or another in the operating system installation wizard, in this way, we can choose between QTS or QuTS hero. We must bear in mind that the QuTS hero operating system needs more RAM memory because the ZFS file system consumes more RAM to provide the best possible performance, also, if you do not have 16GB of RAM or more, you will not be able to activate the deduplication feature , so you should take it into account when buying a NAS.

In the following image you can see a QNAP TS-473A NAS server updated to the latest version of QTS, which allows us to change the OS to QuTS hero:

Currently there are very few NAS servers that are compatible with both operating systems, we must bear in mind that the server’s RAM must be ECC, and have at least 8GB or 16GB of RAM for everything to work properly, so high-end NAS servers input will not have this operating system available.

Once we have known what the QuTS hero operating system is and all that it implies, we will carry out the initial configuration.

QuTS hero initial setup

The first thing we must do to install QuTS hero is to click on the QuTS hero button that we have in the previous menu. The configuration wizard will tell us if we are sure to change to the other operating system, and that all data on all disks will be deleted, this is something completely mandatory if we are going to change from one operating system to another. In the event that you have data in QTS, you will have to make an external backup of it.

The QNAP configuration wizard itself will take care of downloading the new operating system and installing it internally, to later start with the basic configuration of the computer.

Once we have it installed, we can see the new QuTS hero menu in a dark gray color. In the upper left we can see the exact version of the operating system that has been downloaded and installed automatically. Now it will give us the option to change from OS to QTS, in case we want to go back, but remember that all the data on the hard drives will be erased again.

The setup wizard is the same as always on QNAP NAS servers. We can use the current version of the operating system, load a version ourselves manually and we can also search for a new update. In the next menu we can name the NAS server and also define the password for the admin user. Next, it will ask us to configure the time and date, either through our PC, an NTP server or set the time manually.

In the next step we will have the possibility to configure the local network in a basic way, we will choose to obtain the IP address automatically or use a static IP. Depending on what you need, you will have to choose one option or another. In the following menu we must indicate which operating systems we are going to use as a client, we can select all of them to have all the file exchange services such as SMB, FTP and NFS among others.

Finally, it will indicate a small summary of all the configurations made on the NAS server and it will launch a warning indicating that the process that we have just carried out will erase all the data of all the hard drives that we have entered, and that if we want to initialize the NAS server.

Once we click on “Initialize”, the process will begin, it is possible that this process will last approximately 5 minutes, since it will be applying all the changes, lifting all the services and many internal processes. Once this process has finished, it will indicate that everything has been successful and that we are ready to access the administration of the QNAP NAS server.

Once we enter the private IP address of the NAS server, the login menu will appear. We put the user “admin” and the password that we have defined previously in the configuration wizard.

In these moments, different pop-up screens will appear to perform different tasks. In RedesZone we are going to explain step by step how to create the storage pools and also the shared folders (previously known as Volume).

Storage Pool Configuration with ZFS

The manufacturer QNAP has a step-by-step configuration wizard for storage. In this configuration wizard you will show us the architecture with respect to storage, with the different RAID groups that we can create and the shared folders (previously volumes). It also explains what the block-based snapshots of this new ZFS file system are, thanks to this file system we can make Snapshots (Snapshots) in an almost unlimited way, ideal to protect the integrity of our files.

Of course, these snapshots can also be easily viewed from File Station, as was the case in the QTS operating system. Finally, it tells us that we can make a backup copy on another NAS server using these snapshots, ideal for making backups and restorations easily and quickly. Once we have finished this wizard that informs us about the storage, we can finish it by clicking on “Finished” or we can click on ” New storage pool “, we have used this last option to start creating the ZFS storage pool.

Whereas in QTS we had to create a storage pool (RAID or simple), then a volume and then a shared folder, now with QuTS hero the “volume” part disappears . Now we will have to create a storage pool in the RAIDZ that you want, and then create a shared folder within this storage pool, without volume. Of course, we can also configure the LUNs directly on the storage pool.

It is very important to choose correctly which disks we are going to use for the first storage set, the reason is because the default folders of the QuTS hero operating system will be created here, and the software that we install will also be stored by default. In our case, we are going to take two SSDs of 1TB capacity and we are going to configure them in “ZFS Mirror” mode , however, QNAP has wanted to inherit the RAID names to facilitate the transition to ZFS for users. Therefore, we would have the following:

  • RAID 0 is ZFS Stripe
  • RAID 1 is ZFS Mirror
  • RAID 5 is RAIDZ-1
  • RAID 6 is RAIDZ-2

In the case of using SSD we will have available the possibility to configure the QNAP SSD Antiwear Leveling (QSAL) . This functionality allows you to periodically detect the lifespan and durability of the RAID with SSD. When the SSD life is at 50% end, QSAL will dynamically allocate the over-provisioned space to ensure that each SSD can be rebuilt before the end of its life. This can prevent unexpected failures of multiple SSDs simultaneously, improving data integrity. An important detail is that QSAL can be activated at any time, it is recommended to enable it before the useful life of the SSD reaches 50% to protect the data and time to rebuild.

Other options that we will have available in this configuration wizard are:

  • Optimize performance : After creating this first storage pool, the operating system will take care of optimizing the performance of the system. Only one storage pool can be optimized at a time. An important detail is that this process requires at least 100GB of free space in the storage pool.
  • Over provisioning : we can configure an over provisioning for the ZFS group. Normally, 10% or 15% is best for data performance and capacity, however our recommendation is that you use the ZFS pool profiling tool to measure performance with each value.
  • Enable guaranteed space for snapshots : in this case, the default is 20%, as with QTS. This space is guaranteed for the storage of the ZFS snapshots.
  • Alert threshold : when this threshold is exceeded in the storage pool, it will warn us.

Once we have configured everything, click on “Create” and it will notify us that this process will eliminate all data and that the optimization process could take a few minutes.

Once configured, we can see in the “Storage / Snapshots” section that the new storage pool is for the “System” and is being optimized. This process has taken us approximately 15 minutes, the rest of the set of storages is much faster, taking approximately 3 minutes.

In the case of wanting to create another storage pool while optimizing one, we will get a warning indicating that we will not be able to optimize it simultaneously, only the optimization of one storage pool is allowed.

After waiting for everything to be created automatically, we will already have the main storage pool created and configured. It will automatically create two “shared folders” named “Public” and “homes”. The default configuration of these shared folders is:

  • Thin shared folder
  • Compression : enabled
  • Deduplication : disabled
  • Snapshots : disabled

Below, you can see how it appears in the main menu.

The compression on ZFS saves us a lot of storage space, usually the compression algorithm ZFS is LZ4, very popular for providing a very good compression ratio performance and therefore will not notice a decrease in reading performance and writing too sharp. This compression is done in real time while we are writing to storage.

The deduplication online is block based with ZFS, we allow this deduplication before data is written in the storage pool . This feature allows us to optimize the use of storage, however, this functionality consumes a large amount of RAM. In fact, QNAP doesn’t allow you to use this functionality if you don’t have 16GB of RAM or more.

If we right click on a shared folder, we can access these settings:

  • Update Public
  • Extend all nodes
  • Collapse all nodes
  • Take snapshot
  • Snapshot replica
  • Manage

If we click on ” Manage ” we can see all the details of this shared folder. We can change the size of the shared folder, enable or disable compression and deduplication (if you have more than 16GB of RAM). You can also edit folder properties, edit permissions, view statistics, set a warning threshold, rename the shared folder, and convert to “Thick” instead of “Thin”.

If we click on “Manage” in the storage pool , we can see a global view of all the shared folders inside. In the ” Data reduction ” tab we can see the percentage of data reduction thanks to the native compression of ZFS and deduplication if we have it activated. We can also configure compression and deduplication directly from here. In the statistics button we can see the data reduction statistics that we have, ideal to see if we are really saving space on the hard drives or SSD.

In the tab ” Storage pool ” we can delete the storage pool, expand the pool and other typical actions.

By default the shared folders “Public” and “homes” are configured as ” Shared Folder Thin “, but we can easily configure it as “Shared Folder Thick”. What do thick and thin mean? Next, we explain it in detail:

  • Thin Shared Folder – With thin provisioning, pool space is allocated on demand as data is written to the shared folder. We can carry out an over-provisioning, we will not have a predetermined maximum size. This means that we will not have a maximum of space to occupy, and it is possible that we will not be able to fill a folder if another Thin folder has occupied all the storage space.
  • Thick Shared Folder : With this type of provisioning, space is allocated when the shared folder is created, ensuring that the space is always available. We can define that the “Public” folder has 10GB and “homes” has 50GB, and they will never exceed these values.

Other possibilities of shared folders, in addition to being able to activate compression and deduplication, is the possibility of configuring the SSD cache if we have it configured in the operating system. We can also configure fast cloning , this feature allows us to copy data more quickly within individual shared folders and LUNs, using the ZFS copy function, and has an additional RAM memory consumption.

Finally, we will have the possibility to configure the synchronized I / O of ZIL, in this case we will have three options depending on your needs:

  • Standard (default) : I / O transactions are synchronous or asynchronous depending on the application and the type of request.
  • Always – All transactions are synchronous, this provides maximum integrity and protection against power outages. The downside is that it reduces performance. When this option is used, the cache acceleration write register (which we will see soon) must be activated, so that the performance is not too low.
  • None – all transactions are asynchronous. This option is the one that offers the highest performance, but we could have data loss in the event of a power outage.

Once we have seen how to create the first storage pool for the operating system with the default folders, we are going to see how to create a second storage pool.

Second Storage Pool Configuration

The process for creating a second storage pool is very simple. We have to go to the “Storage and snapshots” section and proceed to create a “New storage pool”. The same configuration menu will come out step by step, now we will choose the two hard drives and we will also configure them in “Mirror” or “RAID 1” mode.

Although we are using hard drives, we can also configure an over provisioning of ZFS, for example, 10%. In addition, we must also optimize this storage pool, configure the guaranteed space for snapshots and the alert threshold for occupancy. Next, we will get a summary of all the configurations made, with their corresponding over-provisioning and guaranteed space for snapshots.

Finally, it will warn us that all the data on the disks will be erased, and also that optimizing the storage pool could take a long time.

Once we have created it, we will have the storage pool optimizing.

Once we have this second storage pool ready, we are going to create a new shared folder. So far we have had two shared folders, and they were created automatically by the operating system for the system.

Creating Shared Folders in ZFS

To create a shared folder, just go to the ” Storage and snapshots ” section and click on “Create” and ” New shared folder “. A small wizard will appear that will allow us to easily create a shared folder in ZFS, in addition, it reminds us that we can enable compression and deduplication functions to save a large amount of storage space.

In the first menu we can enter the following information to create a new folder:

  • Folder name
  • Comments of the created folder
  • Storage pool chosen to store this folder
  • Space allocation: thick or thin provisioning.
  • Assign a quota to the folder at most
  • Guaranteed space for snapshots in this shared folder
  • Folder encryption: we can encrypt the contents of the folder with a passphrase.

We must bear in mind that, if we encrypt a shared folder, the performance will be somewhat lower, however, with today’s processors that have AES-NI hardware encryption acceleration, this performance is not greatly affected.

In the storage configuration tab, we can see more configurations that we can make in this shared folder:

  • Data reduction: compression and deduplication (the latter is only available with NAS with 16GB of memory or more).
  • Performance: SSD cache and fast clone
  • ZIL Synchronized I / O Mode: Standard, Always, Never
  • Performance profile: we select the size of the block that we want. Depending on the data that we are going to store, a larger or smaller block size is recommended. For example, for video files and large files, 128K is ideal. A fairly versatile block size would be 32K.
  • WORM (Write Once Read Many) settings: this functionality allows the data stored in the shared folder cannot be modified or deleted. Also, it cannot be disabled once the folder has been created.

Once this shared folder has been configured in detail, we will have to configure the access privileges for the different users and also configure the properties of said folder with the usual options:

  • Guest permissions
  • Hide network drive
  • Lock file
  • Activate recycle bin
  • Restrict Trash Access To Administrators Only
  • Enable sync on this folder
  • Other options

Finally, QNAP will provide us with a summary of all the configurations made in this shared folder. If we click on “Finished” it will finish creating and will be available in a minute.

As you can see, all the configurations made have been a success, and we will have the shared folder «Multimedia» ready for use.

Once we have seen how to configure a shared folder with ZFS, we are going to show you how to activate the SSD cache on this NAS server using the two M.2 NVMe drives.

SSD Cache Configuration on NAS via M.2 NVMe

In the section ” Storage and snapshots / Storage / Cache acceleration ” we can configure the SSD cache to accelerate the performance in reading and writing of the system, this will allow us to maximize the local network with the NAS. The first thing we have to do is click on the “+” button to create a cache storage pool.

QNAP gives us an introduction to the SSD cache with QuTS hero, internally it completely changes with what was done in the QTS operating system and EXT4 as a file system. In this case, ZFS allows us to create a write log on the SSD, which is not a read cache, but improves the speed when we do random writes. A very important detail is that in ZFS the files are written in the cache sequentially, therefore, it is not necessary to over-provision the SSD.

In the configuration wizard we can choose the two M.2 SSD units that we have in the computer, we will choose the type of cache:

  • Read cache
  • Read cache and write I / O register

We have chosen the second option, SSD cache both in reading and writing. The read cache will have a capacity of 807GB and the ZIL log cache is 10GB, therefore, internally a RAID 0 is being configured to have the best possible performance. Once configured, we can enable the SSD cache wherever we want, including also in the shared folders that are on an SSD. Regarding the cache mode, we can select between random I / O or all I / O operations, we have chosen this second option to accelerate the overall performance of the NAS server, both for file sharing, virtualization applications etc.

In the last step it will show us a summary, in this summary we can see the configuration previously made, if we click on «Create» it will automatically start working. QNAP will warn us that all the data in the SSD cache will be erased, and that if we want to remove one of these SSDs we must first disable the SSD cache function, to wait for this data to be transferred to the disks, otherwise we could have data loss even though the NAS server is turned off.

In the main menu of cache acceleration we can see that it is activated in all shared folders, and that it is prepared and ready to squeeze the most of the equipment’s hardware.

If we click on the upper right area where it says “Manage” we can see the disks that we are using, and if we want to enable or disable the SSD cache in the different shared folders.

Once we have seen how to configure SSD cache acceleration on this NAS server, we are going to look at the ZFS configuration summary and also by commands.

ZFS Configuration Summary

The configuration of the different storage pools and shared folders in this QuTS hero operating system consists of:

  • Main storage pool for SSD-based system in RAID 1.
    • Shared folders with data encryption enabled and no encryption enabled.
    • All shared folders are with SSD cache acceleration.
    • Compression activated.
    • Deduplication off, we don’t have 16GB of RAM on the NAS.
  • Storage Pool 2 with RAID 1 for data.
    • All folders are thick over provisioning, compression enabled, deduplication disabled.
    • SSD cache acceleration on all shared folders.

Below, you can see the summary of all the configurations made:

We must remember that when creating a “Shared Folder”, we will automatically see it in the ” Control Panel / Privilege / Shared Folders ” section, as you can see below:

Internally, if we SSH into the QNAP NAS server and execute some commands, we will be able to see both the storage pools and the datasets that have been created automatically.

We can also see the different mount points of the dataset, and we can even see the mount points of the snapshots that we can use with ZFS. All this has been created completely automatically based on the configuration made through the wizards.

So far we have come with this complete tutorial on how to configure the ZFS file system on a NAS server with the QuTS hero operating system. Undoubtedly, with this operating system and file system, we will achieve the best possible data integrity, at the same time that we will achieve great performance in reading and writing, thanks to the hardware of the equipment and the acceleration with SSD cache.


by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment