Re: Concise LVM Summary

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can pretty much print things how you want by specifying the right things on the command line. 'lvs' and friends will default to printing out certain columns, but you can change that.

prompt> lvs --noheadings # print things out without the headings
prompt> lvs --noheadings -o lv_name  #print just the lv names
prompt> lvs --noheadings -o lv_name, uuid #print the lv names and their uuid
etc

for a more complete list, see the various man pages

 brassow



On Apr 8, 2006, at 4:11 PM, <linux_user98765@yahoo.com> wrote:

I'm trying to write a perl script to give concise output of
pvs, vgs, lvs, pvdisplay, vgdisplay, lvdisplay and df -- something
like:


VG home [PE (4MB): 0 (0 b) / 52205 (203.93 GB)]
LV /dev/home/lvol0 /home [LE: 52205 (203.93 GB); DF: 64G/201G (129G)
34%]
PV /dev/sdb [PE (4096KB): 0 (0 b) / 38156 (149.05 GB); DF: ??/149G (??)
??%]
PV /dev/hdb4 [PE (4096KB): 0 (0 b) / 14049 (54.88 GB); DF: ??/55G (??)
??%]


however, there are a few things I have yet to figure out:

- determine the actual disk usage of a particular PV in a given LV
- the lvs column option which produces the heading "Log"
- the nature of the pvs,vgs,lvs separator inconsistencies:

lvs - Headers and LV lines are separator terminated
vgs - Headers not separator terminated, VG lines are
pvs - Headers not separator terminated, PV lines are

- The unabreviated names of the column headings
  (a website detailing each would be nice)
- whether pvdisplay,vgdisplay,lvdisplay offer anything more than
  pvs, vgs, lvs with all columns displayed
- Why the majority of pvs,vgs,lvs columns lack data

I'm still working on the code, but the above are the major stumbling
blocks I've come across so far...

TIA!

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/


_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux