作者 主題: 以Linux建置高可用性 iSCSI 儲存設備  (閱讀 8637 次)

0 會員 與 1 訪客 正在閱讀本文。

thx

  • 鑽研的研究生
  • *****
  • 文章數: 510
    • 檢視個人資料
    • http://www.osslab.com.tw
以Linux建置高可用性 iSCSI 儲存設備
« 於: 2011-09-06 02:30 »

建置高可用性 iSCSI 儲存設備
此篇原創為weithenn大


http://www.weithenn.org/cgi-bin/wiki.pl?%E5%BB%BA%E7%BD%AE%E9%AB%98%E5%8F%AF%E7%94%A8%E6%80%A7_iSCSI_%E5%84%B2%E5%AD%98%E8%A8%AD%E5%82%99_%28%E4%B8%8A%29

1.線路規畫如圖
   以Linux 做ISCSI target server

2. ISCSI Storage Server  1 以DRBD (Distributed Replicated Block Device)    會mirror sync ISCSI Storage Server  2

3.Storage server 1 跟 2 跟虛擬化Host  Server 有做NIC bonding.

4.二台主機以 Heartbeat  容錯與監管
 

補充
1. CentOS 系統模組設定檔 (/etc/modprobe.conf) 內容為作業系統載入虛擬網路卡 Bonding 模組並指定網路卡容錯機制
改成mode=5 可為nic teaming  +(balance-tlb)

mode=1 (active-backup)
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if, and only if, the active slave fails. The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch. This mode provides fault tolerance. The primary option affects the behavior of this mode.

mode=2 (balance-xor)
XOR policy: Transmit based on [(source MAC address XOR'd with destination MAC address) modulo slave count]. This selects the same slave for each destination MAC address. This mode provides load balancing and fault tolerance.

mode=3 (broadcast)
Broadcast policy: transmits everything on all slave interfaces. This mode provides fault tolerance.

mode=4 (802.3ad)
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.

    Prerequisites:
        Ethtool support in the base drivers for retrieving the speed and duplex of each slave.
需要專門Switch

mode=5 (balance-tlb)
Adaptive transmit load balancing: channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to the speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave.
一般Switch 就可




3.我會建議用Starwind + DFS Replication + Boradcom SLB driver
http://blogs.technet.com/b/filecab/archive/2009/06/29/deploying-dfs-replication-on-a-windows-failover-cluster-part-iii.aspx
« 上次編輯: 2011-09-06 16:59 由 thx »

netman

  • 管理員
  • 俺是博士!
  • *****
  • 文章數: 17484
    • 檢視個人資料
    • http://www.study-area.org
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #1 於: 2011-09-06 16:39 »
讚!

pinony

  • 可愛的小學生
  • *
  • 文章數: 4
    • 檢視個人資料
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #2 於: 2011-10-14 23:22 »
曾實作過同類狀置希望作 web / imap server, 但效能不佳.

可以分享一下硬件配套及效能就最好了....

元智

  • 可愛的小學生
  • *
  • 文章數: 7
    • 檢視個人資料
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #3 於: 2011-12-12 18:12 »
坊間有 10Gb port ISCSI Server 賣。聽說性能不錯。
如果自己組裝的 ISCSI 速度應該受限於 disk I/O , 使用 Raid 模式, 速度再打折。
網絡速度也是很關鍵。
有沒有人能夠分享一下寶貴的經驗?
當你怠到悲哀痛苦時,
最好學些甚麼東西,
學習使你永遠立于不敗之地!

thx

  • 鑽研的研究生
  • *****
  • 文章數: 510
    • 檢視個人資料
    • http://www.osslab.com.tw
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #4 於: 2011-12-12 20:39 »
CPU ,匯流排, HBA ,HDD ,網卡只要調配的夠好
http://phorum.study-area.org/index.php/topic,63063.0.html

想要高iops 有啥問題? 自己買品牌Server 軟體自上
或三大廠 一些 Soultion   (Dell MD3200 ,IBM DS3500 , HP P2000G3 Combo )
不過這樣其他昂貴設備就不用玩了..

這架構延伸討論可參考本書 
http://www.drmaster.com.tw/Bookinfo.asp?BookID=OS20132


作者在月底或明年初會 辦場webinars
« 上次編輯: 2012-01-03 13:11 由 thx »

Nansen

  • 活潑的大學生
  • ***
  • 文章數: 212
    • 檢視個人資料
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #5 於: 2011-12-13 00:00 »
小弟測過DELL EqualLogic與HP P4000、P2000發現IOPS在重複存取檔案後會暴增,也就是放到OS的RAM中快取處理

另外在某些情況下Linux的iscsi斷線後會發生掛載端(initiator)咬住session無法釋放或重新連線的問題

jonathan_lwo

  • 活潑的大學生
  • ***
  • 文章數: 323
    • 檢視個人資料
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #6 於: 2011-12-18 17:04 »

另外在某些情況下Linux的iscsi斷線後會發生掛載端(initiator)咬住session無法釋放或重新連線的問題




我後端用SAN 掛過來的磁碟都沒問題
而用centos 模擬的iscsi 就如下錯誤
http://phorum.study-area.org/index.php/topic,65674.msg324463.html#msg324463

也許就是這個問題

請問Nansen 大大,如何認定是session 咬住的呢?

rainday

  • 鑽研的研究生
  • *****
  • 文章數: 740
  • 性別: 男
  • enhancing and optimizing
    • 檢視個人資料
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #7 於: 2011-12-23 23:46 »
另外在某些情況下Linux的iscsi斷線後會發生掛載端(initiator)咬住session無法釋放或重新連線的問題

調整iscsi node.session的參數試試呢
<0  =_=  Don't learn to hack , hack to learn.

jonathan_lwo

  • 活潑的大學生
  • ***
  • 文章數: 323
    • 檢視個人資料
Re: 以Linux建置高可用性 iSCSI 儲存設備
« 回覆 #8 於: 2012-01-03 10:57 »
另外在某些情況下Linux的iscsi斷線後會發生掛載端(initiator)咬住session無法釋放或重新連線的問題

調整iscsi node.session的參數試試呢



有空再來試看看
謝謝~
 :)