#688789 /sbin/lvcreate: lvcreate/lvremove --quiet are not quiet

Package:
lvm2
Source:
lvm2
Description:
Linux Logical Volume Manager
Submitter:
Roger Lynn
Date:
2014-12-30 03:00:11 UTC
Severity:
normal
#688789#5
Date:
2012-09-25 16:37:48 UTC
From:
To:
Every invocation of lvcreate --quiet or lvremove --quiet from a /bin/sh
script called from bash outputs:

File descriptor 3 (/usr/share/bash-completion/completions) leaked on lvcreate invocation. Parent PID 32675: /bin/sh
  Logical volume "backup" created

or:

File descriptor 3 (/usr/share/bash-completion/completions) leaked on lvremove invocation. Parent PID 32675: /bin/sh
  Logical volume "backup" successfully removed

Having wasted quite a bit of time investigating this error message at least
I know that is apparently meaningless and can be safely ignored. Perhaps this
will be useful to other people encountering this error.

Thanks,

Roger

#688789#10
Date:
2014-12-30 02:40:54 UTC
From:
To:
I recently had the same problem with lvcreate / lvremove. I assumed a bug in
the source and went looking to fix it.

I learned from a source comment (lib/commands/toolcontext.c:183) that there is
the -qq option for extra quietness disables the spurious output from lvcreate
and lvremove. The manpage for LVM suggests that repeating -q will "also
suppress any prompts with answer 'no'", which doesn't seem to match this case.

I still consider it a bug that this output is not removed by --quiet, but
that's for the Debian maintainers to decide; in the meantime, I hope that
documenting this workaround will help those who find the original bug report
after discovering this behaviour.