《LINUX ISCSI Target 服务器搭建与windows 客户端连接.docx》由会员分享,可在线阅读,更多相关《LINUX ISCSI Target 服务器搭建与windows 客户端连接.docx(11页珍藏版)》请在第壹文秘上搜索。
1、1.inuxISCSI服务器搭建与客户机ISeSl连接ISCSI简介:iSCSI技术是一种由IBM公司探讨开发的,是一个供硬件设法运用的可以在IP协议的上层运行的SCSI指令集,这种指令集合可以实现在IP网络上运行SCSI协议,使其能州在诸如高速千兆以太网上进行路由选择.iSCSI技术是一种新谛存技术.该技术是将现有SCSl接口与以太网络任thernet)技术结合,使服务器可与运用IP用络的储存袋置相互交换资料,网络拓扑;CentOS6.3ISCSIServerTargetIP:192,168.2.54CentOS6.3Tindovsserver2012ISCSIInitiatorISCSII
2、nitatorIP:192.168.2.55IP:192,168.2.230试验环境:ISCSIInitator:windowISCSITarget的搭建:1.iISCSItarget服务器上添加一块新的硬盘JfjT-ISCSITarget存谛.IrooteiSCSITargetDesktop#fdisklDiskdevsda:l.7GB,173741824bytes255heads,63sectorstrackr13G5cylindersUnits=cylindersof1665512=822528bytesSectorsize(IogicaVphysical):512bytes/512by
3、tesI/Osize(RiiniMaZoptiMl):512bytes/512bytesDiskidentifier:x9c2d6DeviceBootStartEndBlocksIdSysteadevsdal164512808831.inuxPartition1doesnotendoncylinderboundary.devsda264138699727368e1.inux1.VMBkdevsdb:8589Mr8589934592bytes55heads,63SeCtorS/track,144cylindersnitscylindersof1665512822528。bytesectorsiz
4、e(IogicaVphysical):512bytes/512bytes/0size(niniBiMi/optiBdl):512bytes/512bytesiskidentifier:创建1.VM.在此详细操作略掉.操作结果如下图:分别为liuiscsiinitator.Windowsserver2012创建逻为卷IvlinuxIvwindowsr大小都为2GB的容量。(rootISCSITargetDesktop*root0ISCSITargetDesktop#pvcreatedevsdbWritingphysicalvolumedatatodisk-devsdb-PhysicalVOlUe
5、edevsdbsuccessfullycreatedrootISCSITargetDesktop#vgcreate-s32NvgldevsdbVolumegroupvglsuccessfullycreatedroot0ISCSITargetDesktop#Ivcreate-1.2648H-nIvUnuxvgl1.ogicalvolume-lvlinuxcreatedrootISCSITargetDesktop#Ivcreate-1.248M1windowsvgllogicalvolume-Ivwindows-createdroot0ISCSITargetDesktop#logicalvolnc
6、1.VPathdevvgllvUxVGHjm1.VUUIDIVWriteAccess1.VCreationhost,tineIVStatus*open1.VSizeCurrentIBSegmentsAllocationReadaheadsectorscurrentlysettoBlockdeviceVgld4d01.jXWA0-u0Zf6FbQfHIAPlC2-t2ElRreadwriteISCSITarget,213-M-211:34:47M8eavailablee2.OGlB641inheritauto25253:2I1.VPathI1.VXjtcdevvgllvwindowsndosI1
7、.VUUID1.VWriteAccess1.VCreationhost,tife1.VStatus,open1.VSizeCurrent1.ESegmentsAUocetlonReadaheadsectorscurrentlysettoBlockdevicep3aC6-Bkv2cAGnsw2Ss5kl00juWWETVreadwflteISCSITarget,2ei3M6211:35:624MWavailablee2.66GiB641inheritauto2S6253:3在CentOS上安装iscsarg式,在这里我采纳YUM的安装方式,“.4*V”y*(rootfISS11argetDwkt
8、cpJfElistIgrtvscslIMSlUltlatorUtlU.xM64.2.8V62xi-initiator-uH-develxMM.2.911-2.fUIsscsl.86M.22.el6ZxS产MjgiMrUngtrar4tlc1cePjh*9eKSl-Or9ettlls.MMeu.M3.MQ,1MC*e*Mency99)vtlUforpMe*l-tM9et*vtlU-l.24-.eUtW*roforpKU;e1targetutil*1.e.24J.el4,MM-XRrdmy:UU4bk.%0.1(NM*(Ml.)IMbk(f*pf:%Cti-t4r9*t-utiUi.0243.14
9、.1M64KocdMHkMrKyUMfcveOs.W.1(IB,WBS1.DIWMtIt“ase:sc51-UrQet-utlB-l.eN3.l4.mMMrr0ctMi9C*Mtncy:UMbWf.M.nier4RMl.)IMbi(fr(U(*)e:SCSl-Ur*tutiU-l.e.243.4.xMM!,0Min9C*epeMencyso.HI(Mtilt)Urpck*esol-Uet-vt&b-l924).H4.M4*roMl9KeyMeuy:UUMm.M.l(64K)forc*ackQe:sitrpetutXU1.243.eU4.UMKmrl119tr411%ticnckPM*WIlbl
10、twerviXWM!l.l.-5,elwlUXIwtalled*P4c9eUbfdMOB.aMM。:l.6.l,.glt3乂Peerl-Cn*lfe*rat,09rPJC*jes3utlU.8W觥l.X4.el6VnlteIwtaUeilfiaihdOrdnyRr%lvt4.修改ISCSlTARGET的配置文件,配置文件为etctgttargets.conf,运用VimI:具修改配置文件:分别为Iinux客户端和windowsserver2012客户端it立两个targetIinuxtargetwindowstarget),将两个target关联到之前创建的IV上,并且配置.用户名和密码认证(
11、用户名和密码都为test),同时限制只有相应IP地址的客户端才能访问iscsitarget.如图:IroOtISCSITargetDesktop#vimetctgttargets.conf添加target:VtargetIqnAinux.targets*backing-storedevvgllvlinuxIncoraingusertesttestl23456789initiator-address192.168.2.55backing-storedevvgllvlinuxinitiator-address192.168.2.23incomingusertesttestl234567895 .启
12、动iscsitarget服务root0ISCSITargetDesktop#etcinit.dtgtdstartStartingSCSItargetdaemon:OKroot0ISCSITargetDesktop#6 .配置iscistarget,H务零开机启动:rootISCSITargetDesktop#Chkconfigtgtdonroot0ISCSITargetDesktop#7 .查?i当前iscistarget的运行状态:IrOOt1SCSITarqetDeSktop#ITOTSffSystemno11natonDriver:iscsiState:readyITnexusinfor
13、mation:1.UNinformation:1.UN:0Type:controllerSCSIID:IET1OSCSISN:beafl8Size:MB,Blocksize:1Online:YesRemovablemedia:NoPreventremoval:NoReadonly:NoBackingstoretype:nullBackingstorepath:NoneBackingstoreflags:Type:diskSCSIID:IET1O1SCSISN:beafllSize:2147mb.Blocksize:512Online:YesRemovablemedia:NoPreventremoval:NoReadonly:NoBackingstoretype:rdwrBackingstorepath:devvgl八VIinUXOeehiR99ReHms:Accountinformation:testAC1.information:192.168.2.55SysteniInTonnationTDriver:iscsi到此ISCSl己充汽完成,并旦可以查看到当前target的状态是正常的二.ISCSIInitiator连接I