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.
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')
A defined tolerance would be slightly preferable but the proposal from comment 1 would most likely be adequate for our purposes.
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.
It is possible that the --total-size option idea of bz#1314770 would take care of some of the problem.