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
VGRENAME(8)						      System Manager's Manual						       VGRENAME(8)

NAME
vgrename - rename a volume group SYNOPSIS
vgrename [-A|--autobackup y|n] [-d|--debug] [-h|-?|--help] [-t|--test] [-v|--verbose] OldVolumeGroup{Path|Name|UUID} NewVol- umeGroup{Path|Name} DESCRIPTION
vgrename renames an existing (see vgcreate(8) ) volume group from OldVolumeGroup{Name|Path|UUID} to NewVolumeGroup{Name|Path}. OPTIONS
See lvm for common options. Examples "vgrename /dev/vg02 /dev/my_volume_group" renames existing volume group "vg02" to "my_volume_group". "vgrename vg02 my_volume_group" does the same. "vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 VolGroup00_tmp" changes the name of the Volume Group with UUID Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 to "VolGroup00_tmp". All the Volume Groups visible to a system need to have different names. Otherwise many LVM2 commands will refuse to run or give warning messages. This situation could arise when disks are moved between machines. If a disk is connected and it contains a Volume Group with the same name as the Volume Group containing your root filesystem the machine might not even boot correctly. However, the two Volume Groups should have different UUIDs (unless the disk was cloned) so you can rename one of the conflicting Volume Groups with vgrename. SEE ALSO lvm(8), vgchange(8), vgcreate(8), lvrename(8) Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) VGRENAME(8)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy