Adding and Managing Datasets
7 minute read.
Last Modified 2022-12-09 09:08 -0500A TrueNAS dataset is a file system within a data storage pool. Datasets can contain files, directories (child datasets), and have individual permissions or flags. Datasets can also be encrypted, either using the encryption created with the pool or with a separate encryption configuration.
We recommend organizing your pool with datasets before configuring data sharing, as this allows for more fine-tuning of access permissions and using different sharing protocols.
To create a dataset using the default settings, go to Storage. Default settings includes settings datasets inherit from the parent dataset.
Select a dataset, pool (root) dataset or a child dataset, click the and then select Add Dataset.
Enter a name and click Save.
You can create datasets optimized for SMB shares or with customized settings for your dataset use cases.
Review the Share Type and Case Sensitivity options on the configuration screen before clicking Save. You cannot change these settings and the Name setting after clicking Save.
Compression encodes information in less space than the original data occupies. We recommended you choose a compression algorithm that balances disk performance with the amount of saved space.
Select the compression algorithm that best suits your needs from the Compression dropdown list of options.
LZ4 maximizes performance and dynamically identifies the best files to compress. LZ4 provides lightning-fast compression/decompression speeds and comes coupled with a high-speed decoder. This makes it one of the best Linux compression tools for enterprise customers.
ZSTD offers highly configurable compression speeds, with a very fast decoder.
Gzip is a standard UNIX compression tool widely used for Linux. It is compatible with every GNU software which makes it a good tool for remote engineers and seasoned Linux users. It offers the maximum compression with the greatest performance impact. The higher the compression level implemented the greater the impact on CPU usage levels. Use with caution especially at higher levels.
ZLE or Zero Length Encoding, leaves normal data alone but only compresses continuous runs of zeros.
LZJB compresses crash dumps and data in ZFS. LZJB is optimized for performance while providing decent compression. LZ4 compresses roughly 50% faster than LZJB when operating on compressible data, and is greater than three times faster for uncompressible data. LZJB was the original algorithm used by ZFS but it is now deprecated.
Click Advanced Options to see the dataset quota management tools.
Setting a quota defines the maximum allowed space for the dataset. You can also reserve a defined amount of pool space to prevent automatically generated data like system logs from consuming all of the dataset space. You can configure quotas for only the new dataset or include all child datasets.
Define the maximum allowed space for the dataset in either the Quota for this dataset. Enter 0 to disable quotas.
Dataset quota alerts are based on the percentage of used storage. To set up a quota warning alert, enter a percentage value in Quota warning alert at, %. When consumed space reaches the defined percentage it sends the alert. To change the setting from the parent dataset warning level, clear the Inherit checkbox and then change the value.
To set up the quota critical level alerts, enter the percentage value in Quota critical alert at, %. Clear the Inherit checkbox to change this value to something other than using the parent alert setting.
When setting quotas or changing the alert percentages for both the parent dataset and all child datasets, use the fields under This Dataset and Child Datasets.
Enter a value in Reserved space for this dataset to set aside additional space for datasets that contain logs which could eventually take all available free space. Enter 0 for unlimited.
For more information on quotas, see Managing User or Group Quotas.
By default, many of dataset options inherit their values from the parent dataset. When the Inherit checkbox is selected, whatever setting has this checkbox selected uses the settings from the parent dataset. For example, the Storage Encryption settings.
To change any setting that can inherit the parent setting, clear the checkmark and then enter the desired setting values for the child dataset you are configuring.
There are two Add Dataset or Edit Dataset screen ACL settings in the Advanced Options settings that you need to configure to use ACLs, ACL Type and ACL Mode.
You must select NFSv4 in ACL Type before you can change the ACL Mode setting. The system changes the ACL Mode setting if you select POSIX in ACL Type.
Leave the ACL Type Inherit checkbox selected to preserve the ACL type from the parent dataset. For SCALE, which is based on Linux, use either NFSv4 or POSIX. Warning dialogs display after selecting either setting. NFSv4 is richer than POSIX and is used to losslessly migrate Windows-style ACLs across Active Directory domains (or stand-alone servers). POSIX ACLs are a Linux-specific ZFS feature, used when an organization data backup target does not support native NFSv4 ACLs. Since the Linux platform used POSIX for a long time, many backup products that access the server outside the SMB protocol cannot understand or preserve native NFSv4 ACLs.
All datasets within an SMB share path must have identical ACL types
The ACL Mode setting determines how chmod behaves when adjusting file ACLs. See the zfs(8) aclmode
property.
When ACL Type is set to NFSv4 you can select Passthrough to only update ACL entries related to the file or directory mode or Restricted which does not allow chmod to make changes to files or directories with a non-trivial ACL.
An ACL is trivial if it can be fully expressed as a file mode without losing any access rules.
When set to Restricted it optimizes a dataset for SMB sharing, but it can also require further optimizations. For example, configuring an rsync task with this dataset could require adding --no-perms
in the task Auxiliary Parameters field.
For a more in-depth explanation of ACLs and configurations in TrueNAS SCALE, see our ACL Primer.
For more information on ACL settings see Setting Up Permissions.
Use the Metadata (Special) Small Block Size setting to set a threshold block size for including small file blocks into the special allocation class (fusion pools). Blocks smaller than or equal to this value are assigned to the special allocation class while greater blocks are assigned to the regular class. Valid values are zero or a power of two from 512B up to 1M. The default size 0 means no small file blocks are allocated in the special class. Before setting this property, you must add a special class vdev to the pool.
After creating a dataset, users can manage additional options by going to Storage and clicking the dataset icon to display the Dataset Actions list. Each option is described in detail in the Storage Dashboard Screen article.
Select Edit Options to change the dataset configuration settings. You can change all settings except Name, Case Sensitivity, or Share Type.
The Edit Dataset screen settings are identical to the Add Dataset screen.
Select View Permissions on the Dataset Actions list of options to open the Dataset Permissions widget. Click permissions article.
to display the Edit Permissions screen with the Unix Permissions Editor you use to configure ACLs. For more information, see theSelect Delete Dataset to remove the dataset, all stored data, and any snapshots from TrueNAS.
Deleting datasets can result in unrecoverable data loss! Move or obsolete any critical data off the dataset before performing the delete operation.