Get a Quote     (408) 943-4100               TrueNAS Discord      VendOp_Icon_15x15px   Commercial Support Toggle between Light and Dark mode

Adding Zvols

  3 minute read.

Last Modified 2022-09-27 14:11 -0400

A ZFS Volume (Zvol) is a dataset that represents a block device. These are needed when configuring an iSCSI Share.

To create a zvol in a pool, go to Storage > Pools then click   and Add Zvol.

Options

StoragePoolsCreateZvol

To quickly create a Zvol with the default options, enter a name for the Zvol, a size, and click SAVE.

See Zvols Screen for more information on zvol settings.

Setting Zvol Block Sizes

To set the zvol block size, click ADVANCED OPTIONS on the ADD ZVOL screen. This adds the Block Size setting near the bottom of the screen. Select that option that suits the use case or uses the information below to help determine the correct setting to use.

TrueNAS automatically recommends a space-efficient block size for new zvols. This table shows the minimum recommended volume block size values. To manually change this value, use the Block size dropdown list.

Configuration Number of Drives Optimal Block Size
Mirror N/A 16k
Raidz-1 3 16k
Raidz-1 4/5 32k
Raidz-1 6/7/8/9 64k
Raidz-1 10+ 128k
Raidz-2 4 16k
Raidz-2 5/6 32k
Raidz-2 7/8/9/10 64k
Raidz-2 11+ 128k
Raidz-3 5 16k
Raidz-3 6/7 32k
Raidz-3 8/9/10/11 64k
Raidz-3 12+ 128k

Additional tuning might be required for optimal performance, depending on the workload. iXsystems engineers are available to assist Enterprise customers with tuning their TrueNAS hardware. The workload tuning chapter of the OpenZFS handbook is also a good resource.

Managing Zvols

To see options for an existing zvol, click next to the desired zvol in Storage > Pools:

Use Delete zvol to remove the zvol from TrueNAS.

Deleting zvols can result in unrecoverable data loss! Be sure that any critical data is moved off the zvol or is otherwise obsolete.
Deleting a zvol also deletes all snapshots of that zvol. Use Edit Zvol to open the zvol creation form to change the previously saved settings. Similar to datasets, a zvol name cannot be changed. Use Create Snapshot to take a single current-point-in-time image of the zvol and save it to Storage > Snapshots. A snapshot name is suggested in Name along with an extra option to make the snapshot Recursive is available.

When the selected zvol is cloned from an existing snapshot, Promote Dataset is available. When a clone is promoted, the original volume becomes a clone of the clone, making it possible to delete the volume that the clone was created from. Otherwise, a clone cannot be deleted while the original volume exists.

When the zvol is created with encryption enabled, additional Encryption Actions are displayed.

Related Storage Articles