TrueNASTrueNAS Nightly Development Documentation
This content follows experimental nightly development software. Pre-release software is intended for testing purposes only.
Use the Product and Version selectors above to view content specific to a stable software release.

Zvols

The zvol screens and widgets, accessed from the Datasets screen, allow you to add or edit a zvol and manage the volume storage. Zvols are listed on the Datasets screen tree table.

Dataset Tree Table and Zvol Widgets
Figure 1: Dataset Tree Table and Zvol Widgets

The tree table includes storage space used and available for that zvol (or dataset), encryption status (locked, unlocked, or unencrypted), and the role of that zvol or dataset or what service uses it (i.e., the system dataset, a share, virtual machine, or application).

Add Zvol displays after you select a root, non-root parent, or child dataset. It does not display if you select an existing zvol.
Click on any root or non-root parent dataset to expand the tree table. Click on any zvol to select it and display the widgets for that zvol.

Zvol Widgets

Each zvol has a set of information cards (widgets) that display in the Details for zvolname area of the screen and provide information grouped by functional areas. Add Zvol opens the Add Zvol screen. Dataset widgets are:

Zvol Details Widget

The Zvol Details widget lists information on volume type, and the sync, compression level, case sensitivity, Atime, and ZFS deduplication settings. The Zvol Details widget shows information on volume type, and the sync, compression level, case sensitivity, Atime, and ZFS deduplication settings. Path displays the full path for the selected zvol.

Zvol Details Widget
Figure 2: Zvol Details Widget

Edit opens the Edit Zvol screen for the selected zvol.

Delete opens the Delete zvol dialog.

Delete Zvol

The Delete Zvol dialog shows information about other options or services that use the zvol. It also shows the services child datasets use. This includes information about snapshots, shares, or if used, other services such as Kubernetes or VMs that use the dataset. Parent and child datasets include the Delete button.

Delete Zvol
Figure 3: Delete Zvol

The window includes a field where you type the path for the zvol, and a Confirm option you must select to activate the Delete Dataset button.

Zvol Space Management Widget

The Zvol Space Management widget displays space allocation (reserved, used, available) for the zvol.
The widget displays after unlocking encrypted zvols. The widget donut graph provides at-a-glance information and numeric values for the space allocated and used in the selected zvol. This includes data written and space allocated to child datasets of this dataset. It provides access to quota configuration options for the parent dataset and the child dataset of the parent, and for users and groups with access to the dataset.

Zvol Space Management Widget
Figure 4: Zvol Space Management Widget

Edit opens the Capacity Settings screen where you can set quotas for the zvol.

The widget displays quotas set for users or groups.

ZFS Encryption Widget

The ZFS Encryption widget displays for zvols configured with encryption. It shows the current state of the encryption, the encryption root, the type, and the algorithm used. The ZFS Encryption widget displays the Lock or Unlock options if it uses key encryption instead of a passphrase. The Export Key option displays if the zvol uses key encryption.

ZFS Encryption Widget Zvol
Figure 5: ZFS Encryption Widget Zvol

Edit opens the Edit Encryption Options for dataset window for the selected zvol.

For more details on encryption windows and functions see Encryption Settings.

Data Protection Widget

The Data Protection widget displays for all datasets or zvols. It shows information for the number of snapshots and other data protection-related scheduled tasks (replication, cloud sync, rsync, and snapshots) configured on the system. It provides access to the tasks found on the Data Protection screen through links.

Data Protection Widget
Figure 6: Data Protection Widget

Create Snapshot opens the Add Snapshot screen.

Manage Snapshots opens the Snapshots screen list view where you can manage snapshots.

Manage Snapshot Tasks opens the Data Protection > Periodic Snapshot Tasks screen list view where you can manage scheduled periodic snapshot tasks.

Manage Replication Tasks opens the Data Protection > Replications Tasks screen list view where you can manage scheduled replication tasks.

Manage Cloud Sync Tasks opens the Data Protection > Cloud Sync Tasks screen list view where you can manage scheduled cloud sync tasks.

Manage Rsync Tasks opens the Data Protection > Rsync Tasks screen list view where you can manage scheduled rsync tasks.

Add and Edit Zvol Screens

The Add Zvol and Edit Zvol screens allow admin users with the right permission level to create and modify zvols. Both screens include the same settings but you cannot change the zvol name, Block Size, or select the Sparse option after you click Save on the Add Zvol screen.

After adding a zvol, click Edit on the Zvol Details widget to open the Edit Zvol screen. To edit encryption options, click Edit on the ZFS Encryption widget.

Add Zvol Screen
Figure 7: Add Zvol Screen
Add Zvol Settings
SettingDescription
Zvol nameRequired setting. Enter a short name for the zvol. Using a zvol name longer than 63 characters can prevent accessing zvols as devices. For example, you cannot use a zvol with a 70-character file name or path as an iSCSI extent.
CommentsEnter any notes about this zvol.
Size for this zvolSpecify size and value. You can include units like t as in TiB, and G. You can increase the size of the zvol later, but you cannot reduce the size. If the size is greater than 80% of the available capacity, the creation fails with an out-of-space error unless you select Force size.
Force sizeSelect to enable the system to create a zvol where the size is over 80% capacity. By default, the system does not create a zvol of this size. While not recommended, enabling this option forces the creation of the zvol.
SyncSelect the data write synchronization option from the dropdown list. Inherit gets the sync settings from the parent dataset. Standard uses the sync settings requested by the client software. Always waits for data writes to complete. Disabled never waits for writes to complete.
Compression levelSelect the option from the dropdown list for the type of data compression to use for encoding information in less space than the original data occupies. Select the algorithm that balances disk performance with the amount of space saved. See below for the options.
ZFS DeduplicationDo not change this setting unless instructed to do so by your iXsystems support engineer. Select to transparently reuse a single copy of duplicated data to save space. Deduplication can improve storage capacity, but it is RAM intensive. Compressing data is recommended before using deduplication. Deduplicating data is a one-way process. You cannot un-deduplicate deduplicated data!
SparseUsed to provide thin provisioning. Use with caution as writes fail when space is low on a pool.
Block sizeSelect the size option from the dropdown list. The default is 16KiBt, other options are 4KiB, 8KiB, 16KiB, 32KiB, 64KiB, 128KiB. The zvol default block size is automatically chosen based on the number of disks in the pool for a general use case.
Read-onlySelect the option to use to prevent modifying the zvol. Options are Inherit (off), On or Off.
SnapdevSelect the option that controls whether the volume snapshot devices under /dev/zvol/poolname are hidden or visible from the dropdown list. Options are Inherit (hidden), Visible and Hidden (default value).

Encryption options do not display unless you create the zvol and encrypted dataset.

Block Size Table

TrueNAS recommends a space-efficient block size for new zvols. This table shows the minimum recommended volume block size values by configuration (mirror or RAIDz type). Use this table to change the Block size value.

ConfigurationNumber of DrivesOptimal Block Size
MirrorN/A16k
Raidz-1316k
Raidz-14/532k
Raidz-16/7/8/964k
Raidz-110+128k
Raidz-2416k
Raidz-25/632k
Raidz-27/8/9/1064k
Raidz-211+128k
Raidz-3516k
Raidz-36/732k
Raidz-38/9/10/1164k
Raidz-312+128k

Depending on their workload, zvols can require additional tuning for optimal performance. See the OpenZFS handbook workload tuning chapter for more information.

Data Compression Algorithms

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.

Encryption Options

Encryption Options only display on the Add Zvol screen. To change encryption settings, use the Edit button on the ZFS Encryption widget.

The default setting is Inherit. Clearing the checkbox displays the key encryption options. Clear the Inherit(non-encrypted) checkbox to display additional settings.

Add Zvol Encryption Options Clear Inherit
Figure 8: Add Zvol Encryption Options Clear Inherit

Selecting other options changes the settings displayed.

Encryption Settings
SettingDescription
Inherit (non-encrypted)Select to clear the checkmark to display more encryption settings.
EncryptionSelect to clear the checkmark and remove the encryption settings from the Add Zvol screen. If the root dataset is not encrypted, leaving Inherit (non-encrypted) selected is the same as clearing the Encryption checkbox.

SettingDescription
Encryption TypeSelect the option for the type of encryption to secure the dataset from the dropdown list. Select Key to use key-based encryption and display the Generate Key option. Select Passphrase to enter a user-defined passphrase to secure the dataset. This displays two additional Passphrase fields to enter and confirm the passphrase and the pbkdf2iters field.
Generate keySelected by default to have the system randomly generate an encryption key for securing this dataset. Clearing the checkbox displays the Key field and requires you to enter an encryption key you define. Warning! The encryption key is the only means to decrypt the information stored in this dataset. Store encryption keys in a secure location! Creating a new key file invalidates any previously downloaded key file for this dataset. Delete any previous key file backups and back up the new key file.
KeyEnter or paste a string to use as the encryption key for this dataset.
AlgorithmDisplays for both key and passphrase encryption types. Select the mathematical instruction set that determines how plaintext converts into ciphertext from the dropdown list of options. See Advanced Encryption Standard (AES) for more details.
Passphrase
Confirm Passphrase
Enter the alpha-numeric string or phrase you want to use to secure the dataset.
pbkdf2itersEnter the number of password-based key deviation function 2 (PBKDF2) iterations to use for reducing vulnerability to brute-force attacks. Entering a number larger than 100000 is required. See PBKDF2 for more details.