Bug 201935 - lvm "--alloc anywhere" hint is worthless with mirrors
lvm "--alloc anywhere" hint is worthless with mirrors
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: lvm2 (Show other bugs)
4.0
All Linux
medium Severity low
: ---
: ---
Assigned To: Jonathan Earl Brassow
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-09 16:46 EDT by Corey Marthaler
Modified: 2009-05-18 16:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:10:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2006-08-09 16:46:21 EDT
Description of problem:
This kind of has to do with bz 164585. If I don't have enough pvs (one more than
the desired number of legs) in my volume group, lvm doesn't let me create a
mirror and in doing so tells me to "Consider --alloc anywhere if desperate."
That flag doesn't acutally let you create the mirror you are requesting and is
basically worthless and frustrating to the user.

[root@link-08 ~]# pvscan
  PV /dev/sda1   VG mirror   lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sdb1   VG mirror   lvm2 [135.66 GB / 135.66 GB free]
[root@link-08 ~]# lvcreate -m 1 -L 100K mirror
  Rounding up size to full physical extent 4.00 MB
  Not enough PVs with free space available for parallel allocation.
  Consider --alloc anywhere if desperate.
[root@link-08 ~]# lvcreate -m 1 -L 100K --alloc anywhere mirror
  Rounding up size to full physical extent 4.00 MB
  Insufficient suitable allocatable extents for logical volume : 2 more required

[root@link-08 ~]# pvscan
  PV /dev/sda1   VG mirror   lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sdb1   VG mirror   lvm2 [135.66 GB / 135.66 GB free]
  PV /dev/sdc1   VG mirror   lvm2 [135.66 GB / 135.66 GB free]
[root@link-08 ~]# lvcreate -m 2 -L 100M  mirror
  Not enough PVs with free space available for parallel allocation.
  Consider --alloc anywhere if desperate.
[root@link-08 ~]# lvcreate -m 2 -L 100M --alloc anywhere mirror
  Insufficient suitable allocatable extents for logical volume : 75 more required
[root@link-08 ~]# lvcreate -m 2 -L 1M --alloc anywhere mirror
  Rounding up size to full physical extent 4.00 MB
  Insufficient suitable allocatable extents for logical volume : 3 more required
[root@link-08 ~]# lvcreate -m 2 -L 100K --alloc anywhere mirror
  Rounding up size to full physical extent 4.00 MB
  Insufficient suitable allocatable extents for logical volume : 3 more required


Version-Release number of selected component (if applicable):
[root@link-08 ~]# rpm -q lvm2
lvm2-2.02.06-6.0.RHEL4


How reproducible:
everytime
Comment 1 Jonathan Earl Brassow 2008-10-21 15:14:26 EDT
I don't recall exactly when this got fixed, but it is fixed.


[root@bp-xen-05 ~]# vgs
  VG         #PV #LV #SN Attr   VSize   VFree
  VolGroup00   1   2   0 wz--n-   7.88G      0
  vg           2   0   0 wz--nc 233.76G 233.76G
[root@bp-xen-05 ~]# lvcreate -m1 -L 500M -n lv vg
  Insufficient suitable allocatable extents for logical volume : 125 more required
  Unable to allocate extents for mirror(s).
[root@bp-xen-05 ~]# lvcreate -m1 -L 500M -n lv vg --alloc anywhere
  Logical volume "lv" created
[root@bp-xen-05 ~]# lvs -a -o +devices
  LV            VG         Attr   LSize   Origin Snap%  Move Log     Copy%  Convert Devices                 
  LogVol00      VolGroup00 -wi-ao   5.84G                                           /dev/xvda2(0)           
  LogVol01      VolGroup00 -wi-ao   2.03G                                           /dev/xvda2(187)         
  lv            vg         mwa-a- 500.00M                    lv_mlog  28.80         lv_mimage_0(0),lv_mimage_1(0)
  [lv_mimage_0] vg         Iwi-ao 500.00M                                           /dev/xvdb1(0)           
  [lv_mimage_1] vg         Iwi-ao 500.00M                                           /dev/xvdc1(0)           
  [lv_mlog]     vg         lwa-ao   4.00M                                           /dev/xvdb1(125)
Comment 3 Milan Broz 2008-12-16 11:54:16 EST
In CVS - lvm2-2.02.42-1.el4
Comment 5 Corey Marthaler 2009-04-20 17:16:10 EDT
Fix verified in lvm2-2.02.42-5.el4, though I'm not sure where the "Not enough PVs with free space" message went, that one was actually helpful.
Comment 7 errata-xmlrpc 2009-05-18 16:10:32 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 therefore 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.

http://rhn.redhat.com/errata/RHBA-2009-0967.html

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