[pve-devel] [PATCH] iscsi : qemu-img convert workaround

Alexandre DERUMIER aderumier at odiso.com
Thu Oct 25 09:07:17 CEST 2012


response from libiscsi author:

"
ld_iscsi.so does not implement any functions for writing, so that is more a lack of functionality than a real bug.
I see ld_iscsi more as a small toy than something that people would actually use.
So I dont really plan to add much to ld_iscsi.

If you want to use dd to/from an iscsi LUN, a much better alternative is to use 
patches/sg3_utils-1.32.patch
and build a version of sg3-utils with iscsi support.

Then you can use 'sg_dd' which is a dd that understands SCSI, which is much superior to anything that can realistically be implemented in ld_iscsi and normal dd.

The second issue with qemu-img relying on bdrv_create(). That is more a qemu item so you should post that, and your suggested patch to the qemu mailing list.
The guys on that list are always very friendly and helpful, so they can help you and discuss different approaches.

Spontaneously, I think adding a fake .bdrv_create is the wrong solution here since conceptually, you cant really 
manage/provision iscsi LUNs via iscsi itself. You can only access existing devices via iscsi.
I think that qemu-img SHOULD work for your use case but the bug is rather that qemu-img should be able to handle the case where the block backedn lacks a .bdrv_create() function and failback to use .bdrv_open() if the backend device is pre-existing.

But that discussion requires that we bring in the qemu block people so it is much better to have the discussion about that (imho) qemu-img bug on the qemu developer list.

We need both kevin and paolo to discuss this one.

As such I will close this issue.
Please open a discussion about the qemu-img limitation that it requires .bdrv_create() on the qemu mailing list so we can discuss how it should be solved.

Thanks for using libiscsi!
"


So, "block backedn lacks a .bdrv_create() function and failback to use .bdrv_open()"

Indeed, seem to be cleaner.

I'll look for this.


----- Mail original ----- 

De: "Dietmar Maurer" <dietmar at proxmox.com> 
À: "Alexandre DERUMIER" <aderumier at odiso.com> 
Cc: pve-devel at pve.proxmox.com 
Envoyé: Mercredi 24 Octobre 2012 18:27:27 
Objet: RE: [pve-devel] [PATCH] iscsi : qemu-img convert workaround 

> Yes, that's what I want. try to open the device to see if it's available and check 
> if size if big enough. 
> 
> I'll try to do it, not sure I have the skill ;) 

Well, modifying qemu-img still looks simpler to me. We don't want to create 
any file on import/export (we use separate alloc calls to do that), so that is needed anyways? 



More information about the pve-devel mailing list