- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How can I obtain a disk address programmatically (...
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
12-02-2005 07:29 AM
12-02-2005 07:29 AM
How can I obtain a disk address programmatically (c) knowing only a device file?
Problem is alternate links (NIKEs, VA7400's, etc.) are not in the pst_diskinfo table. Since I know the card instance number, etc. from the device file, is there a way to build the address by looking at kernel tables (other then the pst_diskinfo)?
I'm running HPUX 11.0 (don't laugh...).
Any suggestions would be appreciated!
Thanks,
Wayne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 07:34 AM
12-02-2005 07:34 AM
Re: How can I obtain a disk address programmatically (c) knowing only a device file?
Try to look on
ioscan -kfnCdisk
output. You can find the requested information there.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 07:37 AM
12-02-2005 07:37 AM
Re: How can I obtain a disk address programmatically (c) knowing only a device file?
I was looking for insight as to what C code could be written to scan the tables, etc.
Wayne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 07:43 AM
12-02-2005 07:43 AM
Re: How can I obtain a disk address programmatically (c) knowing only a device file?
How to decode those device numbers
e.g 0x1f0d0700
The first 2 hex digits (1fhex - 31decimal) indicate the major device number. Do an lsdev and look for "31". You will find that major block device 31 is SCSI disk. Thus this is a /dev/dsk device node.
The next 2 hex digits (0dhex - 13 decimal) indicate the bus "instance" number or controller number; "c13" in this case.
The next hex digit (0) indicates the SCSI ID or target. "t0" in this case.
The next hex digit (7) indicates the LUN (d7) in this case.
The remaining 2 hex digits are device driver specific.
In summary, 0x1f0d0700 decodes to
/dev/dsk/c13t0d7.
Don't know if that will help or not...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 08:08 AM
12-02-2005 08:08 AM
Re: How can I obtain a disk address programmatically (c) knowing only a device file?
Thanks for the reply!
Wayne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2005 11:21 AM
12-02-2005 11:21 AM
Re: How can I obtain a disk address programmatically (c) knowing only a device file?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2005 04:09 AM
12-05-2005 04:09 AM
Re: How can I obtain a disk address programmatically (c) knowing only a device file?
Wayne
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2005 03:33 AM
12-06-2005 03:33 AM
Re: How can I obtain a disk address programmatically (c) knowing only a device file?
Thanks to all who answered. Points have been assigned to all who answered in recognition of your effort.
Bill, I wasn't being obnoxious with my last reply. I come from a mainframe world where everything in the system is available to authorized users. The control blocks (structures) are not always documented, but, having access to the code solves that problem. It's a little difficult adjusting, even after 10 years, to a world where the sys admin is supposed to just "trust" the OS.
Take care and thanks again!
Wayne