Bug 1327091

Summary: LVM log level 7 is rather verbose and may fill the ramdisk
Product: [Fedora] Fedora Reporter: Marian Csontos <mcsontos>
Component: python-blivetAssignee: Vratislav Podzimek <vpodzime>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 24CC: agk, blivet-maint-list, mcsontos, vpodzime
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-08 14:14:47 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: 1275377    

Description Marian Csontos 2016-04-14 09:31:17 UTC
Description of problem:
I have a machine with lot of disks, many LVs on top of them.
While retesting the Bug 1275377, ramdisk gets filled with 1GB of logs (500M in /tmp/lvm.log and the same repeated in syslog.)

First you might want to consider setting log.syslog to 0 to prevent the duplicate writes.

Logs may need rotating, gzipping, or consider writing only logs for failed commands.

Version-Release number of selected component (if applicable):
anaconda 24.13.3-1
blivet 1.19 
lvm 2.02.143(2) (2016-02-11)

Comment 1 Vratislav Podzimek 2016-04-15 04:35:08 UTC
This is what blivet uses with the '--config' option in all LVM commands:
"log {level=7 file=/tmp/lvm.log}"

1) Is there any way to prevent LVM from flooding syslog with all those log messages and put them *only* into the specified file? (That's the expected behaviour of the above, btw.)

2) Does LVM support anything like 'file=/tmp/lvm.log.gz' to compress the log file? Could you please try compressing that giant log file to see how much it shrinks?

Thanks!

Comment 2 Marian Csontos 2016-04-22 14:44:03 UTC
(In reply to Vratislav Podzimek from comment #1)
> This is what blivet uses with the '--config' option in all LVM commands:
> "log {level=7 file=/tmp/lvm.log}"

This may be too verbose most of the time.

IMO there should be a boot/kickstart option (reuse `debug`, or use own one) to make LVM more verbose, but as a default this is may be way too much.

> 
> 1) Is there any way to prevent LVM from flooding syslog with all those log
> messages and put them *only* into the specified file? (That's the expected
> behaviour of the above, btw.)

Yes. there is:

(In reply to Marian Csontos from comment #0)
> First you might want to consider setting log.syslog to 0 to prevent the
> duplicate writes.

> 2) Does LVM support anything like 'file=/tmp/lvm.log.gz' to compress the log
> file?

Nope. That's logrotate's job.

> Could you please try compressing that giant log file to see how much it shrinks?

The log is text with many repeated strings and is thus fairly well compressible.

Also not repeating same commands again and again would help a lot (Bug 1275377.)

Comment 3 Vratislav Podzimek 2016-04-25 12:25:05 UTC
Thanks for the info! Removal of the duplication proposed as:
https://github.com/rhinstaller/blivet/pull/387

Comment 4 Marian Csontos 2016-04-25 12:41:42 UTC
Thanks. I also added Bug 1255659 to SeeAlso, as it is often difficult to deduce the state of the storage anaconda was starting with from the Tracebacks.

Comment 5 Fedora End Of Life 2017-07-25 20:33:07 UTC
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2017-08-08 14:14:47 UTC
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 7 Alasdair Kergon 2017-08-08 14:17:37 UTC
We also added debug_classes to lvm.conf to allow filtering by message type.