[pve-devel] [PATCH storage] lvm: avoid warning due to human-readable text in vgs output

Friedrich Weber f.weber at proxmox.com
Fri Jan 12 10:09:23 CET 2024

On 12/01/2024 09:57, Fiona Ebner wrote:
> Am 11.01.24 um 17:58 schrieb Friedrich Weber:
>> [1] https://sourceware.org/git/?p=lvm2.git;a=blob;f=lib/format_text/archive.c;h=5acf0c04a;hb=38e0c7a1#l222
>>  222                 log_print_unless_silent("Consider pruning %s VG archive with more then %u MiB in %u files (see archiving settings in lvm.conf).",
>>  223                                         vgname, (unsigned)sum, archives_size);
> Can we pass a silent flag when invoking the command instead?

Good point. A quick test shows passing `-q` does not suppress the
message, but passing `-qq` does. Documentation on `-qq` [1]:

> -q|--quiet ...
> Suppress output and log messages. Overrides --debug and --verbose.
Repeat once to also suppress any prompts with answer 'no'.

Not sure if automatically answering prompts with 'no' might cause
problems -- I don't think I've ever seen a yes/no prompt by `vgs`
though. What do you think?

[1] https://manpages.debian.org/bookworm/lvm2/vgs.8.en.html

More information about the pve-devel mailing list