Bug 2123151

Summary: Consider pruning... (check archiving is needed in lvm.conf)
Product: Red Hat Enterprise Linux 9 Reporter: Corey Marthaler <cmarthal>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Command-line tools QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: unspecified CC: agk, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, thornber, zkabelac
Version: 9.1Keywords: Triaged
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: lvm2-2.03.21-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-11-07 08:53:27 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:

Description Corey Marthaler 2022-08-31 19:28:19 UTC
Description of problem:

I'm not sure this is actually a bug, but is this warning demanding 
the user check the lvm.conf file or suggesting it as an option? Like, should it be "(check archiving *if* needed in lvm.conf)"


[root@hayes-01 ~]# ls -l /etc/lvm/archive/ | wc -l
2222

[root@hayes-01 ~]# lvremove -f vdo_sanity
  Consider pruning vdo_sanity VG archive with more then 892 MiB in 2171 files (check archiving is needed in lvm.conf).
  Logical volume "vdo_lv" successfully removed.




Version-Release number of selected component (if applicable):
lvm2-2.03.14-6.el8    BUILT: Fri Jul 29 05:40:53 CDT 2022
lvm2-libs-2.03.14-6.el8    BUILT: Fri Jul 29 05:40:53 CDT 2022

Comment 1 Zdenek Kabelac 2022-09-01 10:17:31 UTC
Please provide better wording if there is one.

The first part if this hint message:

Consider pruning vdo_sanity VG archive with more then 892 MiB in 2171 files

describes a problem with hint how to solve it - that either too many files are considered to be in the '/etc/lvm/archive' directory 
or too large size of archives - or both.



The second part:
(check archiving is needed in lvm.conf).

describes possible 'long-term' solution for such user - if he is generating way too many 'archived' metadata he might get better performance if such stream of archiving is actually disabled.
Since typically this massive load of archived volume groups metadata set is on testing machines where many randomly generated VG names are created.


Lvm2 tracks history size for individual VGs - but if each VG is using different random name - then over the time the amount of collected files may slowdown even lvm command itself (which tries to maintain this history)

Comment 2 Corey Marthaler 2022-09-26 22:56:20 UTC
Right, I totally understand both the first and second part. The second part, when I read it, I thought the "is" was a typo for "if". Like, if this continues to be an issue the user is seeing, then "check archiving in lvm.conf". However, having "check archiving IS needed in lvm.conf" reads like there's a problem that needs to be dealt with, which isn't necessarily the case if you just clean up the dir. I think "(check archiving in lvm.conf if this continues to be an issue)." would read better. However this isn't a big deal either way.

Comment 3 Zdenek Kabelac 2023-02-01 12:37:36 UTC
Upstreamed this message update:

https://listman.redhat.com/archives/lvm-devel/2023-February/024555.html

Comment 6 Corey Marthaler 2023-06-28 18:07:08 UTC
Marking Verified:Tested in the latest rpms.

kernel-5.14.0-322.el9    BUILT: Fri Jun  2 10:00:53 AM CEST 2023
lvm2-2.03.21-2.el9    BUILT: Thu May 25 12:03:04 AM CEST 2023
lvm2-libs-2.03.21-2.el9    BUILT: Thu May 25 12:03:04 AM CEST 2023


[root@grant-01 ~]# ls -l /etc/lvm/archive/ | wc -l
18328
[root@grant-01 ~]# lvremove -f snapper
  Consider pruning snapper VG archive with more then 223 MiB in 14807 files (see archiving settings in lvm.conf).
  Consider pruning snapper VG archive with more then 223 MiB in 14808 files (see archiving settings in lvm.conf).
  Logical volume "boom_snap" successfully removed.
  Logical volume "origin" successfully removed.

Comment 11 errata-xmlrpc 2023-11-07 08:53:27 UTC
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 (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:6633