NetApp LUN serial to WWID converter

Linux use disk (LUN) WWID in it's multipath configuration. Even when single path configuration used, WWID becomes usefull to distinguish one LUN from similar.

You can see these WWID in /dev/disk/by-id directory:

~ # cd /dev/disk/by-id/
/dev/disk/by-id # ll
total 0
lrwxrwxrwx 1 root root 10 Jul 21 20:41 scsi-360a98000646564494b346f6e75757367 -> ../../sdet
lrwxrwxrwx 1 root root 10 Jul 21 20:41 scsi-360a98000646564494b346f6e75757369 -> ../../sdew
lrwxrwxrwx 1 root root 10 Jul 21 20:41 scsi-360a98000646564494b346f6e7575736a -> ../../sder
lrwxrwxrwx 1 root root 10 Jul 21 20:41 scsi-360a98000646564494b346f6e7575736b -> ../../sdev

Getting WWID from EMC

I've already wrote this in my "Linux multipath Boot from SAN (RedHat 5)" article, but nothing worth to repeat:

# symdev -sid XXX show 3377 | grep WWN
    Device WWN               : 60000970000292601446533033333737

Linux will see same number with 3 prepends (not sure, what this mean).

NetApp and LUN serial

netapp> lun show -v /vol/myvolume/l4
        /vol/myvolume/l4     30g (32212254720)   (r/w, online, mapped)
                Serial#: dedIK4onuuso

NetApp use string annotation for this WWID, that make conversion more complicated. The resulting WWID for this "Serial#" will be 360a98000646564494b346f6e7575736f . It looks like "360a98000" prefix belongs to NetApp company; this part is fixed part of WWID and not included into this "Serial#" string. Then the string just printed in hexadecimal form.

Note: C-Dot ONTAP has another prefix "3600a0980". According to this KB there is also E-Seriesdeviation. Still not saw this product, however, calculator was updated.

This JavaScript (yes, enable it) calculator will make a job:

LUN migrations

Once LUN created, NetApp filer generates new serial string for it. I am not sure what happens with LUN serial when snapmirror established, but new serial will be generated during snapmirror break.

Differ from EMC, NetApp allow you to set any serial (string) you want. It should be unique on filer (I think so). This make migration much easy. You have to put LUN offline before setting new serial. Then, the migration procedure looks like follow:

  1. Initialize snapmirror to other filer
  2. Shut down server
  3. Quiesce, break snapmirror
  4. Put LUN offline and fix serial exactly as it was on source filer, put LUN online
  5. Fix zones, initiator groups and map LUN to it
  6. Start server

Read for Linux with Netapp LUNs best practice at HOWTO LUNs on Linux using native tools article.

If this was helpfull, please donate
Updated on Thu Aug 29 08:23:33 UTC 2013 by Oleg Volkov Home