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.
For this article, we will assume we have an iSCSI volume created, with a size of 8 GB. (We will pretend this is 1995, which would make this a fair bit of data). We want to expand this iSCSI volume to 14 GB.
- Log into your instance using SSH.
For guidance on how to connect to your Linux instance, click here.
For Guidance on how to connect to your Windows Instance, click here.
Ensure you are logged in as root, in order to provide the appropriate credentials to perform the actions that follow.
- The first thing to do is to list the available volumes, in order to ensure you can select the desired instance.
In the example below, you can see that there is our LUN_iscsi1 which is thin provisioned. The size of the volume and pool is only 7.10 gigabytes.
- Next, we want to obtain the current LUN size. This can be retrieved with the command:
- Next, we can verify our LUN's size before the expansion. This can be retrieved with the command:
- Next, obtain the current reservation size with the command below ( Only for Thick Provisioned LUNS ). This will tell you what the thick-provisioned size of the volume would be. However, if you are using thin provisioned volume(s) you can skip this step:
You can see that since we are using thin provisioning the Value is set to 'none'
- Next, we can obtain the new pool size after expansion. This can be retrieved with the command:
- If we run the command below you will notice that our volume ( LUN_iscsi1 ) has not changed after we expanded the pool:
- To reflect the change run the command below:
- Next, To verify that the change is made, rerun the get volsize command previously run prior to setting the size to verify it is set:
- We will also want to have the reservation changed ( Only for Thick Provisioned LUNS ) - Keep in mind that you cannot have a volume that exceeds the available reservation pool space - in other words, a volume can obviously not be larger than the thick-provisioned maximum pool size. To change the reservation, run the following: (Skip this step if you are using thin provisioned volume/s)
- To verify, run the command below: ( Only for Thick Provisioned LUNS )
- Now all configurations changes have been completed on the SoftNAS side.
- Next, on the windows side let's head to: Computer Management → Disk Management. You can see that we only have 7.10GB before the expansion.
- Next, let's rescan the disk to reveal the new unallocated space by clicking the Action menu → Rescan Disk.
- We can now see the new unallocated space.
- Next, we can now extend the disk by doing the following and following the instructions by clicking Next through out the Menu buttons.
- Our new expanded Volume now reflects the new size.
- Once the changes above are completed, not only could we see the changes reflected in the SoftNAS UI, but also, we see that the volume has been expanded in windows explorer as well.