[Kimchi-devel] [PATCH 0/3] (WIP) Storagepool SCSI/FC

Mark Wu wudxw at linux.vnet.ibm.com
Mon Jan 13 09:42:13 UTC 2014


On 01/11/2014 01:34 AM, Rodrigo Trujillo wrote:
> NOTICE: THIS FEATURE IS STILL UNDER DISCUSSION/AGREEMENT/DEVELOPMENT
>
> This patch set implements the basic functions in order to create a SCSI
> storagepool based in fibre channel protocol.
>
> --- What is implemented? ---
> * backend API
>     It is possible to create a pool with curl POST request like:
>     curl -X POST -u <USER>  -H 'Content-type: application/json' \
>     -H 'Accept: application/json' http://localhost:8000/storagepools \
>      --data '{ \
>          "name": "testFC", \
>          "source": { "adapter_type": "scsi_host", \
>                      "adapter_name": "scsi_hostX", \
>                      "wwnn":"112233789",  \
>                      "wwpn":"44332211" }, \
>          "path": "/dev/disk/by-id", \
>          "type": "scsi" }'
>
> * json schema updated
>
> * created a function to test the host libvirt version
>     SCSI FC pool and volumes have theirself configuration only after
>     libvirt version 1.0.5. If lesser, I must use older configuration
>     tags
>
> * updates the VM guest template with proper disk xml
>     Create volumes in a SCSI pool is not supported by libvirt, because
>     volumes are the LUNS preconfigured and available in the SAN. Disk
>     will have the biggest LUN found assigned.
You could use 'volume' type of disk like this (since 1.0.5)

<disk type='volume' device='disk'>
       <driver name='qemu' type='raw'/>
       <source pool='blk-pool0' volume='blk-pool0-vol0'/>
       <target dev='hda' bus='ide'/>
     </disk>

>
> --- What does need to be discussed? Ideas? ---
> 1) Backend expects right information from UI, so UI would have to ask
>     and send 'adapter_name', 'wwnn' and 'wwpn' (other fields can be fi
>     xed). However, the UI coud show the FC_Hosts available and let user
>     select which one he wants. This would require to implement more ba
>     ck-end functions to gather FC_host info, automatically (name, wwnn,
>     wwpn).
>     So, at this moment, just create an UI with input fields or facili
>     tate the users life ?
Yes, it's better to collect all fc host info and provide a list of 
(wwnn, wwpn) to UI
The host name is not very useful.
>
> 2) Currently the user have no choice on with LUN to assign to a guest.
>     LUN is selected automatically and if not LUN is available, guest
>     will not have any disk. In order to improve this, the guest creation
>     fase could have one more step, if the pool in the template in SCSI
>     type. If SCSI, user could choose which LUN he wants to assign to VM.
>     Notice that the disk size in the template have been, and will be, ig
>     nored.
>     What do you guys think about this approach ?
You could use 'volume' type of disk.   More importantly, we need allow 
creating VM
from the scsi storage pool and iscsi storage poll.  Otherwise, it's 
meaningless to
add the storage pool to kimchi.  At least:
we should allow creating vm with existing volume (all the luns exported 
by scsi target are predefined)
create vm with a raw image.  We can't use qcow2 format on block device 
because we don't have monitoring facility and can't extend the disk size 
on demand as LVM


> 3) LUNs refresh: Once the storage admin creates more LUNs, the host admin
>     needs to perform some commands in order to kernel 'see' and map new
>     devices. I am implementing this backend functionality. A refresh bu
>     tton will be necessary in the UI, where could it be placed?
>       - In the storagepool creation window ? When select SCSI type
>       - In the window to select the LUN, when creating new guest (if
>         approved this extra step)
>       - In the storagepool tab, in the pool section, if its a SCSI type
>       - Also, when the user expands a SCSI pool section, which will show
>         the volumes (LUNs), this function can be triggered.
>
> 4) More ideas/concerns/suggestions ?
>
>
>
> Rodrigo Trujillo (3):
>    Storagepool: SCSI/Fibre Channel backend implementation
>    Storagepools: Function to check libvirt version
>    Storagepools: Assign SCSI fibre channel LUN as disk to a new guest
>
>   docs/API.md              |  6 ++++
>   src/kimchi/API.json      | 18 ++++++++++-
>   src/kimchi/model.py      | 79 +++++++++++++++++++++++++++++++++++++++++++++---
>   src/kimchi/utils.py      | 14 +++++++++
>   src/kimchi/vmtemplate.py | 40 +++++++++++++++++++++++-
>   5 files changed, 151 insertions(+), 6 deletions(-)
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20140113/8bcf1bf1/attachment.html>


More information about the Kimchi-devel mailing list