Как узнать wwn сервера

от admin

Как найти WORLD-WIDE NAME (WWN) HBA адаптера в Windows

Способов получения этой информации несколько, и они зависят от версии ОС. В Windows 2008 R2 есть замечательная оснастка Storage Explorer, которую, к сожалению, убрали в Windows 2012. Эта оснастка позволяет получить детальную информацию об установленных в системе HBA адаптерах, и просмотреть топологию SAN сети.

Второй способ универсальный и подойдёт для использования во всех версиях ОС Windows. Чтобы им воспользоваться необходимо установить утилиту управления от производителя HBA:

  • HBAnyware/OneCommand для Emulex
  • SANsurfer для Qlogic
  • HP System Management Console (HP SYM)
  • Dell Server Management Console

SAN Surfer

Не могу сказать о других утилитах, но SAN Surfer может просматривать информацию HBA адаптеров и с других серверов. Достаточно указать IP-адрес необходимого сервера при запуске программы.

Третий способ также подойдет для всех ОС. Необходимо скачать с сайта Microsoft утилиту fcinfo.exe.
C:\Windows\system32>fcinfo

В выводе мы получили название адаптера, его WWPN и тип устройства. Для более детальной информация, воспользуемся ключом /details:
C:\Windows\system32>fcinfo /details

Мы получили имя wwnn, wwpn, видим wwn порта на SAN-коммутаторе и другую информацию.

Предыдущими способами мы можем воспользоваться только на локальном сервере. Для получения wwn на удалённом компьютере, воспользуемся функцией Powershell. Правда, она покажет только информацию о wwnn, а не wwpn.

Записки ИТ специалиста.

# коннект к vCenter

Connect-VIServer -Server bs-vc

# получаем список ESX-серверов
$hosts = Get-VMhost

foreach ($host1 in $hosts) <
Write-Host «Server name — » $host1

$hbas = Get-View (Get-View (Get-VMHost -Name $host1).ID).ConfigManager.StorageSystem
foreach ($hba in $hbas.StorageDeviceInfo.HostBusAdapter) <
if ($hba.gettype().name -eq «HostFibreChannelHba») <
# получение информации
$wwn = «<0:x>» -f $hba.PortWorldWideName
Write-Host «WWN:» $wwn
#Write-Host $wwn
>
>
>

bs-vc — этом имя моего сервера VMware vSphere vCenter

При выполнении этого скрипта запрашиваются учетные данные для подключения к vCenter. Потом выводится список WWN после имени хоста.

How to find WWN and WWPN of HBA card in Linux

There are several ways to detect the WWN of a Fibre Channel (FC) HBA and their details in Linux/Unix operating systems.

In this article, we will explain you the two best ways to find wwn number in Linux.

What is SAN?

A Storage Area Network (SAN) is a dedicated, independent, high-speed network that provides block-level network access to storage.

A SAN typically consists of cabling, host bus adapters, and SAN switches connected to storage arrays and servers.

SCSI (Small Computer System Interface) is a protocol used to communicate between servers and storage devices.

Purpose of wwn number

To add storage to the host, server has to be mapped with storage device by zoning the WWN of both host and storage in Fabric switch.

Once the zone is created, the storage team can assign LUNs to a specific Linux host, and new LUN can be discovered by scanning the storage LUN ID at the host end.

Popular FC host bus adapters are QLogic, Emulex, Brocade, Cisco, etc.

Some of the important abbreviations are listed below:

  • WWN – World Wide Name
  • WWNN – World Wide Node Name
  • WWPN – World Wide Port Name
  • WWID – World Wide Identifier
  • OUI – Organizationally Unique Identifier

Checking HBA card information

You can easily identify how many HBA cards are installed in your Linux system by running ‘lspci’ command as shown below:

Method-1: Checking wwn number manually

HBA card wwn number can be manually identified by filtering the associated files under the “/sys” file system.

The files under sysfs provide information about devices, kernel modules, filesystems, and other kernel components, which are typically mounted automatically by the system at /sys.

To check the available HBA ports, use the below file:

The ‘fc_transport’ determines the correct host, channel, and target information from currently presented LUN:

You can verify a list of ‘wwn’ number of the fc host (HBA card) using the following file:

Use the following file to check a specific fc host wwn number:

To find the status of HBA ports, use the below file (online/offline):

Method-2: Checking wwn number using systool command

The systool is a tool that uses APIs provided by libsysfs to gather information. It allows you to view system device information by bus, class, and topology.

When you run systool without parameters, it will present all available bus types, device classes, and root devices.

How to install systool in Linux

systool can be easily installed from the distribution official repository.

For RHEL/CentOS 6/7 systems, use the yum command to install systool:

For RHEL/CentOS 8 and Fedora systems, use the dnf command to install systool:

Once the sysfsutils package is installed on the Linux system, run the following command to find the WWN number of fc host:

Run the following command to check the state of HBA ports:

If you want to check wwn number of a specific fc host , run the following command:

Conclusion

In this guide, we have shown you 2 simple methods to find WWN, WWPN of HBA card and the status of HBA ports in Linux.

Читать:
Как вставить текст в формулу excel

Похожие статьи