Bug 790457

Summary: [RFE] Support allocation of space to be left unused in a LVM volume group
Product: Red Hat Enterprise Linux 6 Reporter: David Lehman <dlehman>
Component: pykickstartAssignee: David Lehman <dlehman>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2CC: atodorov, bgollahe, clumens, dcleal, jruemker, jstodola, jwest, mganisin, mkhusid, rdassen, rwilliam
Target Milestone: rcKeywords: FutureFeature, Triaged
Target Release: 6.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Change: Two new options were added to the kickstart volgroup command to specify initially unused space in megabytes or as a percentage of the total volume group size. These options are only valid for volume groups being created during installation. Result: Users can effectively reserve space in a new volume group for snapshots while still using the --grow option for logical volumes within the same volume group.
Story Points: ---
Clone Of: 663647
: 873441 (view as bug list) Environment:
Last Closed: 2012-06-20 14:06:28 UTC Type: ---
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: 663647    
Bug Blocks: 607248, 658636, 703208, 750638, 761078, 873441, 874112    

Comment 2 Alexander Todorov 2012-04-04 11:33:15 UTC
On 8GiB disk image I did:

clearpart --all --initlabel
part /boot --fstype=ext4 --size=500
part pv.253002 --grow --size=1
volgroup vg_root --pesize=1024 --reserved-space=2048 pv.253002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_root --grow --size=1024
logvol swap --name=lv_swap --vgname=vg_root --size=1024


# vgs
  VG      #PV #LV #SN Attr   VSize VFree
  vg_root   1   2   0 wz--n- 7,51g 2,00g


# vgdisplay vg_root | grep Size
  VG Size               7,51 GiB
  PE Size               1,00 MiB
  Alloc PE / Size       5642 / 5,51 GiB
  Free  PE / Size       2048 / 2,00 GiB

# lvs
  LV      VG      Attr     LSize Pool Origin Data%  Move Log Copy%  Convert
  lv_root vg_root -wi-ao-- 4,51g                                           
  lv_swap vg_root -wi-ao-- 1,00g 



Sizes match expectations. 


Then I did:

clearpart --all --initlabel
part /boot --fstype=ext4 --size=500
part pv.253002 --grow --size=1
volgroup vg_root --pesize=1024 --reserved-percent=10 pv.253002
logvol / --fstype=ext4 --name=lv_root --vgname=vg_root --grow --size=1024
logvol swap --name=lv_swap --vgname=vg_root --size=1024


# vgs
  VG      #PV #LV #SN Attr   VSize VFree  
  vg_root   1   2   0 wz--n- 7,51g 769,00m

# vgdisplay vg_root | grep Size
  VG Size               7,51 GiB
  PE Size               1,00 MiB
  Alloc PE / Size       6921 / 6,76 GiB
  Free  PE / Size       769 / 769,00 MiB

# lvs
  LV      VG      Attr     LSize Pool Origin Data%  Move Log Copy%  Convert
  lv_root vg_root -wi-ao-- 5,76g                                           
  lv_swap vg_root -wi-ao-- 1,00g         


Moving to VERIFIED.

Comment 3 David Lehman 2012-04-20 20:52:23 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Change: Two new options were added to the kickstart volgroup command to specify initially unused space in megabytes or as a percentage of the total volume group size. These options are only valid for volume groups being created during installation.

Result: Users can effectively reserve space in a new volume group for snapshots while still using the --grow option for logical volumes within the same volume group.

Comment 5 errata-xmlrpc 2012-06-20 14:06:28 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.

http://rhn.redhat.com/errata/RHBA-2012-0882.html