7 minute read.Last Modified 2021-09-08 09:42 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.
Find the pool and top-level (root) dataset for that pool, then click and Add Dataset.
To quickly 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 a dataset Name before clicking Submit.
|Name||Unique identifier for the dataset. Cannot be changed after the dataset is created.|
|Comments||Notes about the dataset.|
|Sync||Standard uses the sync settings that have been requested by the client software. Always waits for data writes to complete, and Disabled never waits for writes to complete.|
|Compression level||drop down|
|Enable Atime||drop down|
By default, datasets Inherit the Encryption Options from the root or parent dataset. To configure the dataset with different encryption settings, unset Inherit and choose the new Encryption Options. 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 generally 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. Cannot be changed after the dataset is created.|
|Share Type||Define the type of data sharing the dataset will use to optimize the dataset for that sharing protocol. Cannot be changed after the dataset is created.|
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’s 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 will Inherit this value from the parent dataset. Unset Inherit to change the value.|
|Quota critical alert at, %||Generate a critical level alert when consumed space reaches the defined percentage. By default, the dataset will Inherit this value from the parent dataset. Unset Inherit 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 the dataset being being modified. Off allows users accessing the dataset to modify its contents.|
|Exec||On allows processes to be executed from within this dataset. Off prevents processes from executing in the dataset. We recommend setting it to On.|
|Snapshot directory||Controls visibility of the .zfs directory on the dataset. Choose between 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, could result in better performance.|
|ACL Mode||Determine how chmod behaves when adjusting file ACLs. See the zfs |
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. Setting the ACL Mode to Restricted is typically used to optimize a dataset for SMB sharing, but 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 will be assigned to the special allocation class while greater blocks will be 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 will be allocated in the special class. Before setting this property, a special class vdev must be added to the pool.|
After creating a dataset, users can manage additional options by going to Storage and clicking on a dataset:
- Add Dataset creates a new “child” dataset in this dataset. You can continuously 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.
- Edit Permissions opens the dataset’s access permissions editor. Depending on the ACL type users select during dataset creation, the permissions editor will either be 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 in 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’s row and click , then click edit.
The Edit User window lets users edit the User Data Quota and User Object Quota.
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’s row and click >, then click edit Edit.
The Edit Group window lets users edit the Group Data Quota and Group Object Quota.
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.