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
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)
In CVS - lvm2-2.02.42-1.el4
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.
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