Bug 918328 - [RFE] Add an option to lvcreate to specify a tolerance in extents
Summary: [RFE] Add an option to lvcreate to specify a tolerance in extents
Keywords:
Status: NEW
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.166
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: LVM Team
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-05 22:25 UTC by David Lehman
Modified: 2023-08-10 15:41 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1314770 0 unspecified CLOSED lvcreate can't always create thin pool of maximum size 2021-02-22 00:41:40 UTC

Internal Links: 1314770

Description David Lehman 2013-03-05 22:25:45 UTC
Description of problem:
Blivet (anaconda, historically) does a fair amount of lvm calculation, which occasionally ends up being off by an extent. It would be nicer for all involved if it were possible for blivet/anaconda to tell lvm "It's okay if you are short by as many as 2 extents, so don't fail in that event."

Version-Release number of selected component (if applicable):
lvm2-2.02.98-4.fc18

How reproducible:
Always

Steps to Reproduce:
1. try to create a new lv with one extent more than is available
2.
3.
  
Actual results:
lvcreate prints an error and fails

Expected results:
lvcreate, passed this new option, allows variance within the specified tolerance and successfully creates the volume with as close to the requested size as possible.

Additional info:
Maybe something along the lines of --tolerance with semantics like the --extents option.

Comment 1 Zdenek Kabelac 2013-03-07 08:31:14 UTC
How about specifying size with  '~'

lvcreate -L~10M
lvcreate -l~20

With semantic - 'anything up to 10M - or up to 20 extents'
so allocation of 1..20 extents would be success, but 0 failure.

Or do we need to 'fail' if there would be i.e. only 15 extents ?
(the opposite direction -L10M has the meaning 'not less then 10M')

Comment 2 David Lehman 2013-03-07 16:19:19 UTC
A defined tolerance would be slightly preferable but the proposal from comment 1 would most likely be adequate for our purposes.

Comment 3 David Lehman 2013-09-18 15:50:18 UTC
When might this get into a build of lvm2? I am on the verge of having to add yet another hack to anaconda/blivet to handle this, but it would be much nicer if that wasn't necessary.

Comment 4 mulhern 2016-05-02 18:42:37 UTC
It is possible that the --total-size option idea of bz#1314770 would take care of some of the problem.


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