Extend device extent zvol iscsi vmware

wreedps

Patron
Joined
Jul 22, 2015
Messages
225
How do I increase the size of a device zvol extent that is presented via iscsi to vmware?

I am sure this is out there already, can someone point me to the directions?
 

zambanini

Patron
Joined
Sep 11, 2013
Messages
479
edit the zvol size(increase it),
restart the iscsi service,
within esx rescan the volumes...now you should be able to expand your vmfs volume
 

wreedps

Patron
Joined
Jul 22, 2015
Messages
225
Got it, only thing I have done yet is restart the iscsi service. Ill try that tomorrow. thanks!
 

csj

iXsystems
iXsystems
Joined
Oct 20, 2017
Messages
18
You don't need to restart the iscsi service. You just need to tell vmware to rescan your vmfs volumes.
 

wreedps

Patron
Joined
Jul 22, 2015
Messages
225
I still have not restarted the iscsi service on FreeNas, but in Vmware, even after rescanning, there is no extra space to add to the datastore....
 

wreedps

Patron
Joined
Jul 22, 2015
Messages
225
Restarted the Iscsi service on Freenas and the additional space appeared in Vmware to extend! Thanks guys!
 

wreedps

Patron
Joined
Jul 22, 2015
Messages
225
Yes it did for me also! Both my FreeNAS below are worked hard, run great!
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
"Scan for new storage" should be sufficient. "Scan for new VMFS volumes" is not - that will only query the existing extents for VMFS information, not perform a rescan of the iSCSI targets to update the disk geometry.

Restarting the ctld service should not be required as that would cause an interruption in access which your VMs likely wouldn't appreciate.
 

neeko

Cadet
Joined
Jan 11, 2012
Messages
2
I am experiencing the same issue as the OP. we are setting up a new TrueNas for iSCSI with vmWare and when I alter the size of my zvol and rescan HBA's in vmWare the size is not being detected. Stopping and Starting the iSCSI service resolves the issue.

I would like to get this fixed before this setup goes into production. Does anyone have any clues as to why this might be happening?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
I am experiencing the same issue as the OP. we are setting up a new TrueNas for iSCSI with vmWare and when I alter the size of my zvol and rescan HBA's in vmWare the size is not being detected. Stopping and Starting the iSCSI service resolves the issue.

I would like to get this fixed before this setup goes into production. Does anyone have any clues as to why this might be happening?
Do you have multiple extents attached to a single target in the FreeNAS UI under the iSCSI service?
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
At the risk of necro-posting, I believe I've gotten a solution of sorts worked out. I need to test it again on the latest build to see if the bug is still present; if it is, I'll file a report.

If your ZVOL/iSCSI extent doesn't expand, it seems to result from ctld not seeing the updated zvol size in the extent. To fix this, follow this order when expanding an iSCSI LUN:
  1. Expand your ZVOL through the Storage menu and save it
  2. From the Sharing - iSCSI - Extents menu, edit the extent associated with the ZVOL you just grew
  3. Edit or update the "Comment" field in the extent and save your changes
  4. Rescan the HBA from your iSCSI initiator (eg: vSphere) - possibly also refresh the Storage Devices pane
Editing the Comment field causes CTLD to rescan the config for the LUN, and also pick up the ZVOL size change. That's it.

If it's not fixed in the current release, perhaps a feature request to prompt on ZVOL size change "This ZVOL is mapped to an iSCSI extent - would you like to refresh the iSCSI extent now?"
 

beat_box

Cadet
Joined
Jan 12, 2023
Messages
5
Hi,

Just as a FYI, I'm running TrueNAS Scale 22.12.0. My iSCSI uses a device Zvol that I expended within TrueNAS. I have three VMware hosts attached to it. I tried scanning the in VMware, stopping and starting the iSCSI Service in TrueNAS, still the same size.

This is through vCenter Server 8. I ended-up going to the the Datastore itself then, under Configure-General, there is an option to increase. I did that, went through the steps, accepting all the defaults, that is, using all the space available and there I was.

All is good now. Cheers!!!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Go to Services (on the left side of the GUI), use the switch next to iSCSI to stop and start it again.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
if so are the VM's from VMware running affected?
If you stop the service providing their disks, then they probably will be... I wouldn't plan to do that with the VMs still running.

but:
You don't need to restart the iscsi service. You just need to tell vmware to rescan your vmfs volumes.
 
Last edited:

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
if so are the VM's from VMware running affected? Thanks
Yes, they will definitely have a momentary interruption in access when the iSCSI service is restarted.

Did you attempt to follow the steps I outlined about adding/changing a comment in the extent configuration, and then rescan the storage adapters in VMware?

  1. Expand your ZVOL through the Storage menu and save it
  2. From the Sharing - iSCSI - Extents menu, edit the extent associated with the ZVOL you just grew
  3. Edit or update the "Comment" field in the extent and save your changes
  4. Rescan the HBA from your iSCSI initiator (eg: vSphere) - possibly also refresh the Storage Devices pane
 

SamM

Dabbler
Joined
May 29, 2017
Messages
39
At the risk of necro-posting, I believe I've gotten a solution of sorts worked out. I need to test it again on the latest build to see if the bug is still present; if it is, I'll file a report.

If your ZVOL/iSCSI extent doesn't expand, it seems to result from ctld not seeing the updated zvol size in the extent. To fix this, follow this order when expanding an iSCSI LUN:
  1. Expand your ZVOL through the Storage menu and save it
  2. From the Sharing - iSCSI - Extents menu, edit the extent associated with the ZVOL you just grew
  3. Edit or update the "Comment" field in the extent and save your changes
  4. Rescan the HBA from your iSCSI initiator (eg: vSphere) - possibly also refresh the Storage Devices pane
Editing the Comment field causes CTLD to rescan the config for the LUN, and also pick up the ZVOL size change. That's it.

If it's not fixed in the current release, perhaps a feature request to prompt on ZVOL size change "This ZVOL is mapped to an iSCSI extent - would you like to refresh the iSCSI extent now?"

Unfortunately, can confirm that this issue (resizing doesn't show updated size to connected iSCSI client) exists in "TrueNAS-SCALE-22.12.2", and editing the comment field on the ZVol or extent does not work.
 
Top