The operation method to check the WWN number of the HBA card is as follows:
[root@361way ~]# cat /sys/class/fc_host/host*/port_name
0x10000090fa4849fe
0x10000090fa4849ff
You can also refer to the article to view the wwn number under linux.
After the WWN number is changed, the system cannot directly update the mounted backend storage disk. If you need to scan the disk again, you can use the following methods to scan the disk:
# cd /sys/class/scsi_host/host4/
# echo '- - - ' > scan
or
echo "1" > /sys/class/fc_host/host/issue_lip //Some storages or systems do not have scan files, which can be identified by the issue_lip file
Note:
You can run fdisk -l before scanning and compare the results of fdisk -l after scanning. If the replacement is successful, you will find that the latter can see more results than the former. Therefore, before such operations, it is best to make a backup of disk-related information such as df, fdisk, mount, fstab, etc. After scanning, it is safest to compare it with the original data.
It doesn't matter if you can't remember the above scan command, you can achieve the same effect by restarting the host.
Before and after scanning the disk, you can check the storage mount information by viewing /proc/scsi/scsi
[root@361way ~]# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: hp Model: DVD D DS8D3SH Rev: HHE8
Type: CD-ROM ANSI SCSI revision: 05
Host: scsi3 Channel: 03 Id: 00 Lun: 00
Vendor: HP Model: P410i Rev: 6.62
Type: RAID ANSI SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: LOGICAL VOLUME Rev: 6.62
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 01
Vendor: HP Model: LOGICAL VOLUME Rev: 6.62
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi3 Channel: 00 Id: 00 Lun: 02
Vendor: HP Model: LOGICAL VOLUME Rev: 6.62
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: EMC Model: SYMMETRIX Rev: 5874
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 01
Vendor: EMC Model: SYMMETRIX Rev: 5874
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi4 Channel: 00 Id: 00 Lun: 02
Vendor: EMC Model: SYMMETRIX Rev: 5874
In addition, there is a separate lsscsi command under SuSE to view detailed information, as follows:
# lsscsi
[0:0:0:0] disk SEAGATE ST300MM0006 B001 -
[0:0:1:0] disk SEAGATE ST9300605SS B002 -
[0:1:0:0] disk LSILOGIC Logical Volume 3000 /dev/sda
[5:0:0:0] disk HUAWEI S2300E 1 -
[5:0:0:1] disk HUAWEI S2300E 1 -
[5:0:0:2] disk HUAWEI S2300E 1 -
[5:0:1:0] disk HUAWEI S6900-M100 2102 -
[5:0:2:0] disk HUAWEI S2300E 1 -
[6:0:0:0] disk HUAWEI S2300E 1 -
[6:0:0:1] disk HUAWEI S2300E 1 -
[6:0:0:2] disk HUAWEI S2300E 1 -
[6:0:1:0] disk HUAWEI S2300E 1 -
[6:0:2:0] disk HUAWEI S6900-M100 2102 -
[7:0:0:0] disk up updisk 1 /dev/sdb
[7:0:0:1] disk up updisk 1 /dev/sdc
[7:0:0:2] disk up updisk 1 /dev/sdd