Bug 821007
| Summary: | cling allocation policy should never split data across PVs | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Alasdair Kergon <agk> | |
| Component: | lvm2 | Assignee: | Alasdair Kergon <agk> | |
| Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 6.4 | CC: | agk, cmarthal, dwysocha, heinzm, jbrassow, mbroz, msnitzer, nperic, prajnoha, prockai, thornber, zkabelac | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | lvm2-2.02.97-2.el6 | Doc Type: | Bug Fix | |
| Doc Text: |
The 'cling' allocation policy is behaving like the 'normal' policy when there is no pre-existing preceding segment to cling to. The policy now behaves correctly.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 821013 (view as bug list) | Environment: | ||
| Last Closed: | 2013-02-21 08:09:54 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: | 687919, 821013 | |||
|
Description
Alasdair Kergon
2012-05-11 14:40:42 UTC
Patch to fix 3 different ways in which 'cling' incorrectly gives an outcome like 'normal': http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=text&tr1=1.375&r2=text&tr2=1.380&f=u # pvs PV VG Fmt Attr PSize PFree /dev/loop0 vg3 lvm2 a- 96.00m 28.00m /dev/loop1 vg3 lvm2 a- 96.00m 96.00m # lvs LV VG Attr LSize lvol0 vg3 -wi--- 68.00m Before: # lvextend vg3/lvol0 -L +36M --alloc cling Extending logical volume lvol0 to 104.00 MiB Logical volume lvol0 successfully resized After: # lvextend vg3/lvol0 -L +36M --alloc cling Extending logical volume lvol0 to 104.00 MiB Insufficient suitable allocatable extents for logical volume lvol0: 2 more required Same for lvcreate. Adding QA ack for 6.4. Devel will need to provide unit testing results however before this bug can be ultimately verified by QA. Tested with both lvcreate and lvextend. Both are failing as expected if the PV size is smaller than the needed size while using --alloc cling. (10:11:03) [root@r6-node01:~]$ lvcreate small_vg -L220M --alloc cling -n big2_lv Insufficient suitable allocatable extents for logical volume big2_lv: 6 more required ------------------------------------------ (10:13:38) [root@r6-node01:~]$ lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lv_root VolGroup -wi-ao-- 6.54g lv_swap VolGroup -wi-ao-- 1.97g big2_lv small_vg -wl-a--- 132.00m (10:13:47) [root@r6-node01:~]$ lvextend small_vg/big2_lv -L +68M Extending logical volume big2_lv to 200.00 MiB Insufficient suitable allocatable extents for logical volume big2_lv: 1 more required 10:14:07) [root@r6-node01:~]$ pvs PV VG Fmt Attr PSize PFree /dev/sda1 small_vg lvm2 a-- 196.00m 64.00m /dev/sdd1 small_vg lvm2 a-- 196.00m 196.00m /dev/sdf1 lvm2 a-- 10.00g 10.00g /dev/sdg1 lvm2 a-- 10.00g 10.00g /dev/vda2 VolGroup lvm2 a-- 8.51g 0 (10:16:56) [root@r6-node01:~]$ lvs -a -o +devices LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert Devices lv_root VolGroup -wi-ao-- 6.54g /dev/vda2(0) lv_swap VolGroup -wi-ao-- 1.97g /dev/vda2(1674) big2_lv small_vg -wl-a--- 132.00m /dev/sda1(0) 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-2013-0501.html |