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

Increasing iSCSI Available Storage

  2 minute read.

Last Modified 2023-02-03 13:52 EST

Expanding LUNs

TrueNAS lets users expand Zvol and file-based LUNs to increase the available storage in an iSCSI share.

Zvol LUNs

To expand a Zvol LUN, go to Datasets and click the Zvol LUN name. The Zvol Details widget displays. Click the Edit button.


Enter a new size in Size for this zvol, then click Save.


TrueNAS prevents data loss by not allowing users to reduce the Zvol size. TrueNAS also does not allow users to increase the Zvol size past 80% of the pool size.

File LUNs

You need to know the path to the file to expand a file-based LUN. Go to Shares and click Configure in the Block (iSCSI) Shares Targets window, then select the Extents tab.


Click the next to the file-based LUN and select Edit.


Highlight and copy the path to the extent, then close the Edit Extent window.

Go to System Settings > Shell and input sudo truncate -s +[size] [path to file], where [size] is how much space you want to grow the file by, and [path to file] is the file path you copied earlier. Then press Enter.

In our example, the command looks like this: sudo truncate -s +1g /mnt/tankgrem3/test83/filelun


Lastly, go back to the extent in Shares > Block (iSCSI) Shares.

Click the Configure button in the window header, then click the Extents tab. Lastly, click the next to the file-based LUN and select Edit. Make sure the Filesize for the file-based LUN is set to 0 so that the share uses the actual file size. Click Save to retain any changes.


Related Content