- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ioctl call on HPUX to get tape device LUN, Tar...
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
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
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
тАО05-17-2010 03:28 AM
тАО05-17-2010 03:28 AM
Can some one please let me know if there is a way to get the SCSI tape device information like the Target ID, LUN number, Bus number using an ioctl call on the raw device file ( similar to SIOC_INQUIRY which gives us the vendor and product name).
"ioscan -fun" gives us the above information as the H/W Path, But I'm looking for an ioctl that provides the information.
Any help is highly appreciated
Thanks,
Naveen.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2010 06:33 AM
тАО05-17-2010 06:33 AM
SolutionTo my knowledge, there is no such API
the only way looks to be to popen() the "ioscan -fnkC disk", or "ioscan -funC disk"
and process the output.
you can also process /stand/ioconfig like indicated in man ioconfig.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-17-2010 09:34 PM
тАО05-17-2010 09:34 PM
Re: ioctl call on HPUX to get tape device LUN, Target ID and Bus Number
Thanks for the reply. Yeah, Even i have found that there is no ioctl call that gives you the LUN, Target ID, Bus number . so, I have found a way to get these information using the major number and minor number of the device file. I think that would do it for me.
Now I have got another issue now with open command on tape device file.
I have a tape library with tape drives and there is no volume loaded in any of these drives. When I issue a open command on one of the device file of a tape drive , I'm getting an error saying "No such device or address".
And the mt output says that "the tape media is not present"
Drive: IBM ULTRIUM-TD3
Format:
Status: Tape media is not present
File: 0
Block: 0
But, When I load a volume in to one of the tape drives and issue a open command, its working fine and i could use any ioctl on that tape device.
So, Is it like we can do an open on a tape device file only when a volume is loaded in the tape drive. And How is iostat giving us the information even when there is no volume loaded in the tape drive .
Thanks,
Naveen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 01:50 AM
тАО05-18-2010 01:50 AM
Re: ioctl call on HPUX to get tape device LUN, Target ID and Bus Number
If you are using HP-UX 11.31, you have an excellent tool. For example, start with this
command:
# scsimgr -get_info -D /dev/rtape/tape0_BEST
scsimgr(1M) is very powerful.
Cheers,
VK2COT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 02:03 AM
тАО05-18-2010 02:03 AM
Re: ioctl call on HPUX to get tape device LUN, Target ID and Bus Number
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 02:13 AM
тАО05-18-2010 02:13 AM
Re: ioctl call on HPUX to get tape device LUN, Target ID and Bus Number
I did an mt and open on one of the tape drive device files listed by the "ioscan -funC tape" command.
tape 77 ***** stape CLAIMED DEVICE IBM ULTRIUM-TD3
/dev/rmt/77m /dev/rmt/77mn /dev/rmt/c13t3d6BEST /dev/rmt/c13t3d6BESTn
/dev/rmt/77mb /dev/rmt/77mnb /dev/rmt/c13t3d6BESTb /dev/rmt/c13t3d6BESTnb
I have tried the mt and open on all the device files listed above for the tape drive but with the same issue.
and mt rew is giving the same error.
bash-4.0$ mt -f /dev/rmt/77mb rew
/dev/rmt/77mb: No such device or address
Thanks,
Naveen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-18-2010 02:18 AM
тАО05-18-2010 02:18 AM
Re: ioctl call on HPUX to get tape device LUN, Target ID and Bus Number
Thanks for the reply. I'm using 11.31 and the tool is really helpful.
But I'm looking for an ioctl call or a C function that gives the information as displayed by the tool for my application.
Can you let me know the list of ioctl calls or C functions the tool uses to get the information like the Vendor name, Product name, Target ID, Bus number, LUN, device class .
thanks,
Naveen.