Bug 1070373

Summary: LVM: Allow users to specify approximate size when creating an LV
Product: Red Hat Enterprise Linux 7 Reporter: Jonathan Earl Brassow <jbrassow>
Component: lvm2Assignee: Jonathan Earl Brassow <jbrassow>
lvm2 sub component: Other QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, cmarthal, heinzm, jbrassow, msnitzer, prajnoha, prockai, rbednar, slevine, zkabelac
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.125-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 12:45:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1075262    

Description Jonathan Earl Brassow 2014-02-26 16:56:35 UTC
It is difficult to account for all the space that an LV might need when that LV uses metadata LVs.  Examples of this include thin, cache, raid, and mirror metadata areas.  Currently, we allow the user to specify the amount of space that is ultimately available to the user.  However, it would be useful to either allow this to be approximate or allow the user to specify the amount of space available total allocation - a number that would include any metadata areas.

Comment 3 RHEL Program Management 2014-03-22 05:56:25 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Jonathan Earl Brassow 2015-04-11 17:03:59 UTC
This feature is already available via the '-l X%FREE' method of specifying space.

From lvcreate(8):
"When expressed  as  a  percentage,
the  number  is  treated  as  an approximate upper limit for the
total number of physical  extents  to  be  allocated  (including
extents used by any mirrors, for example)."

Comment 11 Roman Bednář 2015-10-05 13:22:28 UTC
Marking as verified.


Tested on:

3.10.0-320.el7.x86_64

lvm2-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
lvm2-libs-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
lvm2-cluster-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-libs-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-event-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-event-libs-1.02.107-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 16:58:10 CEST 2015
cmirror-2.02.130-2.el7    BUILT: Tue Sep 15 14:15:40 CEST 2015

Users can create LVs with approximate size using -lX%FREE option. This also considers 
the space needed by metadata. Doing so can however cause unpredictable results when used 
in combination with mirror, raid1,4,5 and stripe volumes.

New bug regarding this issue has been created: 
https://bugzilla.redhat.com/show_bug.cgi?id=1268832

Comment 12 errata-xmlrpc 2015-11-19 12:45:20 UTC
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.

https://rhn.redhat.com/errata/RHBA-2015-2147.html