免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1492 | 回复: 0
打印 上一主题 下一主题

[存储网络] Linux-iSCSI技术 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-30 22:44 |只看该作者 |倒序浏览
    所谓iSCSI亦即透过IP网络,将SCSI块数据转换成网络封包的一种传输标准,它和NAS一样透过IP网络来传输数据,但在数据存取方式上,则采用与 NAS不同、却与FC-SAN相同的块协议(Block Protocal)。在2003年2月间,也就是几乎在SNIA协会通过iSCSI标准的同时,便提供iSCSI Beta版驱动程序的在线下载服务。
   
   2003年5月,微软在发布Windows Server 2003时对外正式宣称会对iSCSI加以支持。到了7月,微软果然没有食言,紧接推出了支持iSCSI标准的Windows操作系统更新程序,该程序完 全免费下载,可同时支持Windows 2000/XP与Windows Server 2003等不同操作系统。此外,微软还推出了代号Chimney的TCP/IP Offload架构,并得到了Alacritech和Adaptec等iSCSI HBA供应商的支持。目前市面上的信息中心及各企业的网管单位所采用的操作系统,并非完全局限于Windows林系统,反而是充斥着Unix、 Linux、SUN Solaris等各种操作系统,换句话说,Windows只不过是众多操作系统中的一个罢了。更重要的是,其它操作系统对iSCSI的支持,并没有像Windows如此完备,其中不是只有软件驱动程序,就是只有硬件适配卡的提供,甚至也有完全没任何解决方案的平台。所以虽然微软全面支持 iSCSI,但不表示整个市场都已有iSCSI解决方案。
   就整体趋势而言,市场上对iSCSI的支持是不断地在增加之中的。其中,在Linux方面,已有支持RedHat的适配卡,而SuSE也已有 Initiator软件的支持。在Unix方面,除了IBM AIX早有支持外,HP-UX也有Initiator软件。至于Sun Solaris则软硬件的支持皆有,Novell Netware 6.5也已提供Initiator软件。最近,Cisco也推出了针对SUN专用的Initiator软件,接下来不久,该公司也会推出支持HP的 Initiator软件。
    iSCSI适配卡大致分成两类,一为TOE HBA卡,一为iSCSI HBA卡,前者价格较便宜,后者效能极佳,但价格非常昂贵。代表性的厂商有Adaptec、Alacritech、Intel、LSI、Qlogic等, 其中Intel专注于TOE HBA卡的开发。
    一般来说,在iSCSI SAN的网络架构中,只要用一般Gigabit以太网络交换机就可以运作。但目前已有全新iSCSI交换机的推出,代表性厂商有Cisco、 McData、Sanrad(V-Switch)等。其中,Cisco更是这方面的先驱,早在2001年之际,该公司即联合IBM共同推出全球最早的 iSCSI解决方案,当时Cisco即推出iSCSI路由器——SN5420。
    在iSCSI 存储服务器方面,不但历史最久远,而且代表性的厂商颇多,较具代表性的有IBM、NetApp、EMC、微软、飞康国际及DataCore (SANmelody)等。这方面的开山祖师当推IBM莫属,早在2001年,IBM即推出全球第一台的iSCSI存储服务器——IP Storage 200i,但由于当时的iSCSI尚未标准化,所以业界对该产品及标准的支持性及接受度都非常低,事情发展到最后,就是这只一向飞得太快、太远的大飞象,不得不黯然暂离iSCSI的市场。不过如今,IBM又重回iSCSI的怀抱,并推出了全新产品——TotalStorage DS300。
    向以NAS方案著称于世的NetApp(Network Appliance)早在2003年,iSCSI标准通过之际,即推出支持iSCSI的文件服务器,目前NetApp的代表性产品为F800系列及 FAS900系列Server。此外,EMC也在Symmetrix DMX系列方案及新款EMC CELERRA NAS系统中开始支持iSCSI标准。其中WSS 2003同时支持NAS及iSCSI,不少厂商藉此与微软合作,推出基于WSS 2003的存储服务器,例如飞康国际(FalconStor)、技嘉及广达等公司都有这方面的iSCSI产品推出。
    目前最常见的iSCSI存储设备首推磁盘阵列及磁带库。前者的代表性厂商有Adaptec(iSA1500)、HDS(Thunder 9500)、乔鼎信息(Promise VTrak 15200)、建联科技(Raidsys 15200)及普安科技等。
   至于iSCSI磁带库的厂商则有ADIC(Scalar i2000)、SpectraLogic、Quantum、耐特普罗(NetPro Virtual Tape Library)、Overland等。
Redhat AS 3.0 update4 以后开始集成iscsi initiator,
如果集成了iscsi initiator配置iscsi initiator很简单
一般步骤如下:
    1、配置iscsi磁盘阵列,如NetAPP,IBM,Equalogic,创建Group,划分LUNS,创建卷,设置访问控制记录等。如果没有iscsi磁盘阵列可以用软件虚拟iscsi target,如wintarget
    2、安装iscsi-initiator
    3、配置/etc/iscsi.conf,添加target ip
    4、/etc/init.d/iscsi start
    5、fdisk /dev/sdx
[root@dell2650 etc]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 3 (Taroon Update 4)
[root@dell2650 etc]# rpm -qa|grep iscsi
iscsi-initiator-utils-3.6.2-4
如果没有集成,其他版本的可以从
sourceforge.net

Linux-iSCSI Project
下载得到相应版本。
Setting up basic iscsi on linux
1.1 getting itYou want the iscsi software packages that Cisco wrote and distribute on sourceforge.
http://sourceforge.net/projects/linux-iscsi

This currently is only tested with version 3.2.0.1 against DataONTAP 6.4R1
1.2 compiling it
make
make install
Thats it. You might want to change the Makefile to change the install directory for the iSCSI tools.
1.3 setting it up
1.3.1 /etc/iscsi.confThis file just needs to have a line listing the IP of the filer you''ll be using.
DiscoveryAddress=10.60.152.25
I have only tested this using a single filer with a single lun setup.
1.3.2 /etc/initiatorname.iscsiThis file contains the name that the linux box will use when it connects to the iSCSI target. The name is created using the iscsi-iname command that was installed as part of building the iSCSI software.
bolen@bolen /etc % /opt/sbin/iscsi-iname
iqn.1987-05.com.cisco.01.a1ad5447905f8e93a778ddfefedb233
The file should look something like this
bolen@bolen /etc % r cat /etc/initiatorname.iscsi
## DO NOT EDIT OR REMOVE THIS FILE!
## If you remove this file, the iSCSI daemon will not start.
## If you change the InitiatorName, existing access control lists
## may reject this initiator.  The InitiatorName must be unique
## for each iSCSI initiator.  Do NOT duplicate iSCSI InitiatorNames.
InitiatorName=iqn.1987-05.com.cisco.01.6727f456fe3f50c8274f4484bd7862d2
1.4 testing itfirst set up the filer :)
you should be able to restart the iscsi daemon (iscsid) which is what finds luns. best way is via
redhat: service iscsi reload
or: /etc/rc.d/init.d/iscsi reload
or: send a HUP signal to the iscsid process
(which is all the first 2 do anyways)
if you''ve got everything setup, you should have found disks. check /proc/scsi/scsi for the disks, they''ll say NETAPP LUN. You should also see the filer''s initiator name in /proc/scsi/iscsi/0. dmesg and /var/log/messages should mention where the disk was added, eg: /dev/sda /dev/sdb.
once you know where the disk is, you can format it with fdisk and put a filesystem on it, etc, etc, etc. If you can do mkfs and mount it, you''ve got it working.
now would be a good time to tar over your filesystems to the iscsi disk for future use...
I like this method
mount your iscsi fstar clf - / | (cd /iscsifs;tar xvf -) or some thing like that...
also don''t forget to create a partition for swap on the iscsi disk.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/7315/showart_64268.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP