Increasing iSCSI Available Storage
2 minute read.
Last Modified 2022-08-18 08:41 -0400TrueNAS lets users expand Zvol and file-based LUNs to increase the available storage that the iSCSI shares.
To expand a Zvol LUN, go to Storage and click the more_vert next to the Zvol LUN, then select Edit Zvol.
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.
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 more_vert next to the file-based LUN and select Edit.
Highlight and copy the path, then click Cancel.
Go to Shell and input truncate -s +[size] [path to file]
, then press Enter.
Where [size] is how much space you want to grow the file by, and [path to file] is the file path you copied earlier.
An example command could look like this: truncate -s +2g /mnt/Pool1/Dataset1/File LUN
Lastly, go back to the extent in Shares > Block (iSCSI) Shares Targets and make sure the Filesize is set to 0 so that the share uses the actual file size.