lvmteam / lvm2

Mirror of upstream LVM2 repository
https://gitlab.com/lvmteam/lvm2
GNU General Public License v2.0
133 stars 73 forks source link

Man pages give incorrect instructions to view the list of available fields #165

Open josephcsible opened 4 days ago

josephcsible commented 4 days ago

The man pages for pvdisplay, vgdisplay, lvdisplay, and lvm-fullreport all include the following text:

Use -o help to view the list of all available fields.

But that doesn't actually work: pvdisplay -o help, vgdisplay -o help, and lvdisplay -o help all give an Incompatible options selected error, and lvm fullreport -o help just gives the same output as lvm fullreport with no arguments.

zkabelac commented 4 days ago

Hmm - it does look like there is some inconsistency from man page generation.

This '-o' is for commands 'pvs/vgs/lvs'

I'll check - thanks for noticing.

prajnoha commented 4 days ago

This is just the same text used for all man pages. The pv/vg/lvdisplay needs to use -C in addition (to switch into "report/column" mode). The lvm fullreport needs "--configreport" in addition for the "-o" to be usable. We can either write 3 separate texts (with 99% of the common part) for each variation (pvs/vgs/lvs VS. pvdisplay/vgdisplay/lvdisplay VS. fullreport), or we can write into a single common text (though that could be a bit misleading if we start writing about "-C" and "--configreport" need if it's not applicable to other commands using the "-o").

zkabelac commented 4 days ago

Yep - the man page will need extra clarification - as the option '-C' will simply switch command pvdisplay -> pvs, lvdisplay -> lvs, vgdisplay -> vgs.

So we should probably make there 2 'entries' for such commands i.e. one showing 'old' pvdisplay and one referring to 'pvs'. As ATM it might look a bit confusing a single command has 'many' acceptable option usable only in certain cases.