- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Has Anyone Written a "Suite" of LVM Tools/Scripts ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 01:39 AM
10-22-2003 01:39 AM
.
- list what VG's are there in a system
- list LVOLS within a VG with formatting
- show member PV's within a VG
- Free extents on a VG
- Free extents within a PV
- etc., etc. sort of equivs on commands avail on VxVM.
.
Has anyone doen this already? Instead of reinventing the wheel.. would anyone be kind enough to share their script(s).
.
Graci!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 01:44 AM
10-22-2003 01:44 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
LVMcollect
Sysinfo (a HP written version and a shareware version)
http://forums1.itrc.hp.com/service/forums/bizsupport/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x7476402f24d5d61190050090279cd0f9%2C00.html&forumId=2&admit=716493758+1066830244757+28353475
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 01:45 AM
10-22-2003 01:45 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
It checks disks and can be used to display more information if you wish to play with it.
Attaching.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 01:48 AM
10-22-2003 01:48 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 01:54 AM
10-22-2003 01:54 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 02:39 AM
10-22-2003 02:39 AM
SolutionI cobbled up the attached little perl script to summarize VG / LV / PV data from vgdisplay. I'll include it here, but you problably should use the attached version as the forum still swallows spaces.
Enjoy,
Hein.
#!/usr/contrib/bin/perl -w
print "Type Name Allocated Total Free\n";
print "---- --------------------------- -------- -------- --------\n";
foreach $_ (`/usr/sbin/vgdisplay -v`) {
if (/^(\s*\w\w) Name\s+(\S+)/) {
$type = $1;
$name = $2;
$name =~ s/\/dev//;
}
$pe = $1 if (/^PE Size \(Mbytes\)\s+(\w+)/);
$alloc = $1 if (/Allo.* PE\s+(\w+)/);
$total = $1 if (/Total PE\s+(\w+)/);
$free = $1 if (/Free PE\s+(\w+)/);
if (/^$/) {
printf ("%-6s%-30s%9d%9d%9d\n",
$type, $name, $pe * $alloc, $pe * $total, $pe * $free);
$name = $type = " ";
$alloc = $total = $free = 0;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 03:06 AM
10-22-2003 03:06 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
.
Exactly what I am looking for!
.
Thanks a whole lot!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 06:56 AM
10-22-2003 06:56 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
I get the following using your script:
printf (...) interpreted as function at /usr/local/bin/vgdisplay.pl line 15.
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 07:22 AM
10-22-2003 07:22 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
# cat vglist.sh
for name in `cat /root/vgnames.out `
do
echo $name
vgdisplay -v $name |grep "PV Name" |awk '{ print $3 }'
done > /root/disks.by.VG.`date +%m%d%y` 2> /root/vgerr.`
date +%m%d%y`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 07:34 AM
10-22-2003 07:34 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
Thanks for the feedback. I posted an early version with " -w " warnings requested.
Here is a more recent one, with STRIPES added, and lines with zeroes replaced by blanks.
#!/usr/contrib/bin/perl
print "Type Name Stripes Allocated Total Free\n";
print "---- ------------------------------ -- -------- -------- --------\n";
foreach $_ (`/usr/sbin/vgdisplay -v`) {
if (/^(\s*\w\w) Name\s+(\S+)/) {
$type = $1;
$name = $2;
$name =~ s/\/dev//;
}
$pe = $1 if (/^PE Size \(Mbytes\)\s+(\w+)/);
$alloc = $1 if (/Allo.* PE\s+(\w+)/);
$total = $1 if (/Total PE\s+(\w+)/);
$free = $1 if (/Free PE\s+(\w+)/);
$s = $1 if (/Used PV\s+(\w+)/);
if (/^$/) {
if ($alloc + $total + $free) {
printf ("%-6s%-30s%3s%9d%9d%9d\n",
$type, $name, ($s)?$s :" ", $pe * $alloc, $pe * $total, $pe * $free);
} else { print "\n" } ;
$name = $type = " ";
$alloc = $total = $free = $s = 0;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 07:59 AM
10-22-2003 07:59 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
Output:
# vgttl
VG Size(MB) In use Available
vg00 22780 5700 16546
vg01 12288 4 11901
vg30iqa 1311456 1186182 124296
vg31iqa 2048 1028 956
vg32iqa 232688 22685 206161
----- -------------- -------------- --------------
Total 1581260 1215599 359860
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2003 07:59 AM
10-22-2003 07:59 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2003 12:19 AM
10-23-2003 12:19 AM
Re: Has Anyone Written a "Suite" of LVM Tools/Scripts Yet
http://come.to/cfg2html
- Dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2003 06:08 AM
10-23-2003 06:08 AM