redhat4下iSCSI安装配置与问题.doc_第1页
redhat4下iSCSI安装配置与问题.doc_第2页
redhat4下iSCSI安装配置与问题.doc_第3页
redhat4下iSCSI安装配置与问题.doc_第4页
redhat4下iSCSI安装配置与问题.doc_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

Linux下iSCSI安装配置-1 概述:环境:安装环境:Redhat Enterprise Linux 4(AS4)内核版本:linux-2.6.9_34.EL准备: 下载iSCSI启动器和目标器的rpm包1.启动器的rpm包在redhat linux安装盘里面就有:(32位CPU)iscsi-initiator-utils--3.i386.rpm(64位CPU)iscsi-initiator-utils--3.x86_64.rpm2.目标器的rpm包网上下载:/developer/iscsitarget-0.4.12-6.src.rpm二Iscsi-initiator安装32位机器#rpm -ivh iscsi-initiator-utils--3.i386.rpm64位机器#rpm -ivh iscsi-initiator-utils--3.x86_64.rpm三Iscsi-target安装1.首先通过rpmbuild将下载的iscsitarget-0.4.12-6.src.rpm包重建成3个rpm包#rpmbuild -rebuild iscsitarget-0.4.12-6.src.rpm重建之后生成以下3个rpm包,32位机器在/usr/src/redhat/RPMS/i386/目录下,64位机器在/usr/src/redhat/RPMS/x86_64/目录下。32位机器的3个rpm包如下:/usr/src/redhat/RPMS/i386/iscsitarget-0.4.12-6.i386.rpm/usr/src/redhat/RPMS/i386/iscsitarget-debuginfo-0.4.12-6.i386.rpm/usr/src/redhat/RPMS/i386/iscsitarget-kernel-0.4.12-6_2.6.9_34.EL.i386.rpm2.安装iscsitarget-kernel-0.4.12-6_2.6.9_34.EL.i386.rpm#rpm -ivh iscsitarget-kernel-0.4.12-6_2.6.9_34.EL.i386.rpm3.安装iscsitarget-0.4.12-6.i386.rpm#rpm -ivh iscsitarget-0.4.12-6.i386.rpm4.源码包的安装如下: 解压 make make install四iscsi-target配置1.检查配置(可以不要)#chkconfig -add iscsi-target#chkconfig -level 2345 iscsi-target onor #chkconfig iscsi-target on2.对target的文件/etc/ietd.conf进行修改Target iqn.2001-04.vod0:storage.disk2 IncomingUsernssl nssl #配置用户名密码#OutgoingUser Lun 0 Path=/dev/sdb,Type=fileio #配置路径#(必须) AliasVOD0 (别名) MaxConnections 6 #最大连接数#3.开启target服务# ./etc/init.d/iscsi target configuration# ./etc/init.d/iscsi-target start(restart,stop等等)五. iscsi-initiator配置1.对initiator的文件/etc/iscsi.conf进行修改DiscoveryAddress=7 #target的IP地址#(lxh:必须) OutgoingUserName=nssl #登陆用户名# OutgoingPassword=nssl #登陆密码# LoginTimeout=15 #登录时间限制#2.开启initiator服务# service iscsi start3.检查target是否挂载# cat /proc/scsi/scsi显示结果如下:Attached devices:Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: VMware, Model: VMware Virtual S Rev: 1.0 Type: Direct-Access ANSI SCSI revision: 02Host: scsi1 Channel: 00 Id: 00 Lun: 00 Vendor: IET Model: VIRTUAL-DISK Rev: 0 Type: Direct-Access ANSI SCSI revision: 044.# iscsi-ls显示结果如下*S.Net iSCSI Driver Version .4:0.1.11(12-Jan-2005)*TARGET NAME : iqn.2001-04.vod0:storage.disk2TARGET ALIAS :HOST ID : 1BUS ID : 0TARGET ID : 0TARGET ADDRESS : 7:3260,1SESSION STATUS : ESTABLISHED AT ThuMay31 16:22:37 EST 2007SESSION ID : ISID 00023d000001 TSIH 100*六Iscsi-target配置文件/etc/iscsi.conf配置详解# =# iSCSI Configuration File Sample - see iscsi.conf(5)# =# # All of the configuration parameters described in this file are applied# globally to all targets, unless they are overridden by a local setting. The# three types of local categories that can override the global settings are:#【lxh注】局部设置可覆盖全局设置的选项有:#【lxh注】目标名#【lxh注】网络描述(子网和地址)#【lxh注】SCSI路由选项(如地址)# Target Name (i.e., TargetName)# Network (i.e., Subnet or Address)# SCSI Routing Instance (i.e., DiscoveryAddress)# 【lxh注】局部设置要在新的一行用space键或tab键开头缩进,如果没有缩进的话,会被当作全局设置看待。# All parameters that are localized to one of the categories above must be# indented by at least one white space or a tab character. If the parameter is# not indented, it will be interpreted as a global parameter (see examples for# each parameter).#【lxh注】如果对于一个参数在配制文件里不止一次定义(全局或是局部),以最后一次为准。# If more that one entry exists for any given parameter (either global or# local), the last entry has precedence.#【lxh注】如果在网络设置下的参数设置与discovery address和target name下的同参数配置不同,那么以网络设置下的参数设置为准。# If a parameter setting under the network category conflicts with a different# setting of the same parameter under the discovery address or target name# category (for the same target), the network setting will have precedence.#【lxh注】如果参数没有在iscsi.conf中说明,则执行默认的配置。默认的值在readme文件中可以看到。# If a parameter is not specified in the iscsi.conf file, the default setting is# used. The default values for all parameters can be found in the readme file.# In the sample settings shown below, the following definitions apply:# = any alpha-numeric text string# = any numeric text string# = valid IP address of the form a.b.c.d/e# = valid portal address of the form a.b.c.d:e#【lxh注】网络配置# -# Network Category# -# To localize parameters to targets on a particular network (i.e., to# override the global settings), you need to use either the Subnet or# Address settings. The format for the Subnet setting is a.b.c.d/e. An# example of these settings would be:#Subnet=/24# The format for Address is a.b.c.d. An example of these settings would be:#Address=# # The following parameters can be specified using the network category:#【lxh注】网络配置的参数有:1) 连接延时设置2) 错误处理延时设置3) TCP设置# 1) Connection Timeout Settings# 2) Error Handling Timeout Settings# 3) TCP Settings#【lxh注】Discovery Address Category设置# -# Discovery Address Category# -# To localize parameters to targets found on a particular discovery address# (i.e., to override the global settings), you need to use the# DiscoveryAddress setting. The format for the DiscoveryAddress setting is# a.b.c.d, a.b.c.d:e (where e is a TCP port number), or an instance name. An# example of these settings would be:#DiscoveryAddress=# or#DiscoveryAddress=:3260# or#DiscoveryAddress=scisrouter1# The following parameters can be specified using the discovery address# category:#【lxh注】可以设置的参数有1) 权限设置2) 连接延时设置3) 持续发现设置4) 异步事件通知设置# 1) Authentication Settings# 2) ConnectionTimeout Settings# 3) Continuous Discovery settings# 4) AsyncEvent Notification Settings#【lxh注】Target name 参数# -# Target Name Category# -# To localize parameters to targets identified by a particular target name# (i.e., to override the global settings), you need to use the# TargetName setting. The format for the TargetName setting is# either the iqn or eui format. An example of these settings would be:#TargetName=.cisco:00.0d1d898e8d66.t0# The following parameters can be specified using the target name category:#【lxh注】1) CRC校验设置2) iSCSI操作参数设置3) 连接延持限制4) Session时间延持限制5) 错误处理时间延持限制6) TCP设置7) Enable/Disable targets# 1) CRC Settings# 2) iSCSI Operational Parameter settings# 3) Connection Timeout Settings# 4) Session Timeout Settings# 5) Error Handling Timeout Settings# 6) TCP Settings# 7) Enable/Disable targets# =# PARAMETERS# =#【lxh设置】权限设置# -# AUTHENTICATION SETTINGS# -#【lxh注】全局的设置用户名和密码,方便initiator对target进行权限验证# To globally configure a CHAP username and password for initiator# authentication by the target(s), uncomment the following lines:#OutgoingUsername=#OutgoingPassword=# # The maximum length for both the password and username is 256 characters.#【lxh注】设置用户名和密码的例子# An example username and password would be:# #OutgoingUsername=alice#OutgoingPassword=nty57nbe #【lxh注】全局的设置用户名和密码,方便target对initiator进行权限验证# To globally configure a CHAP username and password for target(s)# authentication by the initiator, uncomment the following lines:#IncomingUsername=#IncomingPassword=# # The maximum length for both the password and username is 256 characters.# An example username and password would be:# #IncomingUsername=bill#IncomingPassword=ghot67 #【lxh注】?# The global authentication settings can be overridden on a per discovery# address basis. An example of a unique username and password for all targets# found at address 4 would be:#DiscoveryAddress=4# OutgoingUsername=fred# OutgoingPassword=uhyt6h # and/or#DiscoveryAddress=4# IncomingUsername=mary# IncomingPassword=kdhjkd9l#DiscoveryAddress=4#DiscoveryAddress=3【lxh注】摘要设置?# -# DIGEST SETTINGS# -# To globally enable CRC32C digest checking for the header and/or data part of# iSCSI PDUs, uncomment one or both of the following lines:#HeaderDigest=always#DataDigest=always# To globally disable digest checking for the header and/or data part of# iSCSI PDUs, uncomment one or both of the following lines:#HeaderDigest=never#DataDigest=never# To globally allow the targets to control the setting of the digest checking,# with the initiator requesting a preference of enabling the checking, uncomment# one or both of the following lines: #HeaderDigest=prefer-on#DataDigest=prefer-on# To globally allow the targets to control the setting of the digest checking,# with the initiator requesting a preference of disabling the checking,# uncomment one or both of the following lines:#HeaderDigest=prefer-off#DataDigest=prefer-off# The global digest settings can be overridden on a per target name basis. An# example of enabling header and data digest checking just for target iqn.1987-# 05.com.cisco:00.0d1d898e8d66.t0 would be:#TargetName=.cisco:00.0d1d898e8d66.t0# HeaderDigest=always# DataDigest=always#【lxh注】如果initiator和target设置不一致,则login失败# It should also be noted that if the initiator and the target have incompatible# settings (e.g., target set for always and initiator set for never), the# login will fail.#【lxh注】ENABLE/DISABLE TARGETS# -# ENABLE/DISABLE TARGETS# -# To globally enable/disable group of targets use the following option.# TargetNames mentioned after the below entry will be enabled by default.#Enabled=yes# TargetNames mentioned after the below entry will be disabled by default.#Enabled=no# # To specifically enable/disable a target, use the following entry# under Targetname.#TargetName=.cisco:00.0d1d898e8d66.t0# Enabled=yes#【lxh注】连接时间延迟# -# CONNECTION TIMEOUT SETTINGS# - # To globally specify the time to wait for a login PDU to be received from# the target in response to a login request sent by the initiator before failing# the connection attempt, uncomment the following line:#LoginTimeout=# where is in seconds. A setting of 0 will result in commands never# being timed out.# IdleTimeout and ActiveTimeout determine when a ping has to be sent to check# the status of the connection when there is no traffic on the connection from# the target.# To globally specify the time to wait on a connection with no tasks active in# the session, uncomment the following line:#【lxh注】空闲时间延迟#IdleTimeout=# where is in seconds. A setting of 0 will result in a ping never# being sent.# To globally specify the time to wait on a connection with tasks active in the# session, uncomment the following line:#【lxh注】活动时间延迟#ActiveTimeout=# where is in seconds. A setting of 0 will result in a ping never# being sent.# To globally specify the time to wait for a ping response after a ping has been# sent to a target before failing the existing connection and initiating a new# one, uncomment the following line:#【lxh注】ping时间延迟#PingTimeout=# where is in seconds. A setting of 0 will result in the ping command# never timing out.#【lxh注】登录时间延迟# The global connection timeout settings can be overridden on a per target name,# discovery address or IP address basis. An example of setting the# LoginTimeout value to 12 seconds for just target iqn.1987-# 05.com.cisco:00.0d1d898e8d66.t0 would be:#TargetName=.cisco:00.0d1d898e8d66.t0# LoginTimeout=12# An example of setting the PingTimeout value to 8 seconds for just all# targets found at address 4 would be:#DiscoveryAddress=4# PingTimeout=8# An example of setting the IdleTimeout value to 3 seconds for just all# targets found on subnet 4 would be:#Subnet=/24# IdleTimeout=3#【lxh注】session时间延迟# -# SESSION TIMEOUT SETTINGS# -【lxh注】当SCSI命令执行失败时,session重建时间延迟设置# To globally specify the length of time to wait for session re-establishment# before failing SCSI commands back to the application, uncomment the# following line:# #ConnFailTimeout=# where is in seconds. A setting of 0 will result in commands never# being failed back due to connection failure.# The global session timeout settings can be overridden on a per target name# basis. An example of setting the ConnFailTimeout value to 5 seconds for# just target .cisco:00.0d1d898e8d66.t0 would be:#TargetName=.cisco:00.0d1d898e8d66.t0# ConnFailTimeout=5# If a third party multipathing application is being used,# then the ConnFailTimeout should be set to smaller value# such as 15. This value is just a guideline so the actual value will be# dependent on the users operating environment.#【lxh注】错误处理时间延持设置# -# ERROR HANDLING TIMEOUT SETTINGS# -【lxh注】全局的说明?# To globally specify the length of time to wait for an abort command to# complete before declaring the abort command has failed, uncomment the# following line:#AbortTimeout=# where is in seconds. A setting of 0 will result in commands never# being timed out.# To globally specify the length of time to wait for a reset command to complete# before declaring that the reset command has failed, uncomment the following# line:#ResetTimeout=# where is in seconds. A setting of 0 will result in commands never# being timed out.# The global error handling timeout settings can be overridden on a per target# name or per IP address basis. An example of setting the AbortTimeout value# to 10 seconds for just target .cisco:00.0d1d898e8d66.t0 would# be:#TargetName=.cisco:00.0d1d898e8d66.t0# AbortTimeout=10# An example of setting the ResetTimeout value to 6 seconds for just all# targets found on portal 4 would be:#Subnet=/24# ResetTimeout=6#【lxh注】continuous discovery设置# -# CONTINUOUS DISCOVERY SETTINGS# -【lxh注】所有的session一直保持打开状态。# To globally specify that all discovery sessions be kept open, uncomment the# following line:#Continuous=yes#【lxh注】所有的session一直保持关闭状态。# To globally specify that all discovery sessions be closed once discovery is# completed, uncomment the following line:#Continuous=no# The global continuous discovery setting can be overridden on a per target# basis. An example of setting Continuous to no for just target iqn.1987-# 05.com.cisco:00.0d1d898e8d66.t0 would be:#TargetName=.cisco:00.0d1d898e8d66.t0# Continuous=no #【lxh注】异步事件通知设置?# -# ASYNC EVENT NOTIFICATION SETTINGS# -# To globally specify that the initiator wants to receive vendor specific async # events from the target(s), uncomment the following line:#SendAsyncText=yes# To globally specify that the initiator does not want to receive vendor # specific async events from the target(s), uncomment the following line:#SendAsyncText=no# The SendAsyncText key can be specified for a particular Discovery Address.# The global async event notification setting can be overridden on a per target# basis. An example of setting SendAsyncText to no for just target iqn.1987-# 05.com.cisco:00.0d1d898e8d66.t0 would be:#TargetName=.cisco:00.0d1d898e8d66.t0# SendAysncText=no# 【lxh注】iSCSI OPERATIONAL PARAMETER SETTINGS# -# iSCSI OPERATIONAL PARAMETER SETTINGS# -# To globally enable R2T flow control (i.e., the initiator must wait for an R2T# command before sending any data), uncomment the following line:#InitialR2T=yes # To globally disable R2T flow control (i.e., the initiator has an implied# initial R2T of FirstBurstLength at offset 0), uncomment the following line:#InitialR2T=no # To globally enable immediate data (i.e., the initiator sends unsolicited data# with the iSCSI command packet), uncomment the following line:#ImmediateData=yes# To globally disable immediate data (i.e., the initiator does not send# unsolicited data with the iSCSI command PDU), uncomment the following line:#ImmediateData=no#【lxh注】数据包的最大字节数# To globally specify the maximum number of data bytes the initiator can receive# in an iSCSI P

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论