Red Hat Bugzilla – Bug 425764
lvm tools missing from rescue mode
Last modified: 2013-02-28 23:06:48 EST
Description of problem:
I am trying to repair a system using LVM and software RAID. I booted from the 5.1 CD in rescue mode,
but the LVM tools are largely missing.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Boot from 5.1 disc1.
2. linux rescue
3. pvs, lvdisplay
4. lvm dumpconfig, lvm.static dumpconfig
3. Commands not found.
4. No output.
LVM tools should be available, so I can find my PVs, VGs, and LVs. Right now I can't even tell which
subpartition contains /.
Prefix every command with 'lvm' or 'lvm.static' to run it, like 'lvm.static pvs'.
'lvm dumpconfig' produces no output if it does not find a configuration file.
(Can set environment variable LVM_SYSTEM_DIR to provide alternative location for
the '/etc/lvm' directory.)
Thanks; I thought I tried "lvm pvs", but perhaps I didn't try with lvm.static. Why doesn't lvm.static by itself
give me an LVM shell, as the manual page says it should?
The various manual pages (pvs, lvdisplay, etc.) should have notes explaining how to use them as suffixes.
"lvm pvs" works as expected from RHEL 5.1 rescue mode (rescue boot CD).
lvm binaries are static (lvm is symlink to lvm.static) and are compiled without
Anyway, you can run "lvm help" to show available commands, command agruments are
exactly the same like if using directly
(IOW: "lvm pvs <args>" = "pvs <Args>" etc. Try u.e. "lvm pvs --help")
But the documentation tells people to use 'pvs', etc., and this doesn't work in rescue mode. Either the
manual pages should have a NOTE or BUGS, telling people the alternate invocation in rescue mode, or the
thinks like 'pvs' should at least produce a message telling people to preced with 'lvm ', or the
documentation should describe the 'lvm ' prefix so the documented commands are usable in all
Which documentation for rescue mode doesn't mention this? Raise an
enhancement request against whichever package supplies that.
The lvm(8) man page does cover this:
lvm [command | file]
then goes on to explain the shortcut if you have links to it with different
Regarding lvm.static, that is deprecated and should disappear from
fedora/RHEL6 as soon as the right people find time to update
mkinitrd/initscripts etc. not to use it any more.
If I knew the required command invocation syntax was different in rescue mode, I wouldn't have needed the manual page! ;)
The lvm subcommand manual pages under RHEL5, such as pvs(8), do not mention the "lvm " prefix.
[root@hinfo ~]# man pvs|cat
pvs - report information about physical volumes
pvs [--aligned] [-d/--debug] [-h/-?/--help] [--ignorelockingfailure]
[--noheadings] [--nosuffix] [-o/--options [+]Field[,Field]] [-O/--sort
[+/-]Key1[,[+/-]Key2[,...]]] [--separator Separator] [--unbuffered]
[--units hsbkmgtHKMGT] [-v/--verbose] [--version] [PhysicalVolume
pvs produces formatted output about physical volumes.
See lvm for common options.
Use with --separator to align the output columns.
Suppress the headings line that is normally the first line of
output. Useful if grepping the output.
Suppress the suffix on output sizes. Use with --units (except h
and H) if processing the output.
Comma-separated ordered list of columns. Precede the list with
’+’ to append to the default selection of columns. Column names
are: pv_fmt, pv_uuid, pv_size, dev_size, pv_free, pv_used,
pv_name, pv_attr, pv_pe_count, pv_pe_alloc_count, pv_tags. The
"pv_" prefix is optional. Columns mentioned in vgs (8) can also
be chosen. The pv_attr bits are: (a)llocatable and e(x)ported.
Comma-separated ordered list of columns to sort by. Replaces
the default selection. Precede any column with - for a reverse
sort on that column.
String to use to separate each column. Useful if grepping the
Produce output immediately without sorting or aligning the
All sizes are output in these units: (h)uman-readable,
(s)ectors, (b)ytes, (k)ilobytes, (m)egabytes, (g)igabytes,
(t)erabytes. Capitalise to use multiples of 1000 (S.I.) instead
of 1024. Can also specify custom (u)nits e.g. --units 3M
pvdisplay(8), lvs(8), vgs(8)
Sistina Software UK LVM TOOLS PVS(8)
The ref to lvm(8) is missing in the SEE ALSO section there. Will fix.
So "See lvm for common options" isn't enough, and the man pages should also
say something like "This man page include information that is specific to the
pvs command. For general information about the LVM2 toolset see lvm (8)." ?
Or "This man page should be read in conjunction with lvm (8)."
A SEE ALSO reference and "This man page should be read in conjunction with lvm(8)." would be good.
Even better if you say something in pvs(8) (and all the other subcommand pages) to tip off readers that
"pvs" == "lvm pvs", but not absolutely necessary.