[openstack-dev] Cinder as generic volume manager

Tomoki Sekiyama tomoki.sekiyama at hds.com
Thu Jul 9 19:21:33 UTC 2015


Hi all,

Just FYI, here is a sample script I'm using for testing os-brick which
attaches/detaches the cinder volume to the host using cinderclient and
os-brick:

https://gist.github.com/tsekiyama/ee56cc0a953368a179f9

"python attach.py <volume-uuid>" will attach the volume to the executed
host and shows a volume path. When you hit the enter key, the volume is
detached.

Note this is skipping "reserve" or "start_detaching" APIs so the volume
state is not changed to "Attaching" or "Detaching".

Regards,
Tomoki


On 7/9/15, 14:44 , "Walter A. Boring IV" <walter.boring at hp.com> wrote:

>I missed this whole thread due to my mail filtering.  Sorry about that.
>
>Anyway, Ivan and I have an open Blueprint here:
>https://blueprints.launchpad.net/cinder/+spec/use-cinder-without-nova
>
>That starts the discussion of adding the end to end ability of attaching
>a Cinder
>volume to a host using the cinderclient in combination with os-brick.
>
>The idea being, that cinderclient would coordinate the calling of
>existing Cinder's APIs,
>to do the attach/detach, along with os-brick, to collect the initiator
>information needed,
>as well as the volume discovery after the volume has been exported.
>
>So, for example a user would simply use a new cinderclient shell command
>to initiate
>the attachment for an existing cinder volume.
>cinder attach <volume uuid>
>
>The client would then collect the initiator information, using os-brick,
>and then make the correct Cinder API
>calls to ensure the volume is exported.   Then, use os-brick again to
>discover the volume showing up
>on the host.
>
>This is basically the same process that Nova does today, but uses
>libvirt volume drivers to discover the volume
>after being exported instead of os-brick.
>
>We just haven't had time to write up the cinder-spec and start the work
>on it.
>Walt
>
>On 07/07/2015 06:25 AM, Jan Safranek wrote:
>> Hello,
>>
>> I'd like to (mis-)use Cinder outside of OpenStack, i.e. without Nova.
>>
>> I can easily create/manage volumes themselves, Cinder API is pretty
>> friendly here. Now, how can I attach a volume somewhere? Something like
>> 'nova volume-attach <server> <volume>', but without Nova and with <host>
>> (=anything) instead of <server> (=virtual machine inside OpenStack).
>>
>> I guess I am not the first one to ask for such feature, has anyone
>>tried it?
>>
>> Would it be possible to separate a new library from Nova, which would
>> just attach the volume to the host where it is runnig and mark the
>> volume as 'in-use'? How hard would it be?
>>
>> Jan
>>
>> 
>>_________________________________________________________________________
>>_
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: 
>>OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>> .
>>
>
>
>__________________________________________________________________________
>OpenStack Development Mailing List (not for usage questions)
>Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
>http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list