- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to get device path
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
03-08-2008 08:08 PM
03-08-2008 08:08 PM
how to get device path
This is the section of code in tru64 to get the respective device path.
dev_name=$(hwmgr -view devices |grep DVD-ROM |awk '{print $2}')
how can i do it in hp-ux. i believe we need to use ioscan for this.but still i am not familiar with it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2008 08:25 PM
03-08-2008 08:25 PM
Re: how to get device path
issue this command
#ioscan -fnC disk|grep DVD
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2008 01:19 AM
03-09-2008 01:19 AM
Re: how to get device path
#Ioscan -fn command output will give all Hardware installed in the system. For more details refer the man page of ioscan.
Regards,
Davis Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 01:39 AM
03-26-2008 01:39 AM
Re: how to get device path
for example
i added a disk from eva
now i want to see to
i can use ioscan -funC disk(here disk is a category
it will show claimed or not
once it is claimed it means it is loaded in the kernal
ohterwise u have to create device files
by using insf -e or insf -e disk
ok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 01:41 AM
03-26-2008 01:41 AM
Re: how to get device path
normally u can use ioscan -funC disk
then it will show all hardware path,class,driver etc...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 01:54 AM
03-26-2008 01:54 AM
Re: how to get device path
Ex: /dev/disk/floppy0c (for a floppy)
In hpux, the ioscan output displays the path, but not on the same line.
Ex:
disk 3 0/0/2/1.3.0 sdisk CLAIMED DEVICE HP DVD-ROM 305
/dev/dsk/c1t3d0 /dev/rdsk/c1t3d0
Here the device path name comes in the line after the 'DVD' string. So, I think you may have to do some extra filtering to get the pathname correctly.
I am not aware of any ioscan option that displays it the tru64 way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 01:59 AM
03-26-2008 01:59 AM
Re: how to get device path
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 03:14 AM
03-26-2008 03:14 AM
Re: how to get device path
For getting hardware path of DVD you can use ioscan.
The third field in ioscan output is hardware path which you can extract using normal awk thing. Try:
#ioscan -fnC disk|grep -i DVD|awk '{print $3}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2008 06:42 AM
03-26-2008 06:42 AM
Re: how to get device path
The DVD may or may not have a SCSI ID string that says DVD since this string is provided from the drive manufacturer. You can limit the output to just disks with this command:
ioscan -kfC disk
Once you see the ID for the DVD, you can narrow the search using grep to match the string. If this is part of a general script to look at many machines, grep'ing for DVD will eventually overlook some devices because of their ID string. Try something like this:
ioscan -kfC disk | grep -ie dvd -e cd -e rom
That should get most all CD/DVD drives.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2008 11:32 AM
06-06-2008 11:32 AM
Re: how to get device path
For example, I have an rx2600 with a DVD drive for which ioscan gives the output 'TEAC DV-28E-N'. Neither 'CD' nor 'DVD' nor 'ROM' are in the string. [And someday soon (maybe already?) there will be Blu-ray.]
There ought to be a better way to tell when scripting whether the sdisk device is a CD/DVD-type removable media disk or a 'regular' disk. Anybody have one?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2008 12:11 PM
06-06-2008 12:11 PM
Re: how to get device path
How about this?
This is an USB DVD drive in 11.31:
disk 7 0/0/2/1.0.16 UsbScsiAdaptor CLAIMED DEVICE USB SCSI Stack Adaptor
/dev/deviceFileSystem/Usb/MassStorage/dsk/disk@hp-1008+294=A60020000001
/dev/deviceFileSystem/Usb/MassStorage/rdsk/disk@hp-1008+294=A60020000001
But if I test my CD/DVD drive I get
# diskinfo /dev/rdsk/c1t2d0 | grep type
type: CD-ROM
for the disk I get
type: direct access
But do I really need a script for this?
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!
