lvm provides the command-line tools for LVM2. A separate
manual page describes each command in detail.
If lvm is invoked with no arguments it presents a readline prompt
(assuming it was compiled with readline support).
LVM commands may be entered interactively at this prompt with
readline facilities including history and command name and option
completion. Refer to readline(3) for details.
If lvm is invoked with argv[0] set to the name of a specific
LVM command (for example by using a hard or soft link) it acts as
that command.
Where commands take VG or LV names as arguments, the full path name is
optional. An LV called "lvol0" in a VG called "vg0" can be specified
as "vg0/lvol0". Where a list of VGs is required but is left empty,
a list of all VGs will be substituted. Where a list of LVs is required
but a VG is given, a list of all the LVs in that VG will be substituted.
So "lvdisplay vg0" will display all the LVs in "vg0".
Tags can also be used - see addtag below.
One advantage of using the built-in shell is that configuration
information gets cached internally between commands.
A file containing a simple script with one command per line
can also be given on the command line. The script can also be
executed directly if the first line is #! followed by the absolute
path of lvm.