8 minute read.Last Modified 2022-05-08 17:09 EDT
A 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 in the desired pool, go to Storage.
Select the pool top-level (root) dataset, and then click the and select Add Dataset.
To create a dataset with the default options, enter a name and click Submit.
You must configure the Name and Options fields to create the dataset. Datasets typically inherit settings from the root or parent dataset, so you only need to enter the dataset Name before clicking Submit.
|Name||Unique identifier for the dataset. Cannot change after creating and saving the dataset.|
|Comments||Notes about the dataset.|
|Sync||Standard uses the sync settings requested by the client software. Always waits for data writes to complete, and Disabled never waits for writes to complete.|
|Compression level||A drop-down list.|
|Enable Atime||A drop-down list.|
By default, datasets inherit the encryption settings on the Encryption Options form from the root or parent dataset. To configure the dataset with different encryption settings, clear the Inherit checkbox and enter the new Encryption Options form values. For detailed descriptions of the encryption options, see the Encryption article.
The Other Options help tune the dataset for specific data sharing protocols:
|ZFS Deduplication||Transparently reuse a single copy of duplicated data to save space. Deduplication can improve storage capacity, but is RAM intensive. Compressing data is recommended before using deduplication. Deduplicating data is a one-way process. Deduplicated data cannot be undeduplicated!|
|Case Sensitivity||Sensitive assumes filenames are case sensitive. Insensitive assumes filenames are not case sensitive. Mixed understands both types of filenames. You cannot change this after the saving the dataset.|
|Share Type||Define the type of data sharing the dataset uses to optimize the dataset for that sharing protocol. You cannot change this setting after the saving dataset.|
Clicking Advanced Options adds dataset quota management tools and a few additional fields to the Other Options:
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.
|Quota for this dataset||Define the maximum allowed space for the dataset. 0 disables quotas.|
|Quota warning alert at, %||Generate a warning level alert when consumed space reaches the defined percentage. By default, the dataset inherits this value from the parent dataset. Clear the Inherit checkbox to change the value.|
|Quota critical alert at, %||Generate a critical level alert when consumed space reaches the defined percentage. By default, the dataset inherits this value from the parent dataset. Clear the Inherit checkbox to change the value.|
|Reserved space for this dataset||Reserve additional space for datasets that contain logs which could eventually take up all the available free space. 0 is unlimited.|
TrueNAS adds more fields to the Other Options. By default, many of these options inherit their values from the parent dataset.
|Read-only||On prevents modifying the dataset. Off allows users accessing the dataset to modify its contents.|
|Exec||On allows executing processes from within this dataset. Off prevents executing processes from with the dataset. We recommend setting it to On.|
|Snapshot directory||Controls visibility of the .zfs directory on the dataset. Select either Visible or Invisible.|
|Copies||Duplicates ZFS user data stored on this dataset. Choose between 1, 2, or 3 redundant data copies. This can improve data protection and retention, but is not a substitute for storage pools with disk redundancy.|
|Record Size||Logical block size in the dataset. Matching the fixed size of data, as in a database, can result in better performance.|
|ACL Type||Inherit preserves ACL type from the parent dataset.|
Off to use neither NFSv4 or POSIX protocols.
NFSv4 use to losslessly migrate Windows-style ACLs across Active Directory domains (or stand-alone servers) that use ACL models richer than POSIX. Since POSIX ACLs are a Linux-specific ZFS feature, administrators should use NFSv4 to maintain compatibility with TrueNAS Core, FreeBSD, or other non-Linux ZFS implementations.
POSIX use 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.
For a more in-depth explanation of ACLs and configurations in TrueNAS SCALE, see our ACL Primer.
|ACL Mode||Determine how chmod behaves when adjusting file ACLs. See the zfs(8) |
Passthrough only updates ACL entries that are related to the file or directory mode.
Restricted 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. Set the ACL Mode to restricted to optimize a dataset for SMB sharing, but it can require further optimizations. For example, configuring an rsync task with this dataset could require adding
|Metadata (Special) Small Block Size||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 selecting the dataset and clicking for that dataset.
- Add Dataset creates a new child dataset in this dataset. You can continue to layer datasets in this manner.
- Add Zvol creates a new ZFS block device as a child in this dataset.
- Edit Options allows users to adjust the dataset configuration. Users cannot change the Name, Case Sensitivity, or Share Type after saving the dataset.
- Edit Permissions opens the dataset access permissions editor. Depending on the ACL type users select during dataset creation, the permissions editor is either a simple permissions editor or the full ACL editor. For more information, see the permissions article.
- User Quotas lets users set data or object quotas for user accounts cached on or connected to the system.
- Group Quotas lets users set data or object quotas for user groups cached on or connected to the system.
- Delete Dataset removes the dataset, all stored data, and any snapshots from TrueNAS.
Deleting datasets can result in unrecoverable data loss! Be sure to move or obsolete any critical data off the dataset.
- Create Snapshot takes a single dataset ZFS snapshot to provide additional data protection and mobility. The system lists created snapshots on the Snapshots screen.
TrueNAS allows setting data or object quotas for user accounts and groups cached on or connected to the system.
To view and edit user quotas, go to Storage and click next to a dataset to open the Dataset Actions menu, then select User Quotas.
The User Quotas page displays the names and quota data of any user accounts cached on or connected to the system.
To edit individual user quotas, go to the user row and click , then click edit.
The Edit User window lets users edit the User Data Quota and User Object Quota values.
User Data Quota is the amount of disk space that selected users can use. User Object Quota is the number of objects selected users can own.
To edit user quotas in bulk, click Actions and select Set Quotas (Bulk).
The Set Quotas window lets you edit user data and object quotas after selecting any cached or connected users.
Go to Storage and click next to a dataset to open the Dataset Actions menu, then select Group Quotas.
The Group Quotas page displays the names and quota data of any groups cached on or connected to the system.
To edit individual group quotas, go to the group row and click >, then click edit Edit.
The Edit Group window lets users edit the Group Data Quota and Group Object Quota values.
To edit group quotas in bulk, click Actions and select Set Quotas (Bulk).
TrueNAS presents the same options for single groups and lets users choose groups for the new quota rules.