09-05-2008
dispaly vg's and pv's?
hi
i need to write a script,
the script display's list of volume groups followed by physical volumes with in volume group and at the same time the script should display the pvid of physical volume.
what i need is, how to read the line by line from the files...
the below is my script..
echo "List of Volume Groups and Physical Volume:"
while read xxxxxx (the xxxx should read from file reportvg.out)
do
lsvg -p xxxxxx > reportpv.out (the xxxxx is vg anme)
while read xxxxxx ( the xxxx is the pv name from reportpv.out)
do
lspv xxxxx | grep IDENTIFIER ( the xxxx is pv name)
done reportpv.out
done reportvg.out
can anyone help me on this.
thanks
Last edited by honeym210; 09-05-2008 at 11:59 AM..
2 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
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
How to display the IP address in authlog and sulog? (1 Reply)
Discussion started by: Burhan
1 Replies
LEARN ABOUT FREEBSD
pvchange
PVCHANGE(8) System Manager's Manual PVCHANGE(8)
NAME
pvchange - change attributes of a physical volume
SYNOPSIS
pvchange [--addtag Tag] [-A|--autobackup y|n] [-d|--debug] [-f|--force] [--deltag Tag] [--metadataignore y|n] [-h|-?|--help] [-t|--test]
[-v|--verbose] [-a|--all] [-x|--allocatable y|n] [-u|--uuid] [PhysicalVolumePath...]
DESCRIPTION
pvchange allows you to change the allocation permissions of one or more physical volumes.
OPTIONS
See lvm for common options.
-a, --all
If PhysicalVolumePath is not specified on the command line all physical volumes are searched for and used.
--metadataignore y|n
Ignore or un-ignore metadata areas on this physical volume. If metadata areas on a physical volume are ignored, LVM will not not
store metadata in the metadata areas present on this Physical Volume.
-u, --uuid
Generate new random UUID for specified physical volumes.
-x, --allocatable y|n
Enable or disable allocation of physical extents on this physical volume.
Example
"pvchange -x n /dev/sdk1" disallows the allocation of physical extents on this physical volume (possibly because of disk errors, or because
it will be removed after freeing it.
SEE ALSO
lvm(8), pvcreate(8)
Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) PVCHANGE(8)