相关文章推荐
本文為採用 Dell EqualLogic PS6210XS 儲存設備,並搭配 IBM x3550 M4 主機安裝 CentOS 6.5 (x64),將測試 MPIO 及 LUN Hot-Extend 等功能。

首先,了解一下 EqualLogic 相關術語的大致功能:
  • RAID6 Accelerate: 此為 Dell EqualLogic PS6210XS 儲存設備才能建立的 RAID Type,因為此機型才具備 SSD/SAS 混合硬碟的情境。
  • Group Name: 許多台 EqualLogic 儲存設備便能組成一個 Group,你可以定義 Group 名稱來區別。舉例來說,台北有多台 EqualLogic 儲存設備組成 Group,而高雄有多台 EqualLogic 儲存設備組成 Group,那麼屆時在進行 Replication 時便可以透過「Group Name」來達到識別的效果。
  • Group Management IP: 同樣的,多台 EqualLogic 儲存設備便能組成一個 Group 時,那麼便可以採用「Group Management IP」來達到 Portal 的效果,以達成統一集中管理的目的。
  • Group IP: 簡單來說,它就是 iSCSI Target 的 IP 位址。屆時,擔任 CentOS 主機 (擔任 iSCSI Initiator) 需要掛載 EqualLogic 儲存設備的儲存資源時,便是採用此 IP 位址進行存取。
  • Group Join Password: 當有 EqualLogic 儲存設備希望加入 Group 時,便需要此識別密碼來進行管控。
  • Member Name: 識別「每一台」EqualLogic 儲存設備之用。
  • Member Management IP: 「每一台」EqualLogic 儲存設備的管理用途 IP 位址。
  • 那麼此次實作環境當中,Dell EqualLogic PS6210XS 儲存設備與 10GbE Switch 的接法如下圖示,與一般傳統的 MPIO 接法有些許不同。
    首先,傳統的 MPIO 接法二台 10GbE Switch 並不會使用 LACP 的方式串連起來,第二個不同的是 PS6210XS 儲存設備第二片控制器的接法,正常的情況來講左邊的網路 Port (Ethernet0),應該會接左下角的 Switch0,但 Dell 的官方建議接法反而是接到右下角的 Switch 1 當中,最後不同的是傳統 MPIO 會該不同的網路卡給予不同的網段,但 Dell 的官方建議做法是「同一個網段」。
    圖片來源:
    Dell EqualLogic PS6210 Storage Arrays Installation and Setup Guide
  • Dell EqualLogic PS6210XS (SAS 400GB SSD *7、600GB 10K SAS *17)
  • HP ProLiant DL360 G9 (CentOS 6.5 x64)
  • Dell N4032F 10GbE Switch
  • IBM x3650 M4 (Intel Corporation Ethernet 10G 2P X520 Adapter)
  • 上述術語中,PS6210XS 儲存設備相關項目的設定值如下:
  • RAID Type: RAID-6 Accelerate
  • Group Name: LabGroup
  • Group Management IP: 10.10.10.150/24
  • Group IP: 10.10.99.10/24
  • Group Join Password: weithenn168
  • Controller Ethernet0 (eth0): 10.10.99.11/24
  • Controller Ethernet0 (eth1): 10.10.99.12/24
  • Member Name: member1
  • Member Management IP: 10.10.10.15/24
  • 下列指令為,先顯示 Dell EqualLogic PS6210XS 儲存設備的網路介面資訊,接著指定管理介面( eth2 )的 IP 位址,然後「 啟用(up) 」管理介面後,再次查看是否已經啟用完成。此時,PC/NB 主機若與 PS6210XS 儲存設備的管理介面同一個網段,應該已經可以 ping 到管理介面了。 LabGroup> member select member1 show eths
    Name ifType          ifSpeed    Mtu  Ipaddress                     Status Errors DCB
    ---- --------------- ---------- ---- ----------------------------- ------ ------ ------
    eth0 ethernet-csmacd 10 Gbps    9000 10.10.99.11                   up     0
    eth1 ethernet-csmacd 10 Mbps    1500                               down   0
    eth2 ethernet-csmacd 10 Mbps    1500                               down   0
    LabGroup> member select member1 eth select 2 ipaddress 10.10.10.15 netmask 255.255.255.0
    LabGroup> member select member1 eth select 2 up
    This port is for group management only. Make sure it is connected to a dedicated
    management network.
    Do you want to enable the management interface? (y/n) [n] y
    請注意 !! PS6210XS 儲存設備的管理介面,必須要跟 Ethernet0/1 網路介面的 IP 位址「 不同網段 」,否則會發生無法設定管理介面 IP 位址的情況。
    LabGroup> member select member1 eth select 2 ipaddress 10.10.99.15 netmask 255.255.255.0
    % Error - Management interface must not be on SAN subnet.

    順利為 PS6210XS 儲存設備設定好管理介面 IP 位址之後,便可以開啟瀏覽器輸入 IP 位址及登入的管理者帳號及密碼之後,便可以登入管理網頁。 鍵入「 lspci 」指令,可以看到系統是能辨識到 1Gbps 及 10Gbps 網卡的,但 10Gbps 網卡卻無法順利運作。 # lspci | grep -e I350 -e X520
    06:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
    06:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
    06:00.2 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
    06:00.3 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
    0c:00.0 Ethernet controller: Intel Corporation Ethernet 10G 2P X520 Adapter (rev 01)
    0c:00.1 Ethernet controller: Intel Corporation Ethernet 10G 2P X520 Adapter (rev 01)
    將驅動程式 ( Intel_LAN_16.0.0_Linux_Binary_RPMs_A00.tar.gz ) 上傳至 CentOS 主機後,安裝 Intel X520 10GbE 網卡驅動程式後,重新啟動主機。 # tar zxvf Intel_LAN_16.0.0_Linux_Binary_RPMs_A00.tar.gz
    # cd Intel_LAN_16.0.0_Linux_Binary_RPMs_A00
    # cd RHEL6.5_KMOD
    # rpm -ivh kmod-ixgbe-3.21.2-1.x86_64.rpm
    Preparing...                ########################################### [100%]
    1:kmod-ixgbe             ########################################### [100%]
    # reboot
    安裝驅動程式並重新開機後,會發現鍵入 ifconfig 指令後,系統仍然無法顯示 eth4、eth5 網路介面,查看 system message 之後會發現錯誤訊息,其中有一段關鍵文字「 failed to load because an unsupported SFP+ or QSFP module type was detected. 」。 # dmesg |grep ixgbe
    ixgbe 0000:0c:00.0: PCI INT A -> GSI 26 (level, low) -> IRQ 26
    ixgbe 0000:0c:00.0: setting latency timer to 64
    ixgbe: 0000:0c:00.0: ixgbe_check_options: FCoE Offload feature enabled
    ixgbe 0000:0c:00.0: failed to load because an unsupported SFP+ or QSFP module type was detected.
    ixgbe 0000:0c:00.0: Reload the driver after installing a supported module.
    ixgbe 0000:0c:00.0: PCI INT A disabled
    此問題的解法,只要在「 /etc/modprobe.d/ixgbe.conf 」設定檔當中,加入參數「 options ixgbe allow_unsupported_sfp=1,1 」後再重新開機即可解決。 # cat /etc/modprobe.d/ixgbe.conf
    options ixgbe allow_unsupported_sfp=1,1
    # reboot
    重開機後 CentOS 便能順利使用 eth4、eth5 網路介面。 # ethtool eth4
    Settings for eth4:
    Supported ports: [ FIBRE ]
    Supported link modes: 10000baseT/Full
    Supported pause frame use: No
    Supports auto-negotiation: No
    Advertised link modes:  10000baseT/Full
    Advertised pause frame use: No
    Advertised auto-negotiation: No
    Speed: Unknown!
    Duplex: Unknown! (255)
    Port: FIBRE
    PHYAD: 0
    Transceiver: external
    Auto-negotiation: off
    Supports Wake-on: d
    Wake-on: d
    Current message level: 0x00000007 (7)
    drv probe link
    Link detected: no
    接著,請設定 eth4、eth5 網路介面,採用此次實作環境中所規劃的 IP 位址「 10.10.99.65、10.10.99.66 」。 # cat /etc/sysconfig/network-scripts/ifcfg-eth{4,5}
    DEVICE=eth4
    BOOTPROTO=static
    TYPE=Ethernet
    ONBOOT=yes
    IPADDR=10.10.99.65
    NETMASK=255.255.255.0
    NETWORK=10.10.99.0
    DEVICE=eth5
    BOOTPROTO=static
    TYPE=Ethernet
    ONBOOT=yes
    IPADDR=10.10.99.66
    NETMASK=255.255.255.0
    NETWORK=10.10.99.0
    步驟 2. 安裝 Dell HIT for Linux 套件 簡單來說, Dell HIT(Host Integration Tools) 便是針對 MPIO 設定的部份,能夠與 Dell EqualLogic PS6210XS 儲存設備的 MPIO 在傳輸上達到最佳化,那麼 Dell HIT for Linux 套件具備的特色功能如下:
  • EqualLogic iSCSI Multipathing: 自動管理 iSCSI Session 同時增強 I/O (有效減少 intra-group I/O forwarding)。
  • EqualLogic Configuration Utility: 使用 eqlconfig 來協助你設定 MPIO。
  • EqualLogic Host Performance and Configuration Tuning Suite: 使用 eqltune 來幫助你調校 Linux 效能 Verifies that an optimal set of tuning parameters are set for the Linux system to enhance performance and usability。
  • Auto-Snapshot Manager/Linux Edition (ASM/LE): 讓屆時 EqualLogic 的快照功能,能夠支援 Linux,進行 Point-in-time Copies of EqualLogic Volumes。
  • Remote Setup Wizard Command Line Interface: 使用 rswcli 來幫助你用指令設定 MPIO。
  • EqualLogic Log Gathering Facility: 使用 eqllog 收集 System Logs。
  • EqualLogic Volume Rethinning Facility: 使用 eqlvolume 管理 Thin-Provisioned Volumes。
  • Red Hat Enterprise Linux (RHEL): 5.9, 5.10, 6.4, and 6.5 (x86/x64)
  • SUSE Linux Enterprise Server (SLES): 11 SP2 and SP3  (x86/x64)
  • Oracle Linux with Unbreakable Enterprise Kernel release 5.10 (UEK2) and 6.5 (UEK2 and UEK3 x86_64 only)
  • Support for PS Series version 7.0 firmware
  • 圖片來源: EqualLogic Integration: Installation and Configuration of Host Integration Tools for Linux 此外,Dell EqualLogic HIT/Linux MPIO 套件包含二個運作元件:
  • ehcmd (EqualLogic Host Connection Manager daemon): 監控 iSCSI Session,並協助設定 PS Group,會在背景運作。它是採用 Open-iSCSI 管理工具(iscsiadm) 來進行 新增、修改、刪除、最佳化 iSCSI Session 作業。
  • dm-switch (Kernel Module): 整合 Device Mapper Target to Multipath Devices,負責 Route I/O 最佳化的部份。
  • 將 Dell HIT for Linux 安裝套件映像檔 (equallogic-host-tools-1.3.0-2.iso),上傳至 CentOS 主機後便可以進行安裝作業。 # mkdir -p /media/iso
    # mount -o loop equallogic-host-tools-1.3.0-2.iso /media/iso
    # df -h
    Filesystem                               Size  Used Avail Use% Mounted on
    /dev/sda3                                 50G  524M   47G   2% /
    tmpfs                                    142G   72K  142G   1% /dev/shm
    /dev/sda1                               1022M  264K 1022M   1% /boot/efi
    /dev/sda6                                250G  188M  237G   1% /home
    /dev/sda2                                 99G  2.3G   92G   3% /usr
    /dev/sda4                                 50G  405M   47G   1% /var
    /root/equallogic-host-tools-1.3.0-2.iso   43M   43M     0 100% /media/iso
    # /media/iso/install --nogpgcheck
    Dell EqualLogic install script version 1.3.0 Build 388434
    =============================================================
    Beginning install of Dell EqualLogic Host Integration Tools
    =============================================================
    Detected compatible pre-compiled kernel module packages:
    /media/iso/packages/el6/x86_64/kmod-dell-dm-switch-1.3.0-0.x86_64.rpm
    Displaying the End User License Agreement..
    DELL END USER LICENSE AGREEMENT Ver. 1.3 TYPE-A SOFTWARE
    THIS IS A LEGAL AGREEMENT BETWEEN YOU (EITHER AN INDIVIDUAL OR AN ENTITY) AND
    DELL PRODUCTS L.P. OR DELL GLOBAL B.V. (SINGAPORE BRANCH), ON BEHALF OF DELL
    INC. AND ITS WORLDWIDE SUBSIDIARIES AND AFFILIATES (COLLECTIVELY, "Dell" OR
    "DELL"), WHICH GOVERNS YOUR USE OF THE SOFTWARE. THE SOFTWARE SHALL MEAN
    ...略...
    Press <Space> to view the next page, or 'q' to quit viewing the EULA (1/17) q

    此時,如果 CentOS 可以順利對外 (此例為 eth0) 的話,即可顯示安裝相關套件的內容。
    若 CentOS 主機對外網路不通的情況下,則會出現如下錯誤訊息
    Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os error was
    14: PYCURL ERROR 6 - "Couldn't resolve host 'mirrorlist.centos.org'"
    Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
    Install failed: The following packages are not present:
    equallogic-host-tools-1.3.0-2.el6
    kmod-dell-dm-switch-1.3.0-0
    Aborting configuration, installation didn't finish successfully.

    相關套件安裝完畢後,開始進行 MPIO 設定動作,此時會顯示這台 CentOS 主機的所有網路介面,請選擇屆時專用於 MPIO 儲存傳輸的網段,此實作環境為「 10.10.99.0/24 」,因此請鍵入「 2 」後繼續設定作業。 接著輸入指令「 rswcli --mpio-include --network=10.10.99.0 --mask=255.255.255.0 」,明確指定 MPIO 的網段,然後再輸入「 rswcli --mpio-list --io 」指令確認。
    # rswcli --mpio-include --network=10.10.99.0 --mask=255.255.255.0
    Processing mpio-include command...
    Adding '10.10.99.0 - 255.255.255.0' to include list
    No change made. '10.10.99.0 - 255.255.255.0' is already included.
    Discovered Adapters:
    eth0: 192.168.11.133    (Excluded)
    eth4: 10.10.99.65       (Included)
    eth5: 10.10.99.66       (Included)

    The mpio-include command succeeded.
    # rswcli --mpio-list --io
    Processing mpio-list command...
    Discovered Adapters:
    eth4: 10.10.99.65       (Included)
    eth5: 10.10.99.66       (Included)
    The mpio-list command succeeded.

    預設情況下,採用的 MPIO 演算法為 LQD(Least Queue Depth) 。但是,此次的實作環境當中,經過測試後採用「 RR(Round Robin) 」演算法較佳,因此執行指令進行調整。
    # rswcli --mpio-parameters --dlb RR
    Processing mpio-parameters command...
    MPIO Parameters:
    Max sessions per volume slice: 2
    Max sessions per entire volume: 6
    Minimum adapter speed: 1000
    Default load balancing policy configuration: Round Robin (RR)
    IOs Per Path: 16
    Use MPIO for snapshots: Yes
    Internet Protocol: IPv4
    The mpio-parameters command succeeded.
    New load-balancing policies will take effect on existing multipath devices in several seconds.
    Warning: No IPv4 discovery portals configured. Add the array IPv4 group IP as a discovery portal in the iSCSI Initiator.

    執行上述指令後,將演算法改為 Round Robin 的方式,同時你也可以確認「 /etc/equallogic/eql.conf 」設定檔內容是否已經變更了。
    # grep LoadBalanceType /etc/equallogic/eql.conf
    LoadBalanceType = round-robin

    掛載 Volume 之前,先確認可以與 Dell EqualLogic Group IP (10.10.99.10) 溝通無誤。
    # ping -I eth4 -c10 10.10.99.10
    # ping -I eth5 -c10 10.10.99.10

    確認 CentOS 主機的 MPIO 網卡,都能順利與 Dell EqualLogic Group IP (10.10.99.10) 溝通後,便可以進行 iSCSI Target 儲存資源的掛載動作。其中,第二行指令加上「 --login-at-boot 」參數表示下次啟動時順便自動掛載。
    # iscsiadm -m discoverydb -p 10.10.99.10 -t st -o new -D
    10.10.99.10:3260,1 iqn.2001-05.com.equallogic:0-fe83b6-c087ec8e8-0450000003154fd6-vol1
    10.10.99.10:3260,1 iqn.2001-05.com.equallogic:0-fe83b6-c087ec8e8-0450000003154fd6-vol1
    # ehcmcli login --target vol1 --portal 10.10.99.10 --login-at-boot
    Looking up volume by name (vol1)
    Found: iqn.2001-05.com.equallogic:0-fe83b6-c087ec8e8-0450000003154fd6-vol1 (10.10.99.10)
    Login succeeded.  Device to mount:
    /dev/eql/vol1
    # iscsiadm -m discoverydb
    10.10.99.10:3260 via sendtargets

    掛載儲存空間完畢後,可以再次確認目前的運作狀態。此時,便可以看到 Volume List 區塊中有相關資訊了,或是在 Web 管理介面也可以看到相關資訊。
    步驟 4. 格式化及 Mount Point 掛載 完成 iSCSI Target 儲存資源的掛載動作後,在進行儲存空間格式化及掛載的動作之前,再次確認 CentOS 主機的 eth4、eth5 介面,能夠順利與 PS6210XS 儲存設備的 Group IP (10.10.99.10) 順利溝通。
    # ping -I eth4 -c5 10.10.99.10
    # ping -I eth5 -c5 10.10.99.10

    CentOS 主機便可以將其儲存空間進行格式化為 Ext4 檔案系統的動作後,掛載至目前的系統當中。
    # mkdir -p /vol1
    # mkfs.ext4 /dev/eql/vol1
    # mount /dev/eql/vol1 /vol1
    # df -h
    Filesystem                                                Size  Used Avail Use% Mounted on
    /dev/sda3                                                  50G  526M   47G   2% /
    tmpfs                                                     142G   68K  142G   1% /dev/shm
    /dev/sda1                                                1022M  264K 1022M   1% /boot/efi
    /dev/sda6                                                 250G  188M  237G   1% /home
    /dev/sda2                                                  99G  2.3G   92G   3% /usr
    /dev/sda4                                                  50G  408M   47G   1% /var
    /root/equallogic-host-tools-1.3.0-2.iso                    43M   43M     0 100% /media/iso
    /dev/mapper/eql-0-fe83b6-c087ec8e8-0450000003154fd6-vol1   99G  188M   94G   1% /vol1
    # grep vol1 /etc/fstab
    /dev/eql/vol1           /vol1                   ext4    defaults        0 0

    步驟 5. 測試 MPIO 負載平衡及容錯備援機制 可以安裝 bwm-ng 套件,以便稍後方便觀察 CentOS 網路卡的傳輸情況。
    # rpm -ivh bwm-ng-0.5-2.el6.rf.x86_64.rpm
    warning: bwm-ng-0.5-2.el6.rf.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY
    Preparing...                ########################################### [100%]
    1:bwm-ng                 ########################################### [100%]

    接著,我們在 /vol1 掛載點下,建立一個簡單產生檔案的迴圈 Shell Script,以便稍後可以測試 MPIO 的負載平衡及容錯機制。
    # cd /vol1/
    # cat mpio-test.sh
    #!/bin/sh
    y=10000
    while [ $x -le $y ]
    dd if=/dev/zero of=test-$x bs=1M count=1 conv=fdatasync
    x=`expr $x + 1`
    # chmod 755 mpio-test.sh

    執行這個產生檔案的迴圈 Shell Script 之後,可以看到「 eth4、eth5 」二張網路卡介面同時傳輸,也就是達成 MPIO 平時 負載平衡 流量的機制。如果,將其中一片網路卡連線拔除的話,會發現另一片連線中的網路會繼續傳輸,達成 容錯備援 機制。當然,如果再將網路連線復原的話,會發現系統又自動負載平衡流量。
    當然,如果是 PS6210XS 儲存設備的 Ethernet0/1 故障,或是整個 Controller 故障的情況呢?
    當 Active Controller 上 Ethernet0/1 其中一個 Port 故障時,那麼 Standby Controller 會接手一個介面,舉例來說,Active Controller Ethernet0 故障,那麼會變成 Standby Controller Eethernet0 及 Active Controller Ethernet1 同時運作。
    步驟 6. 測試 Volume Hot-Extend 機制 測試完 MPIO 效能之後,接著來測試 Volume Hot-Extend 的功能,也就是線上擴充儲存資源,我們可以看到目前 CentOS 所掛載的 Volume 為「 100 GB 」。
    7、I/O 效能測試 使用 IOmeter 簡單測試一下,這台 PS6210XS 儲存設備的 I/O 效能,其中測試檔案大小為「 32 GB 」,而 OutStanding I/O 則為「 1、2、4、8、16、32 」,至於測試項目如下:
  • 4KB – Random – 67% Read – 33% Write
  • 8KB – Random – 67% Read – 33% Write
  • 64KB – Random – 67% Read – 33% Write
  • 64KB – Sequential – 100% Read – 0% Write
  • 64KB – Sequential – 0% Read – 100% Write
  • Intel NIC Linux binary RPMs for Red Hat Enterprise Linux and Novell SLES Driver Details | Dell Faroe Islands
  • Intel Ethernet Drivers and Utilities / Bugs / #399 ixgbe - support for unsupported sfp+ on Intel X520
  • EqualLogic Integration: Installation and Configuration of Host Integration Tools for Linux
  • How to configure Multipath using Equallogic Host Integration Toolkit (HIT) on Linux for Oracle - Oracle Solutions - Enterprise Solutions - Dell Community
  • Dell EqualLogic Configuration Guide
  • Q 1. HP Ethernet 10Gb 2-port 560SFP+ 網卡 MPIO 機制有問題? Error Message:
    實體伺服器為 HP DL360 G9,所安裝的 10GbE 網卡為 HP Ethernet 10Gb 2-port 560SFP+ Adapter Driver ,當安裝 HIT for Linux 之後,在測試 MPIO 機制時,並不會 eth4、eth5 同時運作,而是「 非常緩慢 」的在二個介面之間進行資料讀寫的動作?
    因為,此台主機安裝 CentOS 6.5 (x64) 作業系統之後,預設情況下便能抓到 10GbE 網卡 (此時驅動程式版本為 3.15 ),後續至下載最新驅程版本再安裝後即可解決此問題。 HP 支援中心 - HP Ethernet 10Gb 2-port 560SFP+ Adapter 的驅動程式與軟體 。下載的驅動程式檔案為「 kmod-hp-ixgbe-3.22.0.2-10.rhel6u5.x86_64.rpm 」版本為 3.22
     
    推荐文章