[linux-lvm] Concise LVM Summary
jbrassow at redhat.com
Wed Apr 12 15:59:08 UTC 2006
On Tue, 2006-04-11 at 21:17 -0700, linux_user98765 at yahoo.com wrote:
> lvs,pvs,vgs each provide for output of specified columns (with optional
> headers and field separators); HOWEVER this is still limited as (at
> least on my debian pkg) PV and LV commands cannot be combined, thus
> negating the possibility of anything even as simple as:
Of course, but you said you were using a perl script to put the info
together. Using the commands as suggested makes them easier to parse.
You should be able to figure out how full a PV is that is part of an LV,
but I'm not sure you can determine what parts of a pv an lv uses - or
how much space an lv uses of a pv.
prompt> lvs --noheadings -o devices vg/lv
prompt> pvs --noheadings -o pv_used,pv_size /dev/sda
So, you can use vgs to get the vg names, lvs to get the lv names in
those vgs and the devices they live on, and pvs to get basic usage.
If you want to do more, you might consider looking
at /etc/lvm/backup/<vg name>
More information about the linux-lvm