- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- hw-path to dev-file
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
01-08-2003 12:48 AM
01-08-2003 12:48 AM
i need a way how to find out the dev-file if the hw-path is known (i??m shure it??s a easy task, but i dont know).
example: i have a tape on the path: 0/2/0/0.4.2.255.0.0.1
which belongs to the /dev/rmt/25m. an ll to the dev-file brings the following result:
crw-rw-rw- 2 bin bin 205 0x420100 Dec 12 07:57 /dev/rmt/25m
for a short script i need (if it exists) a way, how to find with the info of the hw-path the dev-file.
who knows a short solution?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 12:53 AM
01-08-2003 12:53 AM
Re: hw-path to dev-file
Think you can you use
# ioscan -fnc tape
the output will show both the hardware and the file path.
Hope it helps,
Robert-Jan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 12:56 AM
01-08-2003 12:56 AM
Re: hw-path to dev-file
# ioscan -fnC tape
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 01:00 AM
01-08-2003 01:00 AM
Re: hw-path to dev-file
COMMAND hw-path
and the solution is:
/dev/rmt/5mn.
but it seems that i have to write a more intelligent script. thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 01:03 AM
01-08-2003 01:03 AM
Re: hw-path to dev-file
ioscan -fnH0/2/0/0.4.2.255.0.0.1
will show you the device files associated with that h/w path.
Rgds, Robin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 01:03 AM
01-08-2003 01:03 AM
Re: hw-path to dev-file
# ioscan -fnkH 0/2/0/0.4.2.255.0.0.1
# lssf /dev/rmt/* | fgrep 0/2/0/0.4.2.255.0.0.1
Best regards...
Dietmar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 01:06 AM
01-08-2003 01:06 AM
Re: hw-path to dev-file
'ioscan' is the tool that hepls you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 01:09 AM
01-08-2003 01:09 AM
Re: hw-path to dev-file
If you want to script it, something like this:
===============================
#!/usr/bin/ksh
hw=$1
ioscan -fnH$hw | tail +4 | awk '{for (i=1;i<=NF;i++){print $i}}'
===============================
# ./hw_to_dev.sh 56/52.4.0
/dev/diag/rmt/c2t4d0
/dev/rmt/1mb
/dev/rmt/1mnb
/dev/rmt/c2t4d0BESTb
/dev/rmt/c2t4d0BESTnb
/dev/rmt/1m
/dev/rmt/1mn
/dev/rmt/c2t4d0BEST
/dev/rmt/c2t4d0BESTn
Rgds, Robin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 01:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 01:11 AM
01-08-2003 01:11 AM
Re: hw-path to dev-file
Please post ioscan here.
Usually /dev/rmt/Xm where X means tape drive number, and all other information is coded into minor of device file
Eugeny