4

Good day,

The setup:
I have a Failover Cluster, each member of which is attached to a shared storage of two LUNs - LUN1 and LUN2.

LUN1 hosts a large VHDX file (of several terabytes) assigned to the "iSCSI Target" cluster role. This role, in turn, allows the same (or other) hosts to connect to this VHDX virtual drive by iSCSI and do some intensive reading & writing on it.

The problem:
I need to move the VHDX file from LUN1 to LUN2, while allowing its iSCSI clients working on it. I want to copy all its contents to the new storag, while avoiding situation, when I have to disconnect these clients during the copying operation to avoid changes made by clients being lost after the switchover of the "iSCSI Target" to the new copy.

Possible direction?
Now, Microsoft has a solution called "Virtual Machine Storage Migration" doing exactly what I need:

  • Throughout most of the move operation, disk reads and writes go to the source virtual hard disk.
  • While reads and writes occur on the source virtual hard disk, the disk contents are copied to the new destination virtual hard disk.
  • After the initial disk copy is complete, disk writes are mirrored to both the source and destination virtual hard disks while outstanding disk changes are replicated.
  • After the source and destination virtual hard disks are completely synchronized, the virtual machine switches over to using the destination virtual hard disk.
  • The source virtual hard disk is deleted.

But unfortunately, as the name says, it's for virtual disks attached to VMs.

Is there any possibility to use the same technology for VHDs used by "iSCSI Target"?

2 Answers2

6

I don't think that it would be possible to replicate/move VHDX used by iSCSI Target Server. The official migration process from Microsoft requires disconnecting iSCSI clients and moving VHDX to a new server and importing configuration. https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn479297(v=ws.11)

As another option, you can create a new iSCSI LUN on a new LUN and move your data over.

There are also solutions, which can replicate data between 2 and more hosts. As an example, StarWind VSAN can replicate storage via iSCSI and share storage via iSCSI. https://www.starwindsoftware.com/starwind-virtual-san

Stuka
  • 6,012
1

Some storage appliances have a possibility to replicate the data on a low level. Can you check that is the case for you?

Otherwise you need copy the data with robocopy or powershell. I would setup a separate host and mount the new iscsi target and then copy the data using a powershell script or something like that.but keep in mind you also need to copy the VM config otherwise it won't work

Using a Powershell script you could first compress and split the large vhdx and the copy and check consistency using md5 for example. Then extract using a script and merge the compressed files

Acenl12
  • 11