- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- Languages and Scripting
- >
- FREE PERL SCRIPT: Audit of PVs on HP-UX 11.31
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- Report Inappropriate Content
06-27-2011 02:52 AM
06-27-2011 02:52 AM
FREE PERL SCRIPT: Audit of PVs on HP-UX 11.31
Hello,
History of the Perl script. Several weeks ago, one of the colleagues was looking for a way to document
PV/LUNs on HP-UX 11iv3 that would contain information about their serial numbers, WWNs, and even location
of the storage (for example, is the PV/LUN coming from a remote site)...
I wrote a simple script and I think it can do the job :) Quite on purpose, I decided not to use any special Perl
modules (because most of HP-UX servers would not have them by default), or additional tools like "xpinfo",
"evainfo" (because lot of sites Would not have them installed too). I used native HP-UX 11iv3 commands like
vginfo, lvlist, ioscan, pvdisplay, and scsimgr.
Here is how you to use it:
USAGE HP-UX-11iv3-list-disks [-h] -f conffile [-l "location"] [> myserv.csv]
-h Print this help message
-f conffile Lookup disk parameters from a config file
-l "location" Site location of the local server
(use double quotes if location name contains whitespaces)
Typical process to set everything up:
a) Create configuration file "myconf.txt" with the contents like this:
ZU3VLF29SZM5C8 = "DS Site1"
7VB36XM = "DS Site2"
RKMU4A29SZM4T0AFV77648CZ = "SWC Site2"
9AN52C1 = "XP Site3"
pp796a29Szm4t0afvkb72dan0021zk = "EVA Site4"
46F73DS = "XP Disaster Recovery Site5"
Put PVs' serial numbers that you want to audit their locations. Not necessary to list serial numbers for all
PVs - entirely personal choice...
The hex numbers on the left-hand side of the equal sign are PV/LUN serial numbers, obtained via
"scsimgr get_info -D <disk>" command.
DS, SWC, XP, EVA... define the storage type, and the rest of the string on the right-hand side define the PVs'
physical site location (for example, "Site2", "Disaster Recovery Site5", and so on).
In this specific case, "DS" storage type contains LUN numbers in the last four characters of the PVs' serial
number and all other storage types have LUNs defined as last four characters of their WWNs.
Change it if the rule in your environment is different.
The names of storage types (DS, XP, EVA,...) are entirely personal choice and each customer can choose their
own ones!
b) Run script (assuming your HP-UX server is located at site "Site1"):
# HP-UX-11v3-list-disks.pl -f /somedir/myconf.txt –l Site1 > myserv.csv
c) Go to your PC and import data from text file "myserv.csv" file into Excel spreadsheet (ensure that you use
semicolon as separator!). Save the file under name, say, "myserv.xlsx".
As always, blame me for any errors.
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-27-2011 05:01 AM
06-27-2011 05:01 AM
Re: FREE PERL SCRIPT: Audit of PVs on HP-UX 11.31
Hi,
I'm not sure if I miss an attachment due to the new forum's or a link to your site but where is actually the script?
Wild guess from your older posts: http://www.circlingcycle.com.au/Unix-sources/HP-UX-11iv3-list-disks.pl.txt
Thanks a lot for the contribution and even without testing it will work great and will be useful.
Best
Stephan
How to find the right forum --> New forum location by ITRC tree
"we wouldn't call it code, if we could read it ..."
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP