Bug 1257366 - too many left over archive files cause "Reserved memory" errors during virt volume creation
too many left over archive files cause "Reserved memory" errors during virt v...
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.2
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Peter Rajnoha
cluster-qe@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-26 18:36 EDT by Corey Marthaler
Modified: 2016-01-22 10:44 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-22 10:44:21 EST
Type: Bug
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 2015-08-26 18:36:53 EDT
Description of problem:
This may be expected behavior, but it took me a long time to figure out why I was starting to see these errors with just a single virt create attempt yet didn't see it with other types of volume attempts.


[root@host-112 archive]# vgs
  VG            #PV #LV #SN Attr   VSize VFree 
  rhel_host-112   1   2   0 wz--n- 7.51g 40.00m


[root@host-112 archive]# pwd
/etc/lvm/archive
[root@host-112 archive]# ls -l snapper_thinp* | wc -l
31019
[root@host-112 archive]# ls -l vg* | wc -l
4


[root@host-112 archive]# vgcreate vg /dev/sda1
  Volume group "vg" successfully created
[root@host-112 archive]# vgcreate snapper_thinp /dev/sdb1
  Volume group "snapper_thinp" successfully created

[root@host-112 archive]# lvcreate --thinpool POOL1 -L 1G vg
  Logical volume "POOL1" created.
[root@host-112 archive]# lvcreate --thinpool POOL1 -L 1G snapper_thinp
  Logical volume "POOL1" created.

[root@host-112 archive]# lvcreate  --virtualsize 1G -T vg/POOL1 -n origin
  Logical volume "origin" created.
[root@host-112 archive]# lvcreate  --virtualsize 1G -T snapper_thinp/POOL1 -n origin
  Internal error: Reserved memory (19165184) not enough: used 20692992. Increase activation/reserved_memory?
  Logical volume "origin" created.

[root@host-112 archive]# lvs -a -o +devices
  LV              VG            Attr       LSize Pool  Data%  Meta% Devices
  POOL1           snapper_thinp twi-aotz-- 1.00g       0.00   1.07  POOL1_tdata(0)
  [POOL1_tdata]   snapper_thinp Twi-ao---- 1.00g                    /dev/sdb1(1)
  [POOL1_tmeta]   snapper_thinp ewi-ao---- 4.00m                    /dev/sdb1(257)
  [lvol0_pmspare] snapper_thinp ewi------- 4.00m                    /dev/sdb1(0)
  origin          snapper_thinp Vwi-a-tz-- 1.00g POOL1 0.00

  POOL1           vg            twi-aotz-- 1.00g       0.00   1.07  POOL1_tdata(0)
  [POOL1_tdata]   vg            Twi-ao---- 1.00g                    /dev/sda1(1)  
  [POOL1_tmeta]   vg            ewi-ao---- 4.00m                    /dev/sda1(257)
  [lvol0_pmspare] vg            ewi------- 4.00m                    /dev/sda1(0)  
  origin          vg            Vwi-a-tz-- 1.00g POOL1 0.00


If I try and create other types of volumes on the volume group snapper_thinp I don't see this error.


Version-Release number of selected component (if applicable):
3.10.0-306.el7.x86_64

lvm2-2.02.128-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
lvm2-libs-2.02.128-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
lvm2-cluster-2.02.128-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
device-mapper-1.02.105-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
device-mapper-libs-1.02.105-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
device-mapper-event-1.02.105-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
device-mapper-event-libs-1.02.105-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.128-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.128-1.el7    BUILT: Tue Aug 18 03:45:17 CDT 2015
Comment 1 Jonathan Earl Brassow 2016-01-22 10:44:21 EST
We have 'retain_min' and 'retain_days', which ensure preservation of archive files, but we have nothing to set the upper bound for shorter time periods than 'retain_days'.

If you set 'retain_days' to, say '1', then after a day, any files that are more than a day old will be removed... as long as the most recent 'retain_min' are always kept.

Try that and see if you like it as a solution.  If not, you can reopen this bug.

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