- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Convert HW path to device name
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
09-05-2007 04:13 AM
09-05-2007 04:13 AM
Is there a fast way to convert a HW path from ioscan to the device name associated to be used within a script.
Example: 0/0/12/1/0/4/0.110.27.19.0.4.1 is /dev/dsk/c26t4d1
Actually I am looking for a simple HP-UX command that will return the /dev/dsk/c26t4d1 for 0/0/12/1/0/4/0.110.27.19.0.4.1 entered
Is that possible ?
Regards,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2007 04:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2007 04:23 AM
09-05-2007 04:23 AM
Re: Convert HW path to device name
The only part of the hw path reflected in the device file is
0.4.1
out of
0/0/12/1/0/4/0.110.27.19.0.4.1
The part "0.4.1" indicates a LUN# 31 and will result in a device file
cxt4d1
The "x" depends.
But you can run
"ioscan -fnH 0/0/12/1/0/4/0.110.27.19.0.4.1"
and awk/grep the device file from the result.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2007 04:28 AM
09-05-2007 04:28 AM
Re: Convert HW path to device name
$disks = system("ioscan -H $device -fn|grep dsk");
returns only the /dev/dsk and /dev/rdsk entry which is EXACLTY what I was looking or.
Retards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2007 05:27 AM
09-05-2007 05:27 AM
Re: Convert HW path to device name
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2007 05:46 AM
09-05-2007 05:46 AM
Re: Convert HW path to device name
ioscan -funC disk -H ${hw} | tail -1 | awk '{print $NF}'
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html