[[email protected] ~]# cat /sys/class/fc_host/host*/port_name
0x10000090fa4849fe
0x10000090fa4849ff
也可以参看linux下查看wwn号 篇。
更改完成WWN号后,系统无法直接更新挂载的后端存储盘。需要重新扫下盘,可以使用如下方法进行扫盘操作:
# cd /sys/class/scsi_host/host4/
# echo '- - - ' > scan
或
echo "1" > /sys/class/fc_host/host/issue_lip //某些存储或系统没有scan文件,可以通issue_lip文件识别
注:
可以在扫描之前先运行fdisk -l 与扫描之后fdisk -l 的结果进行比对。更换成功的话会发现后者查看到的结果比前者多。所以此类操作前,最好将df 、fdisk 、mount、fstab 等和磁盘相关的信息做个备份,扫描完成后,和原始数据做一个比对是最为保险的。
记不住上面的扫描指令也没关系 ,通过重启主机,可以达到同样的效果。
扫盘前后,可以通过查看/proc/scsi/scsi 确认存储挂载信息
[[email protected] ~]# 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
别外SuSE下有单独的lsscsi 命令可以查看详细的信息,如下:
# 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
原文:http://blog.51cto.com/sf1314/2108586