Bug 429122 - lvextend should default to the size of the pv + current size of lv
lvextend should default to the size of the pv + current size of lv
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Dave Wysochanski
Corey Marthaler
Depends On:
  Show dependency treegraph
Reported: 2008-01-17 09:36 EST by Milan Broz
Modified: 2013-02-28 23:06 EST (History)
8 users (show)

See Also:
Fixed In Version: RHBA-2008-0378
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-21 11:39:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Milan Broz 2008-01-17 09:36:14 EST
+++ This bug was initially created as a clone of Bug #154691 +++
RHEL5 clone

Description of problem:
With computers now days, one shouldn't have to do any math in their head. :)
Since I can add a PV to a VG without any size option, I should be able to do the
 same when adding a PV to a LV, or better yet, if I already added the PV to the
VG, the lv should be able to extend out to the full size of the VG by default.

Version-Release number of selected component (if applicable):
[root@tank-03 ~]# rpm -qa | grep lvm2

The following should "just work":
[root@tank-03 ~]# lvextend /dev/grow/grow /dev/sda3 
  Please specify either size or extents (not both)
  lvextend: Add space to a logical volume

        [-A|--autobackup y|n]
        [--alloc AllocationPolicy]
        [-i|--stripes Stripes [-I|--stripesize StripeSize]]
        {-l|--extents [+]LogicalExtentsNumber |
         -L|--size [+]LogicalVolumeSize[kKmMgGtT]}
        [--type VolumeType]
        LogicalVolume[Path] [ PhysicalVolumePath... ]

but instead I have to do math and figure out the size to extend out too:
[root@tank-03 ~]# lvextend -L 274.06G /dev/grow/grow /dev/sda3
  Rounding up size to full physical extent 274.06 GB
  Extending logical volume grow to 274.06 GB
  Logical volume grow successfully resized

-- Additional comment from dwysocha@redhat.com on 2007-09-20 17:49 EST --
Patch in #14 with slight modifications committed to upstream CVS and should be
pulled into next release.
Comment 2 RHEL Product and Program Management 2008-01-17 09:45:57 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 3 Milan Broz 2008-01-17 19:23:40 EST
In lvm2-2.02.30-1.el5.
Comment 5 Corey Marthaler 2008-03-31 12:06:03 EDT
Fix verified in lvm2-2.02.32-2.el5.

[root@hayes-03 ~]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert Devices
  lv       corey      -wi-a-  6.34T                                      
  lv       corey      -wi-a-  6.34T                                      
  lv       corey      -wi-a-  6.34T                                      
  lv       corey      -wi-a-  6.34T                                      
  lv       corey      -wi-a-  6.34T                                      
[root@hayes-03 ~]# vgextend corey /dev/etherd/e1.1p6
  Volume group "corey" successfully extended
[root@hayes-03 ~]# lvextend /dev/corey/lv /dev/etherd/e1.1p6
  Extending logical volume lv to 7.60 TB
  Logical volume lv successfully resized
Comment 7 errata-xmlrpc 2008-05-21 11:39:51 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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