Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> 關於 Linux

Linux 系統查看 HBA 卡 WWN 號的完整對照表(SuSE / RedHat 各版本)

編輯:關於 Linux

在伺服器透過光纖通道(FC)連接存儲陣列時,必須在存儲端配置主機的 WWN(World Wide Name)以啟用區劃與遮罩。不同 Linux 發行版與核心版本,WWN 的查看路徑各異。本文整理 SuSE 9/10/11、RedHat AS4/5/6/7 等主流版本的查看指令,供運維人員快速參考。

HBA 卡與 WWN 關係示意圖

查看指令對照表

作業系統版本查看指令輸出範例
SuSE Linux 9 cat /proc/scsi/qla2xxx/* | grep adapter-port scsi-qla0-adapter-port=21000018822c8a2c;
scsi-qla1-adapter-port=21000018822c8a2d;
SuSE Linux 10 cat /sys/class/fc_host/host*/port_name 0x210000e08b907955
0x210000e08b902856
RedHat Linux AS4 grep scsi /proc/scsi/qla2xxx/3 scsi-qla0-adapter-node=20000018822d7834;
scsi-qla0-adapter-port=21000018822d7834;
SuSE 11 / RedHat 5,6,7 cat /sys/class/fc_host/host*/port_name 0x10000090fa2a6b98
0x10000090fa2a6b99

關鍵提示

  • /sys/class/fc_host/host* 下的 host* 通常對應 host4、host5 等,具體編號視 HBA 卡槽位而定。
  • 生產環境為避免單點故障,通常配置多路徑,HBA 卡成對出現,WWN 亦會成對顯示(如上表最後兩行)。
  • 若使用 Emulex (lpfc) 驅動而非 QLogic (qla2xxx),請改查 /sys/class/fc_host/host*/port_name 或 /proc/scsi/lpfc/ 目錄。
  • 輸出值前綴 0x 為十六進位標記,配置存儲時通常只需冒號分隔的 16 位十六進位字串(如 10:00:00:90:fa:2a:6b:98)。

驗證步驟

  1. 執行對應指令取得 WWN。
  2. 於存儲管理介面建立主機群組並錄入 WWN。
  3. 配置區劃,將對應 LUN 映射給該主機群組。
  4. 伺服器端掃描裝置:rescan-scsi-bus.sh 或 echo "- - -" > /sys/class/scsi_host/hostX/scan。
  5. 確認 multipath -ll 顯示預期路徑。
Copyright © Windows教程網 All Rights Reserved