X-Git-Url: https://defaria.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=clients%2FHP%2Fbin%2Flvs;fp=clients%2FHP%2Fbin%2Flvs;h=ca95ad5c1179905f0f7327141d129ec8cfeb569e;hb=a8c84d2892f07a6863b68a11eb0a4a79ffd71fb5;hp=0000000000000000000000000000000000000000;hpb=95384f94f88aceeb5eef2d322210ba4a438b6512;p=clearscm.git diff --git a/clients/HP/bin/lvs b/clients/HP/bin/lvs new file mode 100644 index 0000000..ca95ad5 --- /dev/null +++ b/clients/HP/bin/lvs @@ -0,0 +1,33 @@ +#!/bin/ksh +################################################################################ +# +# File: lvs +# RCS: $Header: lvs,v 1.1 97/04/08 15:27:22 defaria Exp $ +# Description: A script to list the LVM's and their disk devices +# Author: Jeff Bralley (Contrator), California Language Labs +# Created: Tue Apr 8 14:35:00 PDT 1997 +# Modified: Tue Apr 8 15:11:13 PDT 1997 Andrew DeFaria (defaria@cup.hp.com) +# Language: Korn Shell +# +# (c) Copyright 2001, Andrew@DeFaria.com, all rights reserved +# +################################################################################ +print "Mount Point\tLogical Volume\t\tPhysical Volume" +echo '--------------- ----------------------- ---------------' + +vgdisplay | + grep '^VG Name' | + awk '{print $3}' | + while read vgName; do + for volumeName in $vgName/*; do + if [ ! -b $volumeName ]; then + continue + fi + pd=$(lvdisplay -v $volumeName | grep '^[ ]*/dev/dsk' | awk '{print $1}') + mp=$(bdf $volumeName 2> /dev/null | grep -v Filesystem | awk '{print $NF}') + if [ "$mp" = "" ]; then + mp=swap + fi + print "$mp\t\t$volumeName\t\t$pd" + done +done