Bug 1022714 - ThinLVM pool created with incorrect size
ThinLVM pool created with incorrect size
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-cinder (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: rc
: 4.0
Assigned To: Jon Bernard
Giulio Fidente
Depends On:
Blocks: 975606 1002648
  Show dependency treegraph
Reported: 2013-10-23 16:24 EDT by Eric Harney
Modified: 2016-04-27 01:22 EDT (History)
8 users (show)

See Also:
Fixed In Version: openstack-cinder-2013.2-8.el6ost
Doc Type: Bug Fix
Doc Text:
A bug in way the the Block Storage ThinLVM driver handled volume sizes made it possible for the Block Storage service to create ThinLVM pools with incorrect sizes. Specifically, if a thin pool did not exist in Cinder's volume group, the Block Storage service created one but with a smaller size than intended. Whenever this occurred, I/O traffic to volumes failed when the pool space was exhausted. This release fixes the bug, ensuring that the Block Storage service calculates volume sizes correctly and creates ThinLVM pools with correct sizes consistently.
Story Points: ---
Clone Of:
Last Closed: 2013-12-19 19:32:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1245909 None None None Never
OpenStack gerrit 54833 None None None Never

  None (edit)
Description Eric Harney 2013-10-23 16:24:13 EDT
Description of problem:
When enabling the LVM driver with option lvm_type=thin, if the vg does not have a -pool VG, cinder creates a <vgname>-pool LVM thin pool.  This may be created with the wrong size because Cinder determines the VG capacity as X GB and then runs "lvcreate -T -L X <path>" rather than "lvcreate -T -L XG <path>".

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1.  Create new VG named "cinder-vg"
2.  Set volume_group=cinder-vg in cinder.conf
3.  Start cinder-volume service

Actual results:
# lvs cinder-vg
shows a cinder-vg-pool LV of size 4.00m rather than XGB.

LVM brick needs to do something like _sizestr() to set the unit being passed to the lvcreate command.

Also need to look at Grizzly as it uses different code (not brick) for handling this and may or may not have this problem.
Comment 1 Eric Harney 2013-10-31 14:49:31 EDT
Jon's testing here also revealed that ThinLVM free space calculation is not handled correctly, so when you have a pool of correct size (~ the entire VG), the LVM driver / Cinder scheduler will report that you do not have enough free space for a Cinder volume to be created.  (It considers the VG full since the pool LV is consuming the space -- should calculate usable space inside the pool somehow.)
Comment 5 Giulio Fidente 2013-12-12 06:55:01 EST
verified using openstack-cinder-2013.2-8.el6ost.noarch
Comment 7 errata-xmlrpc 2013-12-19 19:32:14 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.