Jump to: navigation, search

Cinder-zvm-plugin

Overview

This plugin is to support Cinder on z/VM.

Generally, OpenStack zvm virt driver will call xCat REST API to operate to zVM hypervisors.xCat has a control point(a virtual machine) in zVM system, which enables xCat management node to control the zVM system. Every zHCP in xCAT has SCSI pools file which contain pre-defined SCSI disk including FCP, WWPN, LUN, those info will be managed by cinder z/VM driver

Code Links

( You can find latest code review link there)

  • Cinder z/VM plugin

https://blueprints.launchpad.net/cinder/+spec/zvm-cinder

  • Nova z/VM plugin

https://blueprints.launchpad.net/nova/+spec/zvm-plugin

  • Quantum z/VM plugin

https://blueprints.launchpad.net/quantum/+spec/quantum-zvm-plugin

z/VM and z/VM Storage

z/VM is a VM hypervisor based on 64-bit z/Architecture, and now with multi-system virtualization and virtual server mobilit. z/VM only support ECKD disk drivers, for SCSI disk, it will dedicate the communication to the Linux run on top of it. The important design point of volume is currently iSCSI is the default driver for volume access but it’s not supported under current z circumstance. The support of z/VM will be done through xCAT REST APIs

  • zfcp drivers introduction

The zfcp device driver supports SCSI-over-Fibre Channel host bus adapters (HBAs) for Linux on mainframes. It is the backend for a driver and software stack that includes other parts of the Linux SCSI stack as well as block request and multipathing functions, file systems, and SCSI applications. Following picture shows how the zfcp device driver fits into Linux and the SCSI stack.

  • zfcp configuration

This book (http://public.dhe.ibm.com/software/dw/linux390/docu/lk38ts07a.pdf) gives a detailed introduction about how SCSI disk was used by z/VM, chapter 3 in this book introduced following steps:

1) how to Configure the IODF

2) Define storage zones

3) LUN Masking

4) Attach an FCP device under z/VM

5) Configuring the zfcp device driver

Architecture

  • z/VM System management introduction

Cinder z/VM plugin/agent will communicate with xCAT REST api to control/configure z/VM. This picture(http://sourceforge.net/apps/mediawiki/xcat/index.php?title=XCAT_zVM#Design_Architecture) show the architecture of xCAT and zVM xCAT can be used to manage virtual servers spanning across multiple z/VM partitions. The xCAT management node (MN) runs on any Linux virtual server. It manages each z/VM partition using a System z hardware control point (zHCP) running on a privileged Linux virtual server. The zHCP interfaces with z/VM systems management API (SMAPI), directory manager (DirMaint), and control program layer (CP) to manage the z/VM partition. It utilizes a C socket interface to communicate with the SMAPI layer and VMCP Linux module to communicate with the CP layer.

  • Adapt cinder to z/VM

Cinder service can run inside/outside of z box. It will communicate with xCAT management node (MN) through REST API e.g, When a create command from cinder-client comes,

1) Cinder server will call z cinder drivers, cinder driver call REST API to xCAT MN

2) The xCAT MN validate the request

3) The xCAT MN will dispatch the request to corresponding zHCP machine

4) The zHCP validate the request then allocate the volume from SCSI pool

5) Return the volume to caller


e.g, When a attach request comes

1) Nova try to attach the volume to given instance

2) Nova call REST API to xCAT MN

3) The xCAT MN check whether the volume is reserved or not on the zHCP

4) The zHCP use the volume info (FCP/WWPN/LUN) to attach it to instance

5) The zHCP update the storage pool

Prerequisites

  • The source pool should be created by users inside xCAT and added to xCAT zHCP
  • Every zHCP will work as a back-end and the volumes between different zHCP can’t be shared
  • The volumes types should be created according to multi-backend feature

Code Structure

1. Cinder Plugin package structure:

drivers/zvm/constants.py: constant definition
drivers/zvm/exception.py: exception definition
drivers/zvm/imageop.py: handle image operations such as copy volume to image and copy image to volume
drivers/zvm/utils.py: utility code such as path, xCAT operations
drivers/zvm/volumedriver.py: volume driver interface 
drivers/zvm/volumeop.py: volume core operations

2. Nova package structure is:

 nova/nova/virt/zvm/volumeop.py: volume operations such as attach, detach

zVM specified Configuration Samples

enabled_backends=zvmssio1  #For each z/VM node, add one back-end for it
[zvmssio1]
volume_driver=cinder.volume.drivers.zvm.volumedriver.ZVMVolumeDriver
volume_backend_name=SCSI_zvmssio1 
zvm_xcat_server = 9.60.27.176  #The xCAT MN node IP
zvm_xcat_username = root
zvm_xcat_password = root  
zvm_scsi_pool = scsipol1  #The SCSI pool’s name

References