- Записки угрюмого поднимателя пингвинов.
- пятница, 20 ноября 2015 г.
- Как определить FC ID(WWN) диска(LUN) на Linux сервере
- How to find HBA cards/ports and WWN in Linux Redhat/Centos
- Method 1
- Method 2 : Using systool
- How to find WWN and WWPN of HBA card in Linux
- What is SAN?
- Purpose of wwn number
- Checking HBA card information
- Method-1: Checking wwn number manually
- Method-2: Checking wwn number using systool command
- How to install systool in Linux
- Conclusion
- Find WWN and WWPN in Linux
- Author : LazySystemAdmin
- Share this
- Related Posts
- 5 comments
- Labels
- Browse All Articles
- Popular Articles
- About LazySystemAdmin
- How To Find WWN in Linux Check HBA Connectivity Status
- How To Find WWN in Linux Check HBA Connectivity Status
- Method 2 – Find WWN in Linux
- Related Articles
Записки угрюмого поднимателя пингвинов.
*nix заметки на память
пятница, 20 ноября 2015 г.
Как определить FC ID(WWN) диска(LUN) на Linux сервере
Бывает трудно найти к какому SAN относится диск и как он подключен, если к серверу подключено более двух SAN одного типа. Получаем FC адрес на HBA.
# systool -c fc_host -v
Class = «fc_host»
Class Device = «host1»
Class Device path = «/sys/class/fc_host/host1»
fabric_name = «0x1000000533a43ae2»
issue_lip =
node_name = «0x5001438016793705»
port_id = «0x800100»
port_name = «0x5001438016793704»
port_state = «Online»
port_type = «NPort (fabric via point-to-point)»
speed = «8 Gbit»
supported_classes = «Class 3»
supported_speeds = «1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit»
symbolic_name = «QMH2562 FW:v5.06.03 DVR:v8.03.07.15.05.09-k»
system_hostname = «»
tgtid_bind_type = «wwpn (World Wide Port Name)»
uevent =
Device = «host1»
Device path = «/sys/devices/pci0000:00/0000:00:07.0/0000:06:00.0/host1»
edc =
fw_dump =
nvram = «ISP «
optrom_ctl =
optrom =
reset =
uevent =
vpd = «-8»
Class Device = «host2»
Class Device path = «/sys/class/fc_host/host2»
Определяем FC и WWN.
# systool -c fc_transport -v
Class = «fc_transport»
Class Device = «0:0»
Class Device path = «/sys/class/fc_transport/target1:0:0»
node_name = «0x500000e0d4465600»
port_id = «0x431900»
port_name = «0x500000e0d4465680»
uevent =
Device = «target1:0:0»
Device path = «/sys/devices/pci0000:00/0000:00:07.0/0000:06:00.0/host1/rport-1:0-0/target1:0:0»
uevent =
Class Device = «0:0»
Class Device path = «/sys/class/fc_transport/target2:0:0»
node_name = «0x500000e0d4465600»
port_id = «0x441900»
port_name = «0x500000e0d4465681»
uevent =
Device = «target2:0:0»
Device path = «/sys/devices/pci0000:00/0000:00:07.0/0000:06:00.1/host2/rport-2:0-0/target2:0:0»
uevent =
Class Device = «0:10»
Class Device path = «/sys/class/fc_transport/target1:0:10»
node_name = «0x500110a0005ad776»
port_id = «0x433400»
port_name = «0x500110a0005ad777»
uevent =
Device = «target1:0:10»
Device path = «/sys/devices/pci0000:00/0000:00:07.0/0000:06:00.0/host1/rport-1:0-10/target1:0:10»
uevent =
Class Device = «0:10»
Class Device path = «/sys/class/fc_transport/target2:0:10»
node_name = «0x500110a0005ad86f»
port_id = «0x3e4200»
port_name = «0x500110a0005ad870»
uevent =
Device = «target2:0:10»
Device path = «/sys/devices/pci0000:00/0000:00:07.0/0000:06:00.1/host2/rport-2:0-10/target2:0:10»
uevent =
WWN(port_name) и WWNN(node_name) получены. Определяем соответствие между SCSI HBTL адресами и дисками. В RHEL/CentOS/Fedora нужен пакет sg3_utils.
# sg_map -x
Device /dev/nst18 is busy
/dev/sg0 1 0 0 0 0 /dev/sda
/dev/sg1 1 0 0 1 0 /dev/sdb
/dev/sg2 1 0 0 2 0 /dev/sdc
/dev/sg3 1 0 0 3 0 /dev/sdd
/dev/sg4 1 0 1 0 0 /dev/sde
/dev/sg5 1 0 1 1 0 /dev/sdf
/dev/sg6 1 0 1 2 0 /dev/sdg
/dev/sg7 1 0 1 3 0 /dev/sdh
/dev/sg8 1 0 2 0 8
/dev/sg9 1 0 3 0 1 /dev/nst0
/dev/sg10 1 0 4 0 1 /dev/nst1
/dev/sg11 1 0 5 0 1 /dev/nst2
/dev/sg12 1 0 6 0 1 /dev/nst3
/dev/sg13 1 0 7 0 1 /dev/nst4
/dev/sg14 1 0 8 0 1 /dev/nst5
/dev/sg15 1 0 9 0 1 /dev/nst6
/dev/sg16 1 0 10 0 1 /dev/nst7
/dev/sg17 1 0 11 0 1 /dev/nst8
/dev/sg18 1 0 12 0 1 /dev/nst9
/dev/sg19 1 0 13 0 1 /dev/nst10
/dev/sg20 1 0 14 0 1 /dev/nst11
/dev/sg21 2 0 0 0 0 /dev/sdi
/dev/sg22 2 0 0 1 0 /dev/sdj
/dev/sg23 2 0 0 2 0 /dev/sdk
/dev/sg24 2 0 0 3 0 /dev/sdl
/dev/sg25 2 0 1 0 0 /dev/sdm
/dev/sg26 2 0 1 1 0 /dev/sdn
/dev/sg27 2 0 1 2 0 /dev/sdo
Источник
How to find HBA cards/ports and WWN in Linux Redhat/Centos
Maybe you are new in a professional environment where you have to become familiar with new terms like HBA cards and storage via Fiber or others
A host bus adapter (HBA) is a circuit board and/or integrated circuit adapter that provides input/output (I/O) processing and physical connectivity between a host system, or server, and a storage and/or network device
How to find HBA cards/ports and WWN in Linux Redhat/Centos ?
Method 1
To find the HBA cards installed on your system use :
To check the available HBA ports :
To find the state of HBA ports (online/offline) :
To find the WWN numbers of the above ports :
Method 2 : Using systool
Another useful command to find the information about HBAs is systool. If not already installed please do it with the following command.
To check the available HBA ports :
To find the WWNs for the HBA ports :
To check the state of the HBA ports (online/offline) :
Источник
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.
If you have any questions or feedback, feel free to comment below.
Источник
Find WWN and WWPN in Linux
07:0a.0 Fibre Channel: Emulex Corporation Helios LightPulse Fibre Channel Host Adapter (rev 01)
08:0b.0 Fibre Channel: Emulex Corporation Helios LightPulse Fibre Channel Host Adapter (rev 01)
mytestsrv1# cat /sys/class/fc_host/host0/node_name
0x20000000c9538d83
mytestsrv1# cat /sys/class/fc_host/host1/node_name
0x20000000c9538dac
mytestsrv1# cat /sys/class/fc_host/host0/port_name 0x10000000c9538d83 mytestsrv1# cat /sys/class/fc_host/host1/port_name 0x10000000c9538dac
Author : LazySystemAdmin
Share this
Related Posts
5 comments
thank you very much ,very useful for storage admin begineers
i send my wwnn to san people then they will give me a lun number so now in linux wer i want update this lun number.. give me answer pls..
after SAN team provide the LUNS, you need scan the SCSI bus to make them visible on OS side. Follow this link..
Wish you Happy New Year 2014,Thank you very much. cheers.
Thanks a lot for sharing your knowledge. It was very useful and easy to understand. Regards 😀
What do you think about this Article? Add your Opinion. Emoticon Emoticon
Labels
Browse All Articles
- ►2018 (3)
- ►December (1)
- ►May (1)
- ►January (1)
- ►2017 (2)
- ►November (1)
- ►February (1)
- ►2014 (2)
- ►November (1)
- ►February (1)
- ►2013 (3)
- ►August (1)
- ►January (2)
- ►2012 (14)
- ►September (1)
- ►August (6)
- ►June (1)
- ►May (1)
- ►April (1)
- ►February (2)
- ►January (2)
- ▼2011 (98)
- ►December (1)
- ►November (2)
- ►September (6)
- ▼July (17)
- Display Hidden Folders Enable or Disable the Option
- Video Tutorials: Basic Hardware & Windows in Tamil.
- Linux Video Tutorials in Tamil
- Linux OS Image Backup & Restore Guide (Using PING .
- Find WWN and WWPN in Linux
- Upgrade iLO firmware from Linux shell
- Video Tutorial: Understand Oracle RAC
- Interview Questions and Answers — Linux Administra.
- Features Comparison: Ext3 vs Ext4
- Managing Emulex HBA with hbacmd
- Getting Information about Hard disk : Linux HOWTO
- See other users SSH sessions in Linux
- Limit SSH Access for Users
- Understanding TOP command ouput in Linux
- Extend SAN disk under Linux LVM
- Troubeshooting Linux Server Performance issues
- Clean reboot of hung Linux server : Quick HOWTO
- ►June (3)
- ►May (14)
- ►April (12)
- ►March (15)
- ►February (21)
- ►January (7)
- ►2010 (165)
- ►December (5)
- ►October (13)
- ►September (12)
- ►August (13)
- ►July (15)
- ►June (26)
- ►May (21)
- ►April (25)
- ►March (19)
- ►February (2)
- ►January (14)
- ►2009 (45)
- ►December (23)
- ►November (18)
- ►September (1)
- ►August (3)
- ►2008 (1)
- ►November (1)
Popular Articles
About LazySystemAdmin
LazySystemAdmin is a site with 300+ Articles, how-to guides and video tutorials on all things related to System Administration and Technology. This Blog is to share our knowledge and expertise on System Administration and Operating Systems. Stay connected with LazySystemAdmin.
Источник
How To Find WWN in Linux Check HBA Connectivity Status
by ARK · May 7, 2018
Find WWN in Linux is easy using existing commands and installing few systools will help us in getting the FC HBA adapter WWN in Linux. There are several ways to find out FC HBA WWN in Linux/Unix operating systems.
How To Find WWN in Linux Check HBA Connectivity Status
We can use lspci command to find the FC HBA adapter details first. lspci is a utility for displaying information about PCI buses in the system and devices connected to them.
Method 1
above command will give us an whether Host Bus Adapter is installed in our Linux machine or not. If HBA is installed then we can see it’s details as shown above.
check how many hosts (Ports/Cards) are there in your Linux machine using below command
Using below command find if FC HBA is Online or Offline Or Link Status. If link status is down also we can get WWN in Linux. Below while loop script will list all of your HBA card details.
Find all the card information using below command
Method 2 – Find WWN in Linux
Another way of finding WWN in Linux is using systool utility this is an extra package you have to install in your Linux server using below command
After successful installation run below command to get all the details about FC HBA
All above details are not required for us just grep the required details using grep command
Highlighted in orange color is the WWN of FC HBA card host3
That’s it about finding the WWN in Linux using command line utilities
Related Articles
Thanks for your wonderful Support and Encouragement
Источник