[Block-Storage] LVMISCSIDriver does not support local disk with lvm

Bug #1321336 reported by Mark Vanderwiel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Fix Released
Medium
Mark Vanderwiel

Bug Description

block storage cookbook only supports creating 40gb loop device, does not support local disk w/ lvm

Revision history for this message
Yi Xuan Huang (yixuan178) wrote :

current implementation for openstack-block-storage cookbook for lvm driver only allow user to create on loop device and map to cinder-volumes virtual group.
>>>>>>>>>>>>>>>>>>>>>>>>
when 'cinder.volume.drivers.lvm.LVMISCSIDriver'
  if node['openstack']['block-storage']['volume']['create_volume_group']
    volume_size = node['openstack']['block-storage']['volume']['volume_group_size']
    seek_count = volume_size.to_i * 1024
    # default volume group is 40G
    seek_count = 40 * 1024 if seek_count == 0
    vg_name = node['openstack']['block-storage']['volume']['volume_group']
    vg_file = "#{node['openstack']['block-storage']['volume']['state_path']}/#{vg_name}.img"

    # create volume group
    execute 'Create Cinder volume group' do
      command "dd if=/dev/zero of=#{vg_file} bs=1M seek=#{seek_count} count=0; vgcreate #{vg_name} $(losetup --show -f #{vg_file})"
      action :run
      not_if "vgs #{vg_name}"
    end
>>>>>>>>>>>>>>>>>>

It is not suitable for client who want to use local disk as cinder volume storage. We need allow client to choose what kind of device they want to use as cinder volume.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cookbook-openstack-block-storage (master)

Fix proposed to branch: master
Review: https://review.openstack.org/106148

Changed in openstack-chef:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cookbook-openstack-block-storage (master)

Change abandoned by Mark Vanderwiel (<email address hidden>) on branch: master
Review: https://review.openstack.org/106148
Reason: Thx for the feedback Matt, yes after looking at the lvm cookbook, it does seems to offer better support for this.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cookbook-openstack-block-storage (master)

Reviewed: https://review.openstack.org/106148
Committed: https://git.openstack.org/cgit/stackforge/cookbook-openstack-block-storage/commit/?id=84e52038f8fe1182f834de15ed4203421049549f
Submitter: Jenkins
Branch: master

commit 84e52038f8fe1182f834de15ed4203421049549f
Author: Mark Vanderwiel <email address hidden>
Date: Thu Jul 10 14:33:42 2014 -0500

    Allow create volume group with block devices for lvm

    Add new attribute, create_colume_group_type to allow
    either create simple test volume based upon a file
    (as existing support does),
    or create volume group based upon block devices.

    Change-Id: Ia81354f9fab9310c1b5e633d4ca05e434f9c2da6
    Closes-Bug: #1321336

Changed in openstack-chef:
status: In Progress → Fix Released
Changed in openstack-chef:
milestone: none → icehouse-rc1
Changed in openstack-chef:
milestone: icehouse-rc1 → icehouse-stable
Changed in openstack-chef:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.