Sponsored Content
Full Discussion: dispaly vg's and pv's?
Operating Systems AIX dispaly vg's and pv's? Post 302232948 by honeym210 on Friday 5th of September 2008 03:15:05 PM
Old 09-05-2008
i got it..

my script is ....

#!/bin/ksh
#Removing Old Files.
rm output
rm reportvg.out
rm reportpv.out
rm errors
#List of Volume Groups.
lsvg >> reportvg.out
#Creating file for output.
touch output
touch errors
echo "List of Volume Groups and Physical Volume:" >> output
while read -r line
do
echo "Volume Group Name: " $line >> output
lsvg -p $line > reportpv.out
while read -r line
do
#echo "Physical Volume Name: " $line >> output
lspv $line | grep 'PHYSICAL VOLUME' | awk '{print $1 " " $2 "\t" $3}' >> output
lspv $line | grep 'PV IDENTIFIER' | awk '{print $1 " " $2 "\t" "\t" $3}' >> output
done < reportpv.out
echo " " >> output
done < reportvg.out


it works beautiful...
thanks
 

2 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Issue with dispaly of special character like 'TM'

Hi, I've an xml file with special characetr 'TM' (trade mark sign). The issue is that I am not able to get the symbol 'TM'(trade mark sign) on unix. It displays '?' instead. I've searched the solution on net. Wht I've found is that the symbol 'TM' does not come under ISO-8859-1 char set. So I... (0 Replies)
Discussion started by: vbehal
0 Replies

2. Solaris

Dispaly IP address

How to display the IP address in authlog and sulog? (1 Reply)
Discussion started by: Burhan
1 Replies
vgremove(1M)															      vgremove(1M)

NAME
vgremove - remove LVM volume group definition from the system SYNOPSIS
vg_name ... Remarks If a combination of volume groups version 1.0 and 2.0 or higher arguments are supplied, then the arguments might not be processed in the order they are listed on the command line. DESCRIPTION
The command removes from the system the last physical volume of the volume group and the definition of the volume group or groups specified by vg_name .... Since all system knowledge of the volume group and its contents are removed, the volume group can no longer be accessed. To move a volume group from one system to another, use the command instead (see vgexport(1M)). Before executing remove all logical volumes residing on the last physical volume by executing (see lvremove(1M)). Before removing a volume group, two steps are necessary: 1. Remove all the logical volumes belonging to the group by using the command (see lvremove(1M)). 2. Remove all but one physical volume belonging to the volume group by using the command (see vgreduce(1M)). If there is any physical volume group created under vg_name ..., the physical volume group information is also removed from file Options and Arguments recognizes the following option and argument: For each volume group removed, also remove its volume group directory and file vg_name The path name of a volume group. EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. If is not specified or is null, it defaults to "C" (see lang(5)). If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)). EXAMPLES
Remove volume group from the system: SEE ALSO
lvremove(1M), vgchange(1M), vgreduce(1M). vgremove(1M)
All times are GMT -4. The time now is 11:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy