你好,游客 登录 注册 搜索
背景:
阅读新闻

CentOS 6.5 安装部署iSCSI共享存储

[日期:2017-03-01] 来源:Linux社区  作者:zlyang [字体: ]

一、前言

  1、什么是iSCSI?

    iSCSI技术是一种由IBM公司研究开发的,是一个供硬件设备使用的可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能够在诸如高速千兆以太网上进行路由选择。iSCSI技术是一种新储存技术,该技术是将现有SCSI接口与以太网络(Ethernet)技术结合,使服务器可与使用IP网络的储存装置互相交换资料。

    iSCSI:Internet 小型计算机系统接口 (iSCSI:Internet Small Computer System Interface)。
Internet 小型计算机系统接口(iSCSI)是一种基于 TCP/IP的协议,用来建立和管理 IP 存储设备、主机和客户机等之间的相互连接,并创建存储区域网络(SAN)。SAN 使得 SCSI 协议应用于高速数据传输网络成为可能,这种传输以数据块级别(block-level)在多个数据存储网络间进行。
    SCSI 结构基于客户/服务器模式,其通常应用环境是:设备互相靠近,并且这些设备由 SCSI 总线连接。iSCSI 的主要功能是在 TCP/IP 网络上的主机系统(启动器 initiator)和存储设备(目标器 target)之间进行大量数据的封装和可靠传输过程。此外,iSCSI 提供了在 IP 网络封装 SCSI 命令,且运行在 TCP 上。

  2、环境介绍:

    本次部署由3台物理机实现,具体信息分别为以下:

      a、iSCSI_Server:192.168.30.133

      b、iSCSI_Client1:192.168.30.131

      c、iSCSI_Client2:192.168.30.132

    需要用到的软件为:

      a、scsi-target-utils    # 提供Server端服务

      b、iscsi-initiator-utils   #提供Client服务

 二、安装部署服务端,即iSCSI_Server

   1、在服务端创建可共享的磁盘或卷;这里就新添加一块新磁盘做为共享;

    查看新添加的硬盘:     

[root@iSCSI_Server ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes
64 heads, 32 sectors/track, 30720 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000da3dc
Device Boot Start End Blocks Id System
/dev/sda1 * 2 501 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 502 30720 30944256 8e Linux LVM
Partition 2 does not end on cylinder boundary.
Disk /dev/sdb: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

  2、对硬盘进行分区并创建LVM卷:

[root@iSCSI_Server ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x47756356.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
        switch off the mode (command 'c') and change display units to
        sectors (command 'u').

Command (m for help): p      # 查看分区信息

Disk /dev/sdb: 21.5 GB, 21474836480 bytes64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x47756356

  Device Boot      Start        End      Blocks  Id  System

Command (m for help): n      #新建一个分区

Command action
  e  extended
  p  primary partition (1-4)
e                   # 新建一个逻辑分区
 
Partition number /p> 13b、al$lx件2Tutilsal:ContentSize(12)">小]

<研ef="../nl">Newrefdiv> ody" style=riteNewref<12)">小linuxe2 doerel="styleshe0 hre>Rriplog+MariaDB+L00a"> yzer68.30.60"SCSf-8"/> 搭>eux20i_2设小linuxe2 doerel="stylesheLxt/j Nexus Mavtn计私CSf运inux弈i加ux20i_2设ss="firs>ss="firs>sody" style=b

ss="firshody" style=lxt/j809

  1、什么是iSCSI?

 lxt/j809iSCSI技术是一"> hody" style=ript type="text/javascript">WriteBg()

阅读yle=> s12)">小linuxe"l">
?w477e=nop,&op,集=793js"c/="_b 小linuxe"l">
?w477e=nop,&op,集=46172s"c/="_b sody" style="word-break:break-all;">

'nl'bllio<12)">小linuxe2 doerel="st6les4619MySql/"c/="_bR/aHat Lxt/jpe" contuteM口ipath:ux20/p> (;二ef="../1 *dth今 16:0 style=")layle="colio">lio<12)">小linuxe2 doerel="styles236t" hre y/="_b s" cOpenfiler2.99 ~Esxi数Serverux20/p> (03月3060")layle="colio">lio<12)">小linuxe2 doerel=6-11/137654MySql/"c/="_bRHCE7.0学习笔记I线配uteux20/p> (11/29rel=6 09:53:29)layle="colio">/ul>sstable>mR"> '5);'div clas'="m'blul> 'nl'bllio<12)">小linuxe2 doerel="st5les387t" hre y/="_bLiyle>es
(05月1760")layle="colio">lio<12)">小linuxe2 doerel="stylesh445MySql/"c/="_b
Lxt/jyles
(03月0660")layle="colio">lio<12)">小linuxe2 doerel=6-09/135659MySql/"c/="_b
Li)是yle68.30.s
(09/30/2l=6 10:11:5berayle="colio">/ul>sstabl="../../index. ss="firs>sIBM公hody" style=b

ss="firshody" style=lxt/j808

  1、什么是iSCSI?

 lxt/j808iSCSI技术是一">l="nofollef="../ript type="text/javascript">WriteBg()

阅读yle=> 小linuxeablerkdiv> ?、esheets"c/="_b
(0erayle="divss="firs>sody" style="word-break:break-all;">

er">le../" alt="Li"5);efdiv> /trm   =""ert t你mRblerkSipton"..miripretct" relerkdpost(t./Lr">fdiv> inript> hfraeIt'ueFFF"ert t你 wms.jDe"centermframe mpx" rel="relerkd copF (t./Lrpton ccseclaiprelerkdhfreF ()wms.j ry.j"ert tu :60ass=ef="../ nbgwms.j checkboss=、rmAa nymirySiptonc rel="relerkdta ny(t./Lrp> /tu dn/trrmAa nymirySip>匿名la/tu dfdiv> nte

ry.j"e、bLebr> =">dningipre>dnings"b、iSdiv> -wi :0;b / grev/s:享ranspt;patt/>De"centermframe mIt'ueFF0wms.j
:39em;>ssry.janstcri checkboss=checkayic/heckays=、rmAgreeSip> /tu dn/trrmAgreeSip>同意f声明>表v icrib、iSlisn-br储short:squans;ler0dn:5px 0 0 1em;iv clas:公社a hlio尊重ut道 事<律责他/io">除P/ISCS辖留硬cri他意内容/io">。contfux/io">">

  1、什么是iSCSI?

 lxt/j799iSCSI技术是一sstablt>

sstible>">irelerkdPrefix="../../" =5on1"> =21">">

ss="firsr">stable>mR"> "30h= It'p; ="mor">ody" style=lxt/j90ript" src="/linuxfile/linux2.js">

ody" style=lxt/j90

  1、什么是iSCSI?

   90iSCSI技术是一">ody" style=lxt/j903

  1、什么是iSCSI?

   903iSCSI技术是一">ody" style=lxt/j905

  1、什么是iSCSI?

 lxt/j905iSCSI技术是一">l="nofollef="../lipt t>fdivhody" style=">WriteBg() 阅读yle=> sody" style="word-break:break-all;">

小linuxeLxt/jrel="st6les4619MySql/y/="_bR/aHat Lxt/jpe" contuteM口ipath:径p>lio<12)">小linuxe2 doerel="st6les4618MySql/y/="_bR/ais复制+Stnt.
    e详解ux20/io">lio<12)">小linuxe2 doerel="st6les461t" hre y/="_bQL5.7rti制加ux20/io">lio<12)">小linuxe2 doerel="st6les4616MySql/y/="_bKeept'pu &+QL又 ~搭>eux20/io">lio<12)">小linuxe2 doerel="st6les4615MySql/y/="_bQL MHA加丂>e详解ux20/io">lio<12)">小linuxe2 doerel="st6les4614MySql/y/="_b益">GoogleAI眼科医生srti军印度lio<12)">小linuxe2 doerel="st6les4613MySql/y/="_bC11织iS除iSCSI率 AppSA释放 iPhonw(P 网空并">i/>C11织iS除iSCSI率 AppSA释放 ux20/io">lio<12)">小linuxe2 doerel="st6les461 hre y/="_b预览版 Wr /owa 10 预isr0重大化vx20/io">lio<12)">小linuxe2 doerel="st6les4611MySql/y/="_b[9 ~Go1.8加一utevx20/io">lio<12)">小linuxe2 doerel="st6les461sp hre y/="_b> s" cGo语硬解析_Livx20/io">/ul>">sIBM公hody" style=b

    ss="firsrhody" style=u7公eript" src="/linuxfile/linux1.xt/jav
    lhody" style=u8公eript" src="/linuxfile/linux1.xt/jav
    lhody" style=u9公eript" src="/linuxfile/linux1.xt/jav
    lhody" style=ylew0ody>">fdivhript" src="/linuxfile/linux1.xt/jav
    ">hody" style=lxt/j906eript" src="/linuxfile/linux1.xt/jav
    ">hody"、fnde-break<12)">小155" height="53" border/adevtusMySqlx/">Liext/cs简vx20 -
    >3台地图20 -
    nt usMySqlx联)我们vx20le> 0;" Lxt/jIDC扤刊ux 也 ~CSI他何>e㺫些设备eript" src="/linuxfile/linux1.xt/jav
    ">ript" src="/linuxfile/linux1.xt/jav
    Copycript ©57006l.j16<12)">小155" height="53" border/ux/">Liext/csvx20Avera/scrs re<">ody>">ody>">ript" src="/linuxfile/linux1.xt/jav
    ript" src="/linuxfile/linux1.xt/jav
    ript" src="/linuxfile/linux1.xt/jav
    b>">td ./.>