日本综合一区二区|亚洲中文天堂综合|日韩欧美自拍一区|男女精品天堂一区|欧美自拍第6页亚洲成人精品一区|亚洲黄色天堂一区二区成人|超碰91偷拍第一页|日韩av夜夜嗨中文字幕|久久蜜综合视频官网|精美人妻一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
CentOS6.6安裝iSCSI

一,ISCSI簡介

為永昌等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計制作服務(wù),及永昌網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為網(wǎng)站建設(shè)、成都網(wǎng)站制作、永昌網(wǎng)站設(shè)計,以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達到每一位用戶的要求,就會得到認可,從而選擇與我們長期合作。這樣,我們也可以走得更遠!

iSCSI,即internet SCSI,又稱為IP-SAN,是IETF制訂的一項標準,用于將SCSI數(shù)據(jù)塊映射成以太網(wǎng)數(shù)據(jù)包。iSCSI是一種基于TCP/IP 的協(xié)議,用來建立和管理IP存儲設(shè)備、主機和客戶機等之間的相互連接,并創(chuàng)建存儲區(qū)域網(wǎng)絡(luò)(SAN)。SAN 使得SCSI 協(xié)議應(yīng)用于高速數(shù)據(jù)傳輸網(wǎng)絡(luò)成為可能,這種傳輸以數(shù)據(jù)塊級別(block-level)在多個數(shù)據(jù)存儲網(wǎng)絡(luò)間進行。SCSI 結(jié)構(gòu)基于C/S模式,其通常應(yīng)用環(huán)境是:設(shè)備互相靠近,并且這些設(shè)備由SCSI 總線連接。

iSCSI 的主要功能是在TCP/IP 網(wǎng)絡(luò)上的主機系統(tǒng)(啟動器 initiator)和存儲設(shè)備(目標器 target)之間進行大量數(shù)據(jù)的封裝和可靠傳輸過程。

從根本上說,iSCSI協(xié)議是一種跨過IP網(wǎng)絡(luò)來傳輸潛伏時間短的SCSI數(shù)據(jù)塊的方法。

完整的iSCSI系統(tǒng)的拓撲結(jié)構(gòu)如下:

與傳統(tǒng)的SCSI技術(shù)比較起來,iSCSI技術(shù)有以下三個革命性的變化:

  1. 把原來只用于本機的SCSI協(xié)同透過TCP/IP網(wǎng)絡(luò)傳送,使連接距離可作無限的地域延伸;
  2.  
  3. 連接的服務(wù)器數(shù)量無限(原來的SCSI-3的上限是15);
  4.  
  5. 由于是服務(wù)器架構(gòu),因此也可以實現(xiàn)在線擴容以至動態(tài)部署。

ISCSI的協(xié)議結(jié)構(gòu):

二,搭建基于 IP SAN 的 ISCSI 存儲系統(tǒng)

  1. 規(guī)劃:
  2.  
  3. 環(huán)境: CentOS 6.6 32位
  4.  
  5. 服務(wù)器端 IP: 192.168.1.43
  6.  
  7. 客戶端 IP : 192.168.1.111
  8.  
  9. 共享磁盤: /dev/sdb

1,配置服務(wù)器端

  1. [root@localhost ~]# yum -y install scsi-target-utils #安裝服務(wù)器端軟件
  2.  
  3. [root@node1 iscsi]# rpm -ql scsi-target-utils
  4. /etc/rc.d/init.d/tgtd
  5. /etc/sysconfig/tgtd
  6. /etc/tgt/targets.conf #配置文件
  7. /usr/sbin/tgt-admin
  8. /usr/sbin/tgt-setup-lun
  9. /usr/sbin/tgtadm
  10. /usr/sbin/tgtd
  11. /usr/sbin/tgtimg
  12. /usr/share/doc/scsi-target-utils-1.0.24
  13. /usr/share/doc/scsi-target-utils-1.0.24/README
  14. /usr/share/doc/scsi-target-utils-1.0.24/README.iscsi
  15. /usr/share/doc/scsi-target-utils-1.0.24/README.iser
  16. /usr/share/doc/scsi-target-utils-1.0.24/README.lu_configuration
  17. /usr/share/doc/scsi-target-utils-1.0.24/README.mmc
  18. /usr/share/man/man5/targets.conf.5.gz
  19. /usr/share/man/man8/tgt-admin.8.gz
  20. /usr/share/man/man8/tgt-setup-lun.8.gz
  21. /usr/share/man/man8/tgtadm.8.gz
  22.  
  23. [root@localhost ~]# lsmod |grep scsi
  24. mptscsih 31330 1 mptspi
  25. mptbase 86744 2 mptspi,mptscsih
  26. scsi_transport_spi 19726 1 mptspi #高級驅(qū)動程序

iscsi可以使用命令或配置文件進行配置,我們首先使用命令行來進行配置:

  1. [root@node1 iscsi]# service tgtd start
  2. Starting SCSI target daemon: [ OK ]
  3.  
  4. [root@node1 iscsi]# ss -tlnp |grep 3260 #其監(jiān)聽在3260端口
  5. LISTEN 0 128 :::3260 :::* users:(("tgtd",11882,5),("tgtd",11885,5))
  6. LISTEN 0 128 *:3260 *:* users:(("tgtd",11882,4),("tgtd",11885,4))
  7.  
  8. [root@localhost ~]# tgtadm -L iscsi -o new -m target -t 1 -T iqn.2015-08.com.feiyu.testsan:1 #創(chuàng)建一個target,-t指定TID,-T指定名稱

iqn表示“ISCSI Qualified Name”,簡稱iqn。

  1. [root@localhost ~]# tgtadm -L iscsi -o show -m target
  2. Target 1: iqn.2015-08.com.feiyu.testsan:1
  3. System information:
  4. Driver: iscsi
  5. State: ready
  6. I_T nexus information:
  7. LUN information:
  8. LUN: 0
  9. Type: controller
  10. SCSI ID: IET 00010000
  11. SCSI SN: beaf10
  12. Size: 0 MB, Block size: 1
  13. Online: Yes
  14. Removable media: No
  15. Prevent removal: No
  16. Readonly: No
  17. Backing store type: null
  18. Backing store path: None
  19. Backing store flags:
  20. Account information:
  21. ACL information:

然后設(shè)定LUN(Logical Unit Number,邏輯單元號),服務(wù)器端只需要創(chuàng)建好分區(qū),不需要格式化:

  1. [root@localhost ~]# tgtadm -L iscsi -o new -m logicalunit -t 1 -l 1 -b /dev/sdb5 #創(chuàng)建一個LUN,-m表示模式,-l :LUN ,-b: 設(shè)備
  2.  
  3. [root@localhost ~]# tgtadm -L iscsi -o bind -m target -t 1 -I 192.168.0.0/16
  4.  
  5. [root@node1 iscsi]# tgtadm -L iscsi -o show -m target
  6. Target 1: iqn.2015-08.com.feiyu.testsan:1
  7. System information:
  8. Driver: iscsi
  9. State: ready
  10. I_T nexus information:
  11. LUN information:
  12. LUN: 0
  13. Type: controller
  14. SCSI ID: IET 00010000
  15. SCSI SN: beaf10
  16. Size: 0 MB, Block size: 1
  17. Online: Yes
  18. Removable media: No
  19. Prevent removal: No
  20. Readonly: No
  21. Backing store type: null
  22. Backing store path: None
  23. Backing store flags:
  24. LUN: 1
  25. Type: disk
  26. SCSI ID: IET 00010001
  27. SCSI SN: beaf11
  28. Size: 2107 MB, Block size: 512
  29. Online: Yes
  30. Removable media: No
  31. Prevent removal: No
  32. Readonly: No
  33. Backing store type: rdwr
  34. Backing store path: /dev/sdb5
  35. Backing store flags:
  36. Account information:
  37. ACL information:
  38.  
  39. [root@node1 iscsi]# tgtadm -L iscsi -o bind -m target -t 1 -I 192.168.0.0/16 #設(shè)定共享區(qū)
  40. [root@node1 iscsi]# tgtadm -L iscsi -o show -m target
  41. Target 1: iqn.2015-08.com.feiyu.testsan:1
  42. System information:
  43. Driver: iscsi
  44. State: ready
  45. I_T nexus information:
  46. LUN information:
  47. LUN: 0
  48. Type: controller
  49. SCSI ID: IET 00010000
  50. SCSI SN: beaf10
  51. Size: 0 MB, Block size: 1
  52. Online: Yes
  53. Removable media: No
  54. Prevent removal: No
  55. Readonly: No
  56. Backing store type: null
  57. Backing store path: None
  58. Backing store flags:
  59. LUN: 1
  60. Type: disk
  61. SCSI ID: IET 00010001
  62. SCSI SN: beaf11
  63. Size: 2107 MB, Block size: 512
  64. Online: Yes
  65. Removable media: No
  66. Prevent removal: No
  67. Readonly: No
  68. Backing store type: rdwr
  69. Backing store path: /dev/sda5
  70. Backing store flags:
  71. Account information:
  72. ACL information:
  73. 192.168.0.0/16
  74.  
  75. [root@localhost ~]# tgtadm -L iscsi -o new -m logicalunit -t 1 -l 2 -b /dev/sdb6 #綁定第二個LUN

2,配置客戶端

  1. [root@node1 ~]# yum install -y iscsi-initiator-utils #安裝客戶端
  2.  
  3.  
  4. [root@node1 iscsi]# echo "InitiatorName=`iscsi-iname -p iqn.2013-05.com.feiyu`" > /etc/iscsi/initiatorname.iscsi #生成iqn
  5. [root@node1 iscsi]# echo "InitiatorAlias=initiator1" >> /etc/iscsi/initiatorname.iscsi #定義別名
  6.  
  7. [root@node1 iscsi]# ls
  8. initiatorname.iscsi iscsid.conf
  9. [root@node1 iscsi]# cat initiatorname.iscsi #查看所定義的數(shù)據(jù)
  10. InitiatorName=iqn.2015-08.com.feiyu:10834bd52221
  11. InitiatorAlias=initiator1
  12.  
  13. [root@node1 ~]# service iscsi start #啟動服務(wù),需要啟動兩個服務(wù)
  14. [root@node1 ~]# service iscsid start
  15. [root@node1 ~]# chkconfig iscsi on
  16. [root@node1 ~]# chkconfig iscsid on

若出現(xiàn)以下錯誤,可能由于服務(wù)器端的防火墻沒有關(guān)!

  1. [root@node1 ~]# iscsiadm -m discovery -t st -p 192.168.1.43
  2. Starting iscsid: [ OK ]
  3. iscsiadm: cannot make connection to 192.168.1.43: No route to host
  4.  
  5. [root@node1 ~]# iscsiadm -m discovery -t st -p 192.168.1.43 #進行探測
  6. 192.168.1.43:3260,1 iqn.2015-08.com.feiyu.testsan:1
  7.  
  8. [root@node1 ~]# iscsiadm -m node -T iqn.2015-08.com.feiyu.testsan:1 -p 192.168.1.43 -l #登錄節(jié)點
  9. Logging in to [iface: default, target: iqn.2015-08.com.feiyu.testsan:1, portal: 192.168.1.43,3260] (multiple)
  10. Login to [iface: default, target: iqn.2015-08.com.feiyu.testsan:1, portal: 192.168.1.43,3260] successful.
  11.  
  12. [root@node1 ~]# fdisk -l #登錄成功可以看到多了一塊硬盤,
  13.  
  14. Disk /dev/sda: 21.5 GB, 21474836480 bytes
  15. 255 heads, 63 sectors/track, 2610 cylinders
  16. Units = cylinders of 16065 * 512 = 8225280 bytes
  17. Sector size (logical/physical): 512 bytes / 512 bytes
  18. I/O size (minimum/optimal): 512 bytes / 512 bytes
  19. Disk identifier: 0x0006d052
  20.  
  21. Device Boot Start End Blocks Id System
  22. /dev/sda1 * 1 39 307200 83 Linux
  23. Partition 1 does not end on cylinder boundary.
  24. /dev/sda2 39 2354 18598912 83 Linux
  25. /dev/sda3 2354 2610 2057689 5 Extended
  26. /dev/sda5 2354 2610 2057657+ 83 Linux
  27.  
  28. Disk /dev/sdc: 10.7 GB, 10742183424 bytes -------> iscsi設(shè)備
  29. 64 heads, 32 sectors/track, 10244 cylinders
  30. Units = cylinders of 2048 * 512 = 1048576 bytes
  31. Sector size (logical/physical): 512 bytes / 512 bytes
  32. I/O size (minimum/optimal): 512 bytes / 512 bytes
  33. Disk identifier: 0x00000000

為磁盤創(chuàng)建分區(qū)并格式化。

  1. [root@node1 ~]# mke2fs -t ext4 /dev/sdc1

網(wǎng)站標題:CentOS6.6安裝iSCSI
路徑分享:http://www.dlmjj.cn/article/ccdejod.html