All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] lvcreate and lvremove --quiet option is not quiet
@ 2011-02-14 15:46 Jeff
  2011-02-14 16:31 ` Ray Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff @ 2011-02-14 15:46 UTC (permalink / raw)
  To: linux-lvm

Background: I am using lvm snapshots in a backup script. My general
scripting philosophy is that automation scripts that do not have
errors should not generate output that will cause cron to send an
email.

I am using Ubuntu 10.04 with lvm2.02.54-1ubuntu4.

Even with the --quiet option I get "Logical volume <name> created" on
stdout with lvcreate and "Logical volume <name> successfully removed"
with lvremove.

So... I grabbed the source code and started nosing around. In
lv_manip.c, I find that these messages are produced with a call to the
function log_print. log_print is a macro (in log.h) for
LOG_LINE(_LOG_WARN, args). So it looks like the logging system sees
these messages as warnings and is printing them even though verbosity
is turned down as far as possible. In addition to --quiet on the
command line, I have verbose = 0 in lvm.conf which according to the
man page "should produce no output".

From my point of view, lv_manip.c should be calling the log_info macro
for these messages and not log_print, thus giving the user control
over the output as advertised by the documentation. Disclaimer: I did
not dig into the source code far enough to be assured that log_info
will generated the proper results, but it certainly appears on the
surface to be the right option.

I also downloaded the latest source tarball (2.0.2.84) and the
situation appears to be the same.

Jeff

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-02-15 17:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14 15:46 [linux-lvm] lvcreate and lvremove --quiet option is not quiet Jeff
2011-02-14 16:31 ` Ray Morris
2011-02-14 17:43   ` Jeff
2011-02-14 18:14     ` Alasdair G Kergon
2011-02-15 13:02       ` Jeff
2011-02-15 13:41         ` Mike Snitzer
2011-02-15 16:07           ` Jeff
2011-02-15 17:04             ` Mike Snitzer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.