Expanding Thin and Thick provisioned Block Based LUNs
Symptoms
Having created your SoftNAS instance with a set storage size, it may become necessary to increase this size at a later date. Unfortunately, with iSCSI LUNs, this cannot be done via the SoftNAS UI. Expanding block-based LUNS is a task that must be performed via the command line. This guide will provide you with the necessary instructions.
This article will outline the command line process required in order to expand block based storage for iSCSI LUNs.
A Buurst best practice is when expanding a pool is to always use disks of the same type as the original disks used to create the pool. Using a mix of different disk types with different performance characteristics can cause performance discrepancies for the pool.
For this article, we will assume we have an iSCSI volume created, with a size of 8 GB and we want to expand this iSCSI volume to 14 GB.
Ensure that you are logged in as root.
zfs listIn the example to the right, you can see our LUN_iscsi1, which is thin provisioned, with the size of the volume and pool being only 7.10 GiB.
zfs get volsize <name_of_pool>/<name_of_LUN>targetcli lsThis step can be skipped if you are using thin-provisioned volume(s)
Since we are using thin-provisioning, our VALUE is set to none.
zfs get reservation <name_of_pool>/<name_of_LUN>zfs listzfs get volsize <name_of_pool>/<name_of_LUN>zfs set volsize=<size> <name_of_pool>/<name_of_LUN>zfs get volsize <name_of_pool>/<name_of_LUN>targetcli lsThis step is ONLY for thick-provisioned LUNS. This step should be skipped if you are using thin-provisioning.
zfs set reservation=<size><G or T>
zfs get reservation <name_of_pool>/<name_of_LUN>You can see that we only have 7.10GB before the expansion
Follow the Extend Volume Wizard instructions.