Hide Forgot
Description of problem: Using a thin volume, while creating a file greater than the current thin_pool size, the increase in the thin_pool size should occur. dmeventd was running but the LV was not increased. upon manual attempt this was the error: [root@node01:~]$ lvextend --use-policies main_vg/thin_pool Extending logical volume thin_pool to 156.00 MiB Number of extents requested (7) needs to be divisible by 2. in /var/log/messages the same can be seen: Mar 26 07:10:46 node01 lvm[2230]: Thin main_vg-thin_pool-tpool is now 100% full. Mar 26 07:10:46 node01 kernel: device-mapper: thin: 253:4: reached low water mark, sending event. Mar 26 07:10:46 node01 kernel: device-mapper: thin: 253:4: no free space available. Mar 26 07:10:46 node01 lvm[2230]: Extending logical volume thin_pool to 156.00 MiB Mar 26 07:10:46 node01 lvm[2230]: Number of extents requested (7) needs to be divisible by 2. Mar 26 07:10:46 node01 lvm[2230]: Failed to extend thin main_vg-thin_pool-tpool. [root@node01:~]$ vgs VG #PV #LV #SN Attr VSize VFree VolGroup 1 2 0 wz--n- 9.51g 0 main_vg 4 3 0 wz--n- 39.03g 38.90g (07:23:50) [root@node01:~]$ lvs LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert lv_root VolGroup -wi-ao-- 7.54g lv_swap VolGroup -wi-ao-- 1.97g lvol0 main_vg Vwi-aotz 2.00g thin_pool 6.24 lvol1 main_vg Vwi-a-tz 2.00g thin_pool lvol0 4.78 thin_pool main_vg twi-a-tz 128.00m 100.00 Specifying the size has to be precise as well, no rounding seems to take place: [root@node01:~]$ lvextend -L+60M main_vg/thin_pool Extending logical volume thin_pool to 188.00 MiB Number of extents requested (15) needs to be divisible by 2. Version-Release number of selected component (if applicable): lvm2-2.02.96-0.85.el6.x86_64 lvm2-libs-2.02.96-0.85.el6.x86_64 device-mapper-event-1.02.75-0.85.el6.x86_64 device-mapper-libs-1.02.75-0.85.el6.x86_64 device-mapper-event-libs-1.02.75-0.85.el6.x86_64 device-mapper-persistent-data-0.1.4-1.el6.x86_64 device-mapper-1.02.75-0.85.el6.x86_64 kernel 2.6.32-251.el6.x86_64 How reproducible: Everytime Steps to Reproduce: 1. create VG, create a striped thin pool lvcreate -i 2 -T -L128M main_vg/thin_pool 2. create a thin LV and create a FS, lvcreate -T -V2G main_vg/thin_pool mke2fs -t ext3 /dev/main_vg/lvol0 3. Write data which is larger than thin_pool initial size of 128M: dd if=/dev/urandom of=/mnt/testfile2 bs=1024 count=143141 Actual results: The I/O is stuck, the LV does not get increased. /var/log/messages: ar 26 07:41:21 node01 kernel: device-mapper: thin: 253:4: reached low water mark, sending event. Mar 26 07:41:21 node01 lvm[2230]: Thin main_vg-thin_pool-tpool is now 100% full. Mar 26 07:41:21 node01 kernel: device-mapper: thin: 253:4: no free space available. Mar 26 07:41:21 node01 lvm[2230]: Extending logical volume thin_pool to 156.00 MiB Mar 26 07:41:21 node01 lvm[2230]: Number of extents requested (7) needs to be divisible by 2. Mar 26 07:41:21 node01 lvm[2230]: Failed to extend thin main_vg-thin_pool-tpool. Expected results: thin pool LV should get increased automatically when --use-policies is provided. The rounding up of increase of space should be divisible by 2. Additional info:
Yep, there is missing piece of code to properly extend striped LVs
Updated with patches: https://www.redhat.com/archives/lvm-devel/2012-April/msg00007.html https://www.redhat.com/archives/lvm-devel/2012-April/msg00008.html https://www.redhat.com/archives/lvm-devel/2012-April/msg00009.html https://www.redhat.com/archives/lvm-devel/2012-April/msg00010.html Patches are using better logic for rounding when stripes are in the game, yet a further tunning here might be needed for some specific cases. But the observed problem from this bugzilla should now work properly.
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: No documentation needed.
the auto-extend works without errors tested with: lvm2-2.02.95-5.el6.x86_64
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-0962.html