- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: not getting legacy device name for agile devic...
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
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
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
07-21-2011 12:15 AM
07-21-2011 12:15 AM
Hi I am using libIO/io_new_to_legacy_dsfs() API for identifying the legacy devices for a given new agile device name.
But I am not getting the legacy device names as out put, Here is my snippet,
char legacy_dsf[MAXPATHLEN]="";
int count;
if (io_init(O_RDONLY) != IO_SUCCESS)
{
io_error ("io_init");
return -1;
}
//int io_new_to_legacy_dsfs(char *new_dsf, char *legacy_dsf, int *count);
io_new_to_legacy_dsfs(argv[1], legacy_dsf, &count);
printf("dsfDevice : %s \tlegacy_dsf : %s \tcount:%d\n", argv[1], legacy_dsf, count);
io_end();
Where as ioscan provides following output for the same device which I was using
$ioscan -m dsf
Persistent DSF Legacy DSF(s)
========================================
/dev/rdisk/disk4 /dev/rdsk/c0t0d0
Can anyone tell me how this libIO stuff actually works? :smileymad:
Solved! Go to Solution.
- Tags:
- libIO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2011 09:14 PM
07-21-2011 09:14 PM
Re: not getting legacy device name for agile device(using libIO/io_new_to_legacy_dsfs)
has anyone tried using libIO ever before on HPUX 11.31?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2011 02:48 AM
07-22-2011 02:48 AM
SolutionWell yes libIO is used - in fact the LVM subsystem uses it, and it looks like ioscan uses a statically linked copy of libIO as well - in fact it probably uses the exact call you are using:
#nm /usr/sbin/ioscan |grep io_new_to_legacy_dsfs [153] | 67696000| 2192|FUNC |LOCAL|0| .text|io_new_to_legacy_dsfs
You don't actually tell us anywhere what you do get back from your code? I'm no C coder, but looking at the man page for io_new_to_legacy_dsfs() I'd note the following...
- There seems to be an indication that you should set legacy_dsf to MAXPATHLEN * 10 and count to 10 before making the call. Certainly in the only example I can find here count is at least initialized to a value, and I couldn't see that you did that anywhere. It would seem that legacy_dsf has to be of size MAXPATHLEN * count to get back anything that will fit in the buffer.
- You don't seem to do any error checking off the call to io_new_to_legacy_dsfs() how do you know its not returning IO_ERROR - you should check the return code and follow up with a call to io_error() if appropriate.
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2011 12:12 AM
07-25-2011 12:12 AM
Re: not getting legacy device name for agile device(using libIO/io_new_to_legacy_dsfs)
Exactly..!! I also read the manual page and did the needful changes(setting the count and array size), and it worked fine for me.