Shared block storage support
authorApollon Oikonomopoulos <apollon@noc.grnet.gr>
Fri, 4 Mar 2011 14:35:23 +0000 (16:35 +0200)
committerIustin Pop <iustin@google.com>
Tue, 8 Mar 2011 12:00:39 +0000 (13:00 +0100)
commitb6135bbc19e9b9fcfc621232cc25cff1b20eb4f1
treeed729cc7d9c8617a4304a812a182eda30c4b7be5
parent2be7273ccdad115169ab0f8765f3fe66d0aeff47
Shared block storage support

This patch introduces basic shared block storage support.

It introduces a new storage backend, bdev.PersistentBlockDevice, to
use as a backend for shared block storage. The new bdev requires a new
BLOCKDEV_DRIVER_MANUAL constant with the value "manual" and uses it as
the first part of the block device unique_id.

A new disk template, DT_BLOCK is introduced as well and added to
DTS_EXT_MIRROR and DTS_MAY_ADOPT. Also added DTS_MUST_ADOPT constant
and use it to check for the presence of the adopt keyword during LU
invocation. We enforce the /dev/disk limitation upon adoption, but we
allow block devices to reside anywhere under /dev.

This is very basic support and includes no storage manipulation (provisioning,
resizing, renaming) which will have to be implemented through a "driver"
framework.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
[iustin@google.com: slight changes to bdev.py]
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/bdev.py
lib/cmdlib.py
lib/constants.py
lib/objects.py