On 08/02/2011 06:19 AM, Sebastian Riemer wrote: > Hi, > > I want to live migrate the iSCSI storage of QEMU/KVM virtual machines to > another portal when getting out of storage capacity. > The VMs are running on a diskless Linux server (Open-iSCSI initiator). > When migration starts on the storage servers there will be a further > synchronous replication link established to the new location. When this > becomes "up-to-date" the iSCSI session change is needed. > > This is the sequence: > 1. pause the VM > 2. unlink replication to new location, new target becomes primary > 3. logout from old iSCSI target > 4. login to new iSCSI target, BUT with the same block device as it is > held open
The problem with 3 and 4 and using the iscsi disk directly and not using something like iscsi login redirect, is that on logout the device (/dev/sdXYZ) is going to be destroyed, so if something was referencing it they are basically screwed. All further access with result in IO errors. When you do #4 and login you get a new /dev/sdXYZ and so your app has to open that and use it. If your setup can just use dm-multipath then you can just multipath over iscsi. When you logout it would just destroy what the multipath device sees as a path. Then when you login, it will add it as a new path. You can then resume the VM and it would never know that the paths under the multipath device got swithced around. > 5. resume the VM > > QEMU doesn't support changing the storage device while running. And this > sequence would even be independent from the virtualization framework. > Is this already possible to bind the new target to the block device in use? > > I would otherwise modify the initiator source code. Or are there other > options? > Does iSCSI target redirection work without stopping VMs? > Yeah, it should. But we can only redirect to another portal. If you are looking at the open iscsi userspace source code see usr/login.c:iscsi_update_address and initiator.c's __check_iscsi_status_class's ISCSI_LOGIN_STATUS_TGT_MOVED_PERM handling. So the target name would have to be the same but the portal info could be different. -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/open-iscsi?hl=en.
