- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- FREE PERL SCRIPT: Audit of PVs on HP-UX 11.31
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
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
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
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
- 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 ..."