General
cancel
Showing results for 
Search instead for 
Did you mean: 

discriminate between legacy and agile

Alice_11
Occasional Visitor

discriminate between legacy and agile

Hello,

I need a way to understand if the disk returned by the pstat_getdisk API follows the agile or legacy naming convention. Is there a way to do this? For instance, if the major number for agile disks is always the same, I could use it to discriminate.

Thank you.
1 REPLY
vinayks
Occasional Visitor

Re: discriminate between legacy and agile

Hi Alice,

One way of doing that would be using the "libIO" library APIs provided by default on the sytem:

For each hw path that you get from pstat_getdisk():

call io_str_to_hw_path() to get the hw_path_t representation --> then call io_hw_path_to_node() to get the token corresponding to the hw_path_t --> then call io_is_legacy_token() which would return "IO_TOKEN_NEW" / "IO_TOKEN_LEGACY" based on the type of the device

Just do a "man libio" on the system to get the specifics of each call.

Regards,
Vinay