Q-Logic 5800 / 5802 — поиск порта по WWN

Поскольку редко пользуюсь, постоянно забываю как это делается.
Собственно у нас есть некое устройство, мы хотим найти порт, в который физически подключено оно, но не хотим лазить по ЦОДу и отслеживать оптику глазками, а маркировке мы не доверяем.
Первое — нужно узнать WWN устройства, например на HUAWEI S2200T:

admin:/> showfcmode 
============================================================================================================
                                           FC Port Topology Mode
------------------------------------------------------------------------------------------------------------
  Controller ID    Interface Module ID    Port ID    WWN                 Current Mode      Configured Mode  
------------------------------------------------------------------------------------------------------------
  A                0                      P0         2000d4b110ae8525    Loop              AUTO             
  A                0                      P1         2001d4b110ae8525    Point to Point    AUTO             
  A                0                      P2         2002d4b110ae8525    Point to Point    AUTO             
  A                0                      P3         2003d4b110ae8525    Loop              AUTO             
  B                0                      P0         2010d4b110ae8525    Loop              AUTO             
  B                0                      P1         2011d4b110ae8525    Point to Point    AUTO             
  B                0                      P2         2012d4b110ae8525    Point to Point    AUTO             
  B                0                      P3         2013d4b110ae8525    Loop              AUTO             
============================================================================================================

или HUAWEI 5300 V3:

admin:/>show port general physical_type=FC

  ID              Health Status  Running Status  Type       Working Rate(Mbps)  WWN               Role         Working Mode  Configured Mode  Enabled  
  --------------  -------------  --------------  ---------  ------------------  ----------------  -----------  ------------  ---------------  -------  
  CTE0.A.IOM0.P0  Normal         Link Up         Host Port  8000                2000f098388a53d6  INI and TGT  Fabric        Auto-Adapt       Yes      
  CTE0.A.IOM0.P1  Normal         Link Down       Host Port  --                  2001f098388a53d6  INI and TGT  --            Auto-Adapt       Yes      
  CTE0.A.IOM0.P2  Normal         Link Down       Host Port  --                  2002f098388a53d6  INI and TGT  --            Auto-Adapt       Yes      
  CTE0.A.IOM0.P3  Normal         Link Down       Host Port  --                  2003f098388a53d6  INI and TGT  --            Auto-Adapt       Yes      
  CTE0.B.IOM0.P0  Normal         Link Up         Host Port  8000                2010f098388a53d6  INI and TGT  Fabric        Auto-Adapt       Yes      
  CTE0.B.IOM0.P1  Normal         Link Down       Host Port  --                  2011f098388a53d6  INI and TGT  --            Auto-Adapt       Yes      
  CTE0.B.IOM0.P2  Normal         Link Down       Host Port  --                  2012f098388a53d6  INI and TGT  --            Auto-Adapt       Yes      
  CTE0.B.IOM0.P3  Normal         Link Down       Host Port  --                  2013f098388a53d6  INI and TGT  --            Auto-Adapt       Yes      
admin:/>

Смотрим нужные нам WWN, заходим на qlogic, первый делом убеждаемся что порт вообще в этой фабрике:

SANbox-2 #> fcping 2001d4b110ae8525 count 5

  28 bytes from local switch to 20:01:d4:b1:10:ae:85:25  time = 2000 usec
  28 bytes from local switch to 20:01:d4:b1:10:ae:85:25  time = 2000 usec
  28 bytes from local switch to 20:01:d4:b1:10:ae:85:25  time = 2000 usec
  28 bytes from local switch to 20:01:d4:b1:10:ae:85:25  time = 2000 usec
  28 bytes from local switch to 20:01:d4:b1:10:ae:85:25  time = 1000 usec

SANbox-2 #> 

Теперь делаем «show ns all», копируем вывод в текстовый файлик и ищем наш WWM, запоминаем id порта и домена.

SANbox #>  show ns all 

  Seq Domain     Port   Port
  No  ID         ID     Type COS PortWWN                 NodeWWN
  --- ------     ------ ---- --- -------                 -------
  1   1 (0x1)    010100 N    3   20:00:f0:98:38:8a:53:f3 21:00:f0:98:38:8a:53:f3
  2   1 (0x1)    010200 N    3   21:00:00:24:ff:89:ce:3b 20:00:00:24:ff:89:ce:3b
  3   1 (0x1)    010300 N    3   21:00:00:24:ff:89:cb:e4 20:00:00:24:ff:89:cb:e4
  4   1 (0x1)    010400 N    3   21:00:00:24:ff:77:56:82 20:00:00:24:ff:77:56:82
  5   1 (0x1)    010500 N    3   21:00:00:24:ff:77:55:a3 20:00:00:24:ff:77:55:a3
  6   1 (0x1)    010700 N    3   21:00:00:24:ff:4e:98:83 20:00:00:24:ff:4e:98:83
  7   1 (0x1)    010800 N    3   20:11:d4:b1:10:ae:85:25 21:00:d4:b1:10:ae:85:25
  8   1 (0x1)    010a00 N    3   20:00:f0:98:38:8a:53:d6 21:00:f0:98:38:8a:53:d6

  Seq Domain     Port   Port
  No  ID         ID     Type COS PortWWN                 NodeWWN
  --- ------     ------ ---- --- -------                 -------
  1   2 (0x2)    020100 N    3   20:10:f0:98:38:8a:53:f3 21:00:f0:98:38:8a:53:f3
  2   2 (0x2)    020200 N    3   21:00:00:24:ff:89:ce:3a 20:00:00:24:ff:89:ce:3a
  3   2 (0x2)    020300 N    3   21:00:00:24:ff:89:cb:e5 20:00:00:24:ff:89:cb:e5
  4   2 (0x2)    020400 N    3   21:00:00:24:ff:77:56:83 20:00:00:24:ff:77:56:83
  5   2 (0x2)    020500 N    3   21:00:00:24:ff:77:55:a2 20:00:00:24:ff:77:55:a2
  6   2 (0x2)    020600 N    3   21:00:00:24:ff:41:f6:dd 20:00:00:24:ff:41:f6:dd
  7   2 (0x2)    020700 N    3   21:00:00:24:ff:4e:98:82 20:00:00:24:ff:4e:98:82
  8   2 (0x2)    020800 N    3   20:01:d4:b1:10:ae:85:25 21:00:d4:b1:10:ae:85:25  <=== Вот оно. Восьмой порт во втором домене. 
  9   2 (0x2)    020a00 N    3   20:10:f0:98:38:8a:53:d6 21:00:f0:98:38:8a:53:d6

  Seq Domain     Port   Port
  No  ID         ID     Type COS PortWWN                 NodeWWN
  --- ------     ------ ---- --- -------                 -------
  1   98 (0x62)  620000 N    3   20:35:00:80:e5:2d:73:26 20:04:00:80:e5:2d:73:26
  2   98 (0x62)  620100 N    3   21:00:00:24:ff:5c:4d:f9 20:00:00:24:ff:5c:4d:f9
  3   98 (0x62)  620200 N    3   21:00:00:24:ff:4b:c8:14 20:00:00:24:ff:4b:c8:14
  4   98 (0x62)  620300 N    2,3 10:00:00:90:fa:3a:8d:26 20:00:00:90:fa:3a:8d:26
  5   98 (0x62)  620400 N    3   21:00:00:24:ff:5c:4e:60 20:00:00:24:ff:5c:4e:60
  6   98 (0x62)  620500 N    3   21:00:00:24:ff:5c:dc:56 20:00:00:24:ff:5c:dc:56
  7   98 (0x62)  620600 N    3   21:00:00:24:ff:54:84:da 20:00:00:24:ff:54:84:da
  8   98 (0x62)  620700 N    3   21:00:00:24:ff:35:4c:f0 20:00:00:24:ff:35:4c:f0
  9   98 (0x62)  620800 N    3   20:35:00:80:e5:3f:4d:ec 20:04:00:80:e5:3f:4d:ec
  10  98 (0x62)  620e00 N    3   21:00:00:24:ff:35:4c:f3 20:00:00:24:ff:35:4c:f3
  11  98 (0x62)  620f00 N    3   21:00:00:24:ff:2f:8d:bc 20:00:00:24:ff:2f:8d:bc
  12  98 (0x62)  621000 N    3   21:00:00:24:ff:35:4c:fc 20:00:00:24:ff:35:4c:fc
  13  98 (0x62)  621300 N    3   21:00:00:24:ff:07:8e:d1 20:00:00:24:ff:07:8e:d1

  Seq Domain     Port   Port
  No  ID         ID     Type COS PortWWN                 NodeWWN
  --- ------     ------ ---- --- -------                 -------
  1   99 (0x63)  630000 N    3   20:34:00:80:e5:2d:73:26 20:04:00:80:e5:2d:73:26
  2   99 (0x63)  630100 N    3   21:00:00:24:ff:5c:4d:f8 20:00:00:24:ff:5c:4d:f8
  3   99 (0x63)  630200 N    3   21:00:00:24:ff:4b:c8:15 20:00:00:24:ff:4b:c8:15
  4   99 (0x63)  630400 N    3   21:00:00:24:ff:5c:4e:61 20:00:00:24:ff:5c:4e:61
  5   99 (0x63)  630500 N    3   21:00:00:24:ff:5c:dc:57 20:00:00:24:ff:5c:dc:57
  6   99 (0x63)  630600 N    3   21:00:00:24:ff:54:84:db 20:00:00:24:ff:54:84:db
  7   99 (0x63)  630700 N    3   21:00:00:24:ff:35:4c:f1 20:00:00:24:ff:35:4c:f1
  8   99 (0x63)  630800 N    3   20:34:00:80:e5:3f:4d:ec 20:04:00:80:e5:3f:4d:ec
  9   99 (0x63)  630a00 N    3   21:00:00:24:ff:89:cc:c8 20:00:00:24:ff:89:cc:c8
  10  99 (0x63)  630c00 N    3   21:00:00:24:ff:41:f6:dc 20:00:00:24:ff:41:f6:dc
  11  99 (0x63)  630e00 N    3   21:00:00:24:ff:35:4c:f2 20:00:00:24:ff:35:4c:f2
  12  99 (0x63)  630f00 N    3   21:00:00:24:ff:2f:8d:bd 20:00:00:24:ff:2f:8d:bd
  13  99 (0x63)  631000 N    3   21:00:00:24:ff:35:4c:fd 20:00:00:24:ff:35:4c:fd
  14  99 (0x63)  631300 N    3   21:00:00:24:ff:35:59:69 20:00:00:24:ff:35:59:69

  Total: 44

SANbox #> 

А теперь «show fabric» и по Domain id определяем конкретную железку и конкретный порт:

SANbox #> show fabric  

  Domain           1  (0x01)
  WWN              10:00:00:c0:dd:18:e4:f9
  SymbolicName     SANbox
  HostName         d778
  EthIPv4Address   192.168.33.233
  EthIPv6Address   <undefined>

  Domain           2  (0x02) <=== Второй домен.
  WWN              10:00:00:c0:dd:13:42:f0
  SymbolicName     SANbox-2
  HostName         d777
  EthIPv4Address   192.168.33.232
  EthIPv6Address   <undefined>

  Domain           98 (0x62)
  WWN              10:00:00:c0:dd:24:64:6d
  SymbolicName     SANbox
  HostName         d384
  EthIPv4Address   192.168.33.29
  EthIPv6Address   fe80::2c0:ddff:fe24:646d

  Domain          *99 (0x63)
  WWN              10:00:00:c0:dd:24:64:5f
  SymbolicName     SANbox
  HostName         d393.colo.logol.ru
  EthIPv4Address   192.168.33.28
  EthIPv6Address   <undefined>

  * indicates principal switch

SANbox #> 

Для успокоения совести можно зайти на нужную железку и проверить:

SANbox-2 #> show topology 8

  Local Link Information
  ----------------------

  PortNumber 8
  PortID     020800
  PortWWN    20:08:00:c0:dd:13:42:f0
  PortType   F

  Remote Link Information
  -----------------------

  Device 0

    PortID      020800
    PortWWN     20:01:d4:b1:10:ae:85:25
    NodeWWN     21:00:d4:b1:10:ae:85:25
    PortType    N
    Description HUAWEI   S2200T           (Rev. 2105)
    IPAddress   <undefined>

SANbox-2 #> 

Все ок, WWN совпадает. Можно идти спокойно декометировать.

You can leave a response, or trackback from your own site.

Leave a Reply

Subscribe to RSS Feed