Community

Subscribe
Highlighted
Accepted Solution

How to get NAA for lun or volume

[ Edited ]

Hi,

 

I am looking for ways to get NAA identifier for NetApp volumes and luns using DFM Server API. Does DFM's API provide such functionality?

 

Thanks in advance for any help.

rle Former NetApp Employee

Re: How to get NAA for lun or volume

Hi Hasmik,

Are you looking for the LUN WWID or WWN?  If so, it is: made of 0x60a9800 + the hexadecimal equivalent of the LUN status.  The LUN status is returned from lun-list-info API.

Volume and LUNs have UUIDs but are available from ONTAP APIs.

Regards,

   - Rick -

Re: How to get NAA for lun or volume

Hi Rick,

what do you mean by "LUN status"?

Looking in the Ontap SDK documentation for the lun-list-info API call, I can see several fields that might apply: "device-id", which is a 32bit integer value (and optional, it didn't show up in my tests), "serial-number", which is a string, and "uuid", which is also a string.

Thanks in advance for clarifying.

Regards,

Oliver

Re: How to get NAA for lun or volume

OK, so I found the answer myself: it's the serial-number field.

rle Former NetApp Employee

Re: How to get NAA for lun or volume

Glad you found it.

   - Rick -

Re: How to get NAA for lun or volume

Hi Rick,

Actually I am looking for ways to find mapping between VMFS datastore and NetApp lun(or volume). I am not sure that getting WWN or WWID of a lun can help me with finding it's corresponding datastore.

The information I have about the datastore is its name and naa.

I would appreciate if anyone could help me with that.

Thanks,

Hasmik

Re: How to get NAA for lun or volume

Arguably the easiest way to map from a LUN to the corresponding datastore is to use the VSC. That's manual though, no programming involved.

If you need a program or a script to do the mapping, Rick's answer already was correct:

A LUN's 'naa.' number IS its WWN, it's just another name.

To get the WWN, you use the serial-number of the LUN, convert it to its hexadecimal ASCII representation* and prefix it with "naa.60a98000". You can get the LUN serial-number using the 'lun-list-info' API call (to a filer, not to the DFM).

Hope that clears it up.

* So, a '1' is 0x31, an 'a' is 0x61 etc.

Re: How to get NAA for lun or volume

Please mark it answered if you got this resolved.

Thanks

Ravi

Re: How to get NAA for lun or volume

Thank you very much guys, now it's clear for me what I am going to do

Thanks a lot!!!

Re: How to get NAA for lun or volume

But look, I can get serial-number of the lun using ONTAPI, but I am using DFM API.

Using DFM API lun-list info retrurns two statuses - object-status, object-perf-status, but possible values for them are 'unknown', 'normal', 'information', etc...

So what to do with DFM API?

Regards,

Hasmik