ISCSI配置手册
【共享服务】iscsi多路径配置

【共享服务】iscsi多路径配置⼀、安装部署1、前⾔普通的电脑主机都是⼀个硬盘挂接到⼀个总线上,这⾥是⼀对⼀的关系。
⽽到了有光纤组成的SAN环境,或者由iSCSI组成的IPSAN环境,由于主机和存储通过了光纤交换机或者多块⽹卡及IP来连接,这样的话,就构成了多对多的关系。
也就是说,主机到存储可以有多条路径可以选择。
主机到存储之间的IO由多条路径可以选择。
每个主机到所对应的存储可以经过⼏条不同的路径,如果是同时使⽤的话,I/O流量如何分配?其中⼀条路径坏掉了,如何处理?还有在操作系统的⾓度来看,每条路径,操作系统会认为是⼀个实际存在的物理盘,但实际上只是通向同⼀个物理盘的不同路径⽽已,这样是在使⽤的时候,就给⽤户带来了困惑。
多路径软件就是为了解决上⾯的问题应运⽽⽣的。
多路径的主要功能就是和存储设备⼀起配合实现如下功能:故障的切换和恢复IO流量的负载均衡磁盘的虚拟化为了主机可以使⽤ iSCSI 多路径访问存储设备,我们需要在主机上安装多路径设备映射器 (DM-Multipath)。
多路径设备映射器可以实现主机节点和后端存储之间的多个 I/O 路径配置为⼀个单⼀逻辑设备,从⽽可以提供链路冗余和提⾼性能。
主机通过访问包含多个 I/O 路径的逻辑设备,就可以有效提⾼后端存储系统的可靠性。
2、部署说明节点主机名节点IP⾓⾊系统版本node23066.66.66.230mon、osd CentOS7.2node23166.66.66.231mon、mds、osd、target CentOS7.2node23266.66.66.232mon、mds、osd、target CentOS7.2本次⽰例由分布式存储提供⼀个1TB⼤⼩的rbd(lun01),通过node231、node232分别创建⼀个target服务共享lun01出去,客户端node220通过iscsi分别与node231、node232建⽴连接注:以下操作均在initiator端node220节点下执⾏2.1、initiator与target建⽴连接node220节点分别通过节点node231、node232与lun01建⽴连接,映射到本地磁盘下lun01通过node231、node232两个节点两条链路映射到node220节点下,映射盘符为sdc和sdd[root@node220 ~]# iscsiadm -m discovery -t st -p 66.66.66.23166.66.66.231:3260,1 :target01[root@node220 ~]# iscsiadm -m discovery -t st -p 66.66.66.23266.66.66.232:3260,1 :target01[root@node220 ~]# iscsiadm -m node -T :target01 --loginLogging in to [iface: default, target: :target01, portal: 66.66.66.231,3260] (multiple)Logging in to [iface: default, target: :target01, portal: 66.66.66.232,3260] (multiple)Login to [iface: default, target: :target01, portal: 66.66.66.231,3260] successful.Login to [iface: default, target: :target01, portal: 66.66.66.232,3260] successful.[root@node220 ~]# iscsiadm -m node ll66.66.66.231:3260,1 :target0166.66.66.232:3260,1 :target01[root@node220 ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 223.6G 0 disk└─md126 9:126 0 212.4G 0 raid1├─md126p1 259:0 0 200M 0 md /boot/efi├─md126p2 259:1 0 500M 0 md /boot└─md126p3 259:2 0 211.7G 0 md├─centos-root 253:0 0 50G 0 lvm /├─centos-swap 253:1 0 4G 0 lvm [SWAP]└─centos-home 253:2 0 157.7G 0 lvm /homesdb 8:16 0 223.6G 0 disk└─md126 9:126 0 212.4G 0 raid1├─md126p1 259:0 0 200M 0 md /boot/efi├─md126p2 259:1 0 500M 0 md /boot└─md126p3 259:2 0 211.7G 0 md├─centos-root 253:0 0 50G 0 lvm /├─centos-swap 253:1 0 4G 0 lvm [SWAP]└─centos-home 253:2 0 157.7G 0 lvm /homesdc 8:32 0 1T 0 disksdd 8:48 0 1T 0 disk2.2、multipath配置安装multipath软件[root@node220 ~]# yum install -y device-mapper-multipath[root@node220 ~]# rpm -qa | grep multipathdevice-mapper-multipath-0.4.9-123.el7.x86_64device-mapper-multipath-libs-0.4.9-123.el7.x86_64⽣成multipath配置执⾏命令mpathconf --enable,在/etc⽬录下⽣成配置⽂件multipath.conf[root@node220 ~]# mpathconf --enable修改multipath配置修改配置⽂件/etc/mulipath.conf信息如下,之后执⾏命令systemctl restart multipathd 重启服务[root@node220 ~]# cat /etc/multipath.confdefaults {user_friendly_names yes}设置⿊名单列表,⽰例环境sda、sdb磁盘为系统RAID盘,故⽽排除blacklist {devnode "^sd[a-b]"}multipaths {multipath {path_grouping_policy multibus#path_checker readsector0prio "random"path_selector "round-robin 0"}}devices {device {vendor "vcluster"product "12.2.12"path_checker readsector0path_selector "round-robin 0"failback immediateno_path_retry fail}}[root@node220 ~]# systemctl restart multipathd查看multipath状态此时本地可以看到新增的虚拟磁盘/dev/mapper/mpathc ,该虚拟磁盘通过两条iscsi路径提供,当前配置为主备模式(同⼀时刻只有⼀条路径处于活动状态,可写⼊数据)[root@node220 ~]# multipath -llmpathc (360000000000000000e00000000150001) dm-3 vcluster,VIRTUAL-DISKsize=1.0T features='0' hwhandler='0' wp=rw|-+- policy='service-time 0' prio=1 status=enabled| `- 45:0:0:1 sdc 8:32 active ready running`-+- policy='service-time 0' prio=1 status=active`- 46:0:0:1 sdd 8:48 active ready running[root@node220 ~]# lsblkNAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTsda 8:0 0 223.6G 0 disk└─md126 9:126 0 212.4G 0 raid1├─md126p1 259:0 0 200M 0 md /boot/efi├─md126p2 259:1 0 500M 0 md /boot└─md126p3 259:2 0 211.7G 0 md├─centos-root 253:0 0 50G 0 lvm /├─centos-swap 253:1 0 4G 0 lvm [SWAP]└─centos-home 253:2 0 157.7G 0 lvm /homesdb 8:16 0 223.6G 0 disk└─md126 9:126 0 212.4G 0 raid1├─md126p1 259:0 0 200M 0 md /boot/efi├─md126p2 259:1 0 500M 0 md /boot└─md126p3 259:2 0 211.7G 0 md├─centos-root 253:0 0 50G 0 lvm /├─centos-swap 253:1 0 4G 0 lvm [SWAP]└─centos-home 253:2 0 157.7G 0 lvm /homesdc 8:32 0 1T 0 disk└─mpathc 253:3 0 1T 0 mpathsdd 8:48 0 1T 0 disk└─mpathc 253:3 0 1T 0 mpath[root@node220 ~]# cat /proc/partitionsmajor minor #blocks name8 16 234431064 sdb8 0 234431064 sda9 126 222715904 md126259 0 204800 md126p1259 1 512000 md126p2259 2 221997056 md126p3253 0 52428800 dm-0253 1 4194304 dm-1253 2 165310464 dm-28 32 1073741824 sdc8 48 1073741824 sdd253 3 1073741824 dm-32.3、multipath验证验证multipath效果,看能否实现活动路径故障,备⽤路径接管写⼊的效果将多路径设备/dev/mapper/mpathc挂载到本地⽬录/client下,通过vdbench持续读写数据查看multipath主链路为node232节点,映射磁盘为/dev/sdd停⽌multipath主链路node232节点的target服务,客户端读写未出现中断情况此时multipath主链路切换⾄node231节点下查看multipath状态,主链路切换⾄node231节点下查看/var/log/messages⽇志打印,multipath检测到sdd磁盘异常,标记为fail状态,当前链路数为1 查看磁盘流量,此时磁盘读写流量切换⾄sdc磁盘下当恢复node232节点target服务之后,node232节点重新加⼊到multipath备链路下⼆、常⽤操作1、常⽤命令加载内核模块: modprobe dm-multipath; modprobe dm-round-robin刷新所有多路径配置: multipath -F查看多路径: multipath -ll。
iscsi配置

ISCSI配置过程为了配合安检项目虚拟ISCSI设备,然后使用另外一个linux作为ISCSI客户端连接。
根据RFC3270的定义,ISCSI分为Target和Initiator,其中Target是IP-SAN设备,而Initiator 为IP-SAN客户端,即使用IP-SAN的设备。
一、配置虚拟IP-SAN设备的方法(1)先选定使用哪个存储设备作为IP-SAN的存储磁盘,可以选择多个,如/dev/had等,为了便于模拟,可以在linux现有文件系统中虚拟一个磁盘设备,方法如下:》mkdir -p /var/lib/xen/images》dd if=/dev/zero of=/var/lib/xen/images/xen-0 seek=1M bs=4096 count=1(2)下载安装iSCSI Enterprise Target,/projects/iscsitarget/files/(3)安装iSCSI Enterprise Target>make kernel>make usr>make install(4)配置/etc/iet/ietd.conf不考虑用户名密码情况下配置方式如下:iSNSServer 192.168.139.166Target .example:storage.disk2.sys1.xyzLun 4 Path=/var/lib/xen/images/xen-0,Type=fileioAlias sdb其中Lun可以配置多个,以达到多个磁盘的目的。
(5)启动服务》/etc/init.d/iscsi-target start(6)查看服务是否工作正常1.dmesg查看是否有错误输出2.cat /proc/net/iet/volumetid:1 name:.example:storage.disk2.sys1.xyzlun:4 state:0 iotype:fileio iomode:wt blocks:8388616 blocksize:512 path:/var/lib/xen/images/xen-03.cat /proc/net/iet/session,可以参考目前有哪些连接二、Linux连接IP-SAN设备的方法(1)安装iscsi-linux软件包,一般系统默认安装都有这个(2)配置/etc/iscsi.conf文件DiscoveryAddress=192.168.139.166:3260其他用户名密码如果需要也需要配置上(3)启动/etc/ini.d/iscsi start(4)执行> chkconfig –list iscsiiscsi 0:off 1:off 2:off 3:off 4:off 5:off 6:off(5)执行> chkconfig –add iscsi执行>chkconfig iscsi on(6)检查是否生效:> chkconfig –list iscsiiscsi 0:off 1:off 2:on 3:on 4:on 5:on 6:off(7)执行iscsi-ls命令,查看设备是否生效******************************************************************************* SFNet iSCSI Driver Version ...4:0.1.11(12-Jan-2005)******************************************************************************* TARGET NAME : .example:storage.disk2.sys1.xyzTARGET ALIAS :HOST ID : 4BUS ID : 0TARGET ID : 0TARGET ADDRESS : 192.168.139.166:3260,1SESSION STATUS : ESTABLISHED AT Tue Nov 2 10:37:31 CST 2010 SESSION ID : ISID 00023d000001 TSIH 300******************************************************************************* (7)执行iscsi-ls –l 命令,查看ISCSI设备对应的设备名*************************************************************************** ****SFNet iSCSI Driver Version ...4:0.1.11(12-Jan-2005)*************************************************************************** ****TARGET NAME : .example:storage.disk2.sys1.xyzTARGET ALIAS :HOST ID : 4BUS ID : 0TARGET ID : 0TARGET ADDRESS : 192.168.139.166:3260,1SESSION STATUS : ESTABLISHED AT Tue Nov 2 10:37:31 CST 2010SESSION ID : ISID 00023d000001 TSIH 300DEVICE DETAILS:---------------LUN ID : 4Vendor: IET Model: VIRTUAL-DISK Rev: 0Type: Direct-Access ANSI SCSI revision: 04page83 type1: 4945540000000000b8c4ba11d91f7f2176be1b9e865c2560page80: 62386334626131316439316637663231373662653162396538363563323536300aDevice: /dev/sdaiSCSI Transport Class version 2.0-871version 2.0-871Target: .example:storage.disk2.sys1.xyzCurrent Portal: 10.0.32.165:3260,1Persistent Portal: 10.0.32.165:3260,1**********Interface:**********Iface Name: defaultIface Transport: tcpIface Initiatorname: .redhat:f3e098a41b5bIface IPaddress: 10.0.32.166Iface HWaddress: <empty>Iface Netdev: <empty>SID: 1iSCSI Connection State: LOGGED INiSCSI Session State: LOGGED_INInternal iscsid Session State: NO CHANGE************************Negotiated iSCSI params:************************HeaderDigest: NoneDataDigest: NoneMaxRecvDataSegmentLength: 262144MaxXmitDataSegmentLength: 8192FirstBurstLength: 65536MaxBurstLength: 262144ImmediateData: YesInitialR2T: YesMaxOutstandingR2T: 1************************Attached SCSI devices:************************Host Number: 13 State: runningscsi13 Channel 00 Id 0 Lun: 0Attached scsi disk sdb State: running****(8)然后需要使用fdisk对/dev/sda设备进行分区,可以分多个区,也可以分一个区>fdisk /dev/sda进入fdisk后,输入n,然后p,然后1等根据提示进行分区操作。
Lnux iscsi发现配置手册

[root@lvs-master /]# fdisk /dev/sdb
Command (m for help): h
h: unknown command
Command action
First data block=1
Maximum filesystem blocks=67108864
8 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
[root@lvs-master ha.d]# vi /etc/iscsi/initiatorname.iscsi
InitiatorName=.openfiler:tsn.f55c3f05bbcc
[root@lvs-master ha.d]# iscsiadm -m discovery -t sendtargets -p 192.168.88.246
First cylinder (1-1016, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1016, default 1016): 1016
iSCSI Initiator配置总结

iSCSI Initiator配置总结一、Redhat5iSCSI基本配置:1. 执行/etc/init.d/iscsi start启动iSCSI服务。
2. 修改配置文件/etc/iscsi/iscsid.conf,设置node.startup=automatic自动登录目标器。
3. 执行iscsiadm -m discovery -t st -p [targetip] 来查找目标器4. 在阵列上将扫描到的端口添加给对应的主机并映射LUN。
5. 执行iscsiadm -m node -p [targetip] -l来注册目标器6. 执行chkconfig iscsi on将iscsi服务设置为开机自动启动7. 执行fdisk -l就可以扫描到映射给主机的LUN了注:① 与第5步相反的操作是iscsiadm –m node –p [targetip] –u,这个命令用于将目标器从系统中注销。
② 第2步和第6步的作用为开机自重启iSCSI服务,直接执行fdisk -l就可以自动扫描到映射给主机的LUN(包括命令设备)。
CHAP配置:1. 对一个目标器添加CHAP认证,依次执行如下3条命令:iscsiadm -m node -o update -p [targetip] -n node.session.auth.authmethod -v CHAPiscsiadm -m node -o update -p [targetip] -n ername -v [chap user name]iscsiadm -m node -o update -p [targetip] -n node.session.auth.password -v [Chap auth passwd]2. 在阵列侧对该目标器配置同样的用户名和密码;请参考阵列操作指导。
3. 执行/etc/init.d/iscsi restart重启iSCSI服务。
AIX iscsi 设置方法

AIX 5.3/6.1操作系统Initiator软件安装和配置指导书1 安装环境:1.1 应用系统信息操作系统版本:IBM AIX 5.3(补丁级别:5300-02)内核版本:Initiator版本:AIX iSCSI SW (Ethernet SAN) Initiator for AIX 5.3.0.20操作系统版本:IBM AIX 6.1(补丁级别:6100-00-01-0748)内核版本:Initiator版本:AIX iSCSI SW (Ethernet SAN) Initiator for AIX 6.1.0.02 Initiator安装过程2.1 软件安装AIX 5.3/6.1 默认安装iscsi initiator软件。
如下命令确认系统是否安装相应软件包:AIX 5.3AIX 6.1也可执行下列命令查看,显示Available即为已安装iscsi软件。
说明:●如果系统没有安装iSCSI HBA卡,则软件iSCSI initiator对应为iscsi0,否则则往后递推:如果安装2块iSCSI HBA卡,则HBA对应为iscsi0和iscsi1,软件iSCSI initiator对应为iscsi2。
3 软件配置过程3.1 配置initiator名称(1) step1(进入配置界面)(2) step2(选择适配器)执行smit iscsi之后,会进入如下界面,选择“iSCSI Protocol Device”(3) step3(选择适配器)确定后会进入如下界面,选择“Change / Show Characteristics of an iSCSI Protocol Device”(4) step4(选择适配器)确定之后会进入如下界面,如果没有安装HBA卡的话iscsi software intiator应该对应为iscsi0。
本系统安装了2块iSCSI HBA卡(对应为iscsi0和iscsi1),所以iscsisoftware intiator对应变为iscsi2。
iscsiHBA卡操作手册

i s c s i H B A卡操作手册文档编制序号:[KKIDT-LLE0828-LLETD298-POI08]一SANsurfer ISCSI HBA Manager 配置1、连接主机:1、打开SANsurfer程序;2、在Enter host name or IP address提示框中输入包含该主机的DNS名称。
然后点击Connectto Host dialog窗口中的Connect按钮。
3、由于所使用的iSCSI卡还没有被配置,所以会弹出一个提示框显示检测到一个未被配置的端口。
选中Do not show this dialog again for this session并点击No;4、在成功登陆后,一些有关主机的概要信息和一个HBA和带有iSCSI Qualified Names (IQNs)的端口号的列表会被显示出来;看到上图所示表明已经成功连接到主机的iSCSI卡了。
2、配置iSCSI HBA的网络连接:1、启动SANsurfer程序,选择左侧iSCSI HBA目录下的Port 0端口,然后点击Port Options 标签,然后再点击Network标签,即可看到如下图所示:动态IP地址2、点击Obtain an IP address automatically,再点击Obtain DNS server address automatically...., 然后点击Save Port Settings。
3、对于地址的一个配置要求重新设置适配卡,下图显示了当应用程序进入与此适配卡连接的逻辑驱动器时需要先卸载的警告提示,点击Yes接受。
4、然后会提示输入SANsurfer的密码,输入并点击OK,SANsurfer的默认密码是config。
5、在网络设置被保存后,配置需要重新刷新,点击Yes来刷新配置。
6、在配置刷新执行完成后,IP地址即可从DHCP分配获得。
配置静态IP地址7、选择左侧iSCSI HBA目录下的Port 1端口,如下图:8、输入IP address, subnet mask, default gateway和DNS server的地址,然后点击Save PortSettings。
iSCSI磁盘阵列配置

iSCSI磁盘阵列配置磁盘阵列操作手册1.连接磁盘阵列管理端口,IP地址为192.168.0.200,注意自己网卡IP地址要在192.168.0.0网段。
2.在浏览器中输入192.168.0.200 或者192.168.0.200/index 回车即可见盘阵登陆界面如下图所示,选择Configration模式登陆,默认密码为空。
3.登陆后界面如下(因图形化界面故加载需要等待几秒时间):4.创建Raid选择左侧目录中Logical Drive选项,随即展开,选择Create Logical Drive开始创建Raid ,在右侧图示盘阵格中选择要加入Raid 组的相应位置的硬盘。
图示中选择了12块硬盘,选中的硬盘被高亮边框标记。
磁盘阵列图示下为可选参数、Raid级别等,一般只要规划选择Raid Level即可,其余选项不推荐修改。
选择Raid5+Spare Drive之后磁盘阵列图例呈一下状态:其中自动选择第一个硬盘为热备盘,也可以先做Raid,然后另选热备盘。
用鼠标选中已经创建的Riad组,下方会出现该组的事实情况,请重点注意下方百分比值,该值为Raid创建完成百分比,百分比达到100%时Raid创建成功。
注:第4部操作一旦操作完成,请不要改动,因为删除和重建raid会造成盘阵数据丢失!5.分区:很多时候一个Raid组要划分成若干分区分配给不同服务器使用,分区操作如下:选中盘阵图例,下方会出现Partation选项,点击后会出现当前盘阵分区情况和操作按钮,[+]的意义为从该分区中拆分出分区,而不是向其添加分区。
[-]为删除该分区。
分区前请确保该要操作的分区没有数据,且没有被使用,并且在使用[-]删除分区操作时,该分区容量会自动与上一分区合并,因此删除之前要确保上一分区没有业务应用,因此强烈建议对分区要先规划好,后期对分区的频繁改动,不利于数据的安全性下图为输入要添加分区的容量,单位为M B:6.创建映射:创建好分区后,要将分区映射到端口上才可以在该端口对分区进行读写操作,选择Host Lun即可实现映射的创建。
solaris iscsi配置手册

Using Sun ZFS Storage Appliance iSCSI LUNs in an Oracle Solaris EnvironmentUpdated May 2012; v1.2By Andrew NessThis article describes how to configure iSCSI LUNs in a Sun ZFS Storage Appliance and integrate them into an Oracle Solaris 10 or Oracle Solaris 11 environment.ContentsIntroduction Configuring the Oracle Solaris iSCSI Initiator Identifying the Host IQN Setting Up CHAP Authentication Configuring the Sun ZFS Storage Appliance Using the Browser User Interface Defining an iSCSI Target Group Defining an iSCSI Initiator Defining the iSCSI Initiator Group Defining a Sun ZFS Storage Appliance Project Defining a Sun ZFS Storage Appliance LUN Configuring the Sun ZFS Storage Appliance Using the Command Line Interface Defining the iSCSI Target Group Defining the iSCSI Initiator Defining the iSCSI Initiator Group Defining a Sun ZFS Storage Appliance Project Defining a Sun ZFS Storage Appliance LUN Configuring the LUN for Use by the Oracle Solaris Server Conclusion IntroductionOracle Solaris 10 and Oracle Solaris 11 come supplied with a software iSCSI initiator package that you can configure to integrate iSCSI LUNs presented by the Sun ZFS Storage Appliance into the Oracle Solaris environment. This article describes how to install the Oracle Solaris iSCSI initiator and how to configure the Sun ZFS Storage Appliance to set up iSCSI LUNs for access by Oracle Solaris servers using either the browser user interface (BUI) or the command line interface (CLI) of the appliance.This article assumes the following conditions:• A known root password for the Sun ZFS Storage Appliance• A known IP address or hostname of the Sun ZFS Storage Appliance• A network used by the Sun ZFS Storage Appliance that is already configured•Existing configured pools with sufficient free space available on the ZFS Storage Appliance • A known root password for the Oracle Solaris serverConfiguring the Oracle Solaris iSCSI InitiatorAll Oracle Solaris iSCSI initiator commands are issued as arguments to theiscsiadm(1M)command. To check that the iSCSI service is running, complete the following steps:1. Log in as root.2. Enter:root@solaris:~# svcs iscsi/initiatorSTATE STIME FMRIonline 11:38:33 svc:/network/iscsi/initiator:defaultIn this example, the output from the svcs(1M)command shows that the state of the initiator is online. If the output shows that the initiator state is offline, maintenance or disabled, the svcadm(1m) command can be used to bring the service into the online state. See the manual page for svcs and svcadm for details.Identifying the Host IQNThe iSCSI Qualified Name (IQN) of the host is used to identify the host to the Sun ZFS Storage Appliance and is needed to complete the configuration procedure in this article.To find the IQN for the host, enter:root@solaris:~# iscsiadm list initiator-nodeInitiator node name: .sun:01:80ca413901ff.4e1c1a40Initiator node alias: solarisLogin Parameters (Default/Configured):Header Digest: NONE/-Data Digest: NONE/-Authentication Type: NONERADIUS Server: NONERADIUS Access: disabledTunable Parameters (Default/Configured):Session Login Response Time: 60/-Maximum Connection Retry Time: 180/-Login Retry Time Interval: 60/-Configured Sessions: 1root@solaris:~#The IQN for the host used in this example is.sun:01:80ca413901ff.4e1c1a40.Setting Up CHAP AuthenticationIn the example in this article, CHAP is used to authenticate communication between the host and the Sun ZFS Storage Appliance. The IQN is used as the CHAP name for the iSCSI initiator and the reasonably secure password CHAPsecret11is used for the CHAP secret.To configure CHAP authentication, follow the example:root@solaris:~# iscsiadm modify initiator-node -a CHAProot@solaris:~# iscsiadm modify initiator-node-H .sun:01:80ca413901ff.4e1c1a40root@solaris:~# iscsiadm modify initiator-node -CEnter secret: CHAPsecret11Re-enter secret: CHAPsecret11root@solaris:~# iscsiadm list initiator-nodeInitiator node name: .sun:01:80ca413901ff.4e1c1a40Initiator node alias: solarisLogin Parameters (Default/Configured):Header Digest: NONE/-Data Digest: NONE/-Authentication Type: CHAPCHAP Name: .sun:01:80ca413901ff.4e1c1a40RADIUS Server: NONERADIUS Access: disabledTunable Parameters (Default/Configured):Session Login Response Time: 60/-Maximum Connection Retry Time: 180/-Login Retry Time Interval: 60/-Configured Sessions: 1Configuring the Sun ZFS Storage Appliance Using the Browser User InterfaceAs a unified storage platform, the Sun ZFS Storage Appliance supports access to block-protocol LUNs using iSCSI and Fibre Channel protocols. This section describes how to use the Sun ZFS Storage Appliance BUI to configure the Sun ZFS Storage Appliance to recognize the Oracle Solaris host and present iSCSI LUNs to it.To open the Sun ZFS Storage Appliance BUI:1. Enter an address in the address field of a Web browser that includes the IP address orhostname of the Sun ZFS Storage Appliance:https://<ip-address or hostname>:215The login dialog shown in Figure 1 is displayed.Figure 1. ZFS Storage Appliance login2. Enter a Username and Password and click LOGIN.To identify the Oracle Solaris Server to the Sun ZFS Storage Appliance, an iSCSI target group must be created and iSCSI initiator and initiator groups defined. These steps are described in the following sections.Defining an iSCSI Target GroupA target group is created on the Sun ZFS Storage Appliance to define the ports and the protocol by which the LUN to be presented to the Oracle Solaris server is accessed. For this example, an iSCSI target group is created that contains the LUN as an iSCSI target that is identified by the default IQN for the Sun ZFS Storage Appliance and presented over default appliance interfaces. Since CHAP will be used for authentication between the storage and the host, CHAP parameters are also specified in this example.To define an iSCSI target group on the Sun ZFS Storage Appliance, complete these steps:1. Click Configuration > SAN to display the Storage Area Network (SAN) screen seen in Figure2.2. Click the Targets tab at the right and then select iSCSI Targets at the top of the left panel asshown in Figure 2.Figure 2. iSCSI target configuration3. Click the + icon to the left of iSCSI Targets to display the New iSCSI Target dialog shown inFigure 3.4. Enter an alias for the target and select the Initiator authentication mode (for this example, CHAPis selected).5. Enter the Target CHAP name and a Target CHAP secret that is different from the secret usedfor the iSCSI initiator. For this example, chapuser and CHAPsecret22 are used.Figure 3. New iSCSI Target dialog screen6. Click OK to confirm.7. To create an iSCSI target group that includes the iSCSI target just defined, place the cursor overthe new iscsi-Targets entry in the left panel. The Move icon appears to the left of the entry as shown in Figure 4.Figure 4. The Move icon displayed to the left of the selected iSCSI target entry8. Click the icon and drag it to the iSCSI Target Groups panel on the right. A new entry appearsat the bottom of the iSCSI Target Groups column as shown in Figure 5 (highlighted in yellow).Move the cursor over the new target group and release the mouse button. A new iSCSI target group is created with a name targets-n, where n is an integer, as displayed in Figure 5.Figure 5. Creating the iSCSI target group9. Move the cursor over the entry for the new target group. Two icons appear to the right of thetarget group box as shown in Figure 6.Figure 6. Selecting the target group for editing10. Click the Edit icon () to display the dialog screen in Figure 7.11. In the Name field, replace the default name with the name to be used for the iSCSI target groupand click OK. For this example, the name iscsi-TG is used.Figure 7. Renaming the iSCSI target group12. Click APPLY. The changes are shown in the iSCSI Targets panel on the left in Figure 8.Figure 8. New iSCSI target group with changes appliedDefining an iSCSI InitiatorBy defining an iSCSI initiator, you can allow access from one or more servers to particular volumes. You should configure access to volumes so that a minimum number of iSCSI initiators are allowed to access a particular volume. If more than one host can write to a given volume concurrently and a non-shared file system is used, inconsistencies may occur in file system caches on the hosts that can ultimately lead to corruption of the on-disk image. Typically, a single initiator is given access to a volume, unless you are using a specialized cluster file system.The iSCSI initiator serves to define the “host” to the Sun ZFS Storage Appliance. The iSCSI initiator definition contains the host IQN. To identify the Oracle Solaris server to the Sun ZFS Storage Appliance, you must register the Oracle Solaris iSCSI initiator IQN with the appliance by completing the following steps:1. Click Configuration >SAN to display the Storage Area Network (SAN) screen shown in Figure 9.2. Click the Initiators tab at the right and then select iSCSI Initiators at the top of the left panel asshown in Figure 9.Figure 9. Selecting the SAN Configuration screen3. Click the + icon to the left of iSCSI Initiators to display the New iSCSI Initiator dialog shown inFigure 10.4. Enter the Initiator IQN for the Oracle Solaris server (see the preceding section "Identifying theHost IQN" for how to obtain the Initiator IQN).5. Enter a more meaningful symbolic name as the Alias.6. If CHAP authentication has been set up (see the previous section Setting Up CHAPAuthentication), check the Use CHAP option. Enter the CHAP name in the Initiator CHAPname field and enter the password in the Initiator CHAP secret field as shown in Figure 10.The CHAP name and password must be identical to those defined in the host configuration.Figure 10. Providing a new iSCSI initiator definition7. Click OK.Defining the iSCSI Initiator GroupYou can combine related iSCSI initiators into logical groups in order to simultaneously execute single commands on multiple iSCSI initiators; for example, using one command to assign LUN access to all iSCSI initiators in a group. For this example, the iSCSI initiator group will contain one initiator, but in a cluster, where multiple servers are treated as a single logical entity, the initiator group may contain multiple initiators.To create an iSCSI initiator group, complete these steps:1. Select Configuration > SAN to display the Storage Area Network (SAN) screen.2. Select the Initiators tab at the right and then click iSCSI Initiators at the top of the left panel.3. Place the cursor over the entry for the iSCSI initiator created in the previous section. The Moveicon appears to the left of the entry as shown in Figure 11.Figure 11. Displaying the Move icon for a new iSCSI Initiator4. Click the icon and drag it to the iSCSI Initiator Groups panel on the right. A new entry appearsat the bottom of the iSCSI Initiators Groups panel as shown in Figure 12 (highlighted in yellow).Move the cursor over the new entry box and release the mouse button. A new iSCSI initiator group is created with a name initiators-n, where n is an integer as shown in Figure 12.Figure 12. Creating the iSCSI initiator group5. Move the cursor over the entry for the new initiator group. Several icons appear to the right ofthe target group box as shown in Figure 13.Figure 13. Selecting the iSCSI initiator group6. Click the Edit icon () to display the dialog in Figure 14.7. In the Name field, replace the default name with the name to be used for the iSCSI initiatorgroup and click OK. For this example, the name sol-servers is used.Figure 14. Renaming the iSCSI initiator group8. Click APPLY on the SAN configuration screen to confirm all the modifications as shown inFigure 15.Figure 15. Completed iSCSI initiator and initiator group configurationsDefining a Sun ZFS Storage Appliance ProjectTo group related volumes, you can define a project in the Sun ZFS Storage Appliance. A project allows inheritance of properties for file systems and LUNs presented from the project and also allows you to apply quotas and reservations.To create a project, complete the following steps:1. Select Shares > Projects to display the Projects screen as shown in Figure 16.Figure 16. Viewing a project2. Click the + icon to the left of Projects at the top of the left panel to display the Create Projectdialog shown in Figure 17.Figure 17. Create Project dialog screen3. To create a new project, enter a Name for the project and click APPLY. A new project appearsin the Projects list in the left panel.4. Select the new project to view the components that comprise the project as shown in Figure 18.Figure 18. Displaying the new project sol-projectDefining a Sun ZFS Storage Appliance LUNA LUN must now be created from an existing pool of storage resources which the Oracle Solaris server will access. For this example, a thin-provisioned 64GB LUN called DocArchive1 is created.The target group will be the iSCSI target group created in the section "Defining an iSCSI Target Group"to ensure that this LUN can be accessed using iSCSI protocol. The initiator group defined in the section "Defining the iSCSI Initiator Group"will be used to ensure that only the server(s)defined in the sol-servers group can access this LUN. (In this example, this group contains only one server.)To create a target group, complete the following steps:1. Select Shares > Projects to display the Projects screen.2. In the Projects panel at the left, select the project (sol-project). Then select LUNs at the topof the panel at the right as shown in Figure 19.Figure 19. Selecting Shares > Projects > LUNs3. Click the + icon to the left of LUNs to display the Create LUN dialog shown in Figure 20.4. Enter values as appropriate to set up the LUN. For this example, set the Name toDocArchive1, the Volume size to 64 GB, and check the box next to Thin provisioned. Set the Target Group to the iSCSI target group iscsi-TG and the Initiator Group to sol-servers. Set the Volume block size to 32K as the volume will hold a ZFS file system.Figure 20. New LUN dialog window5. Click APPLY to create the LUN and make it available to the Oracle Solaris server. Configuring the Sun ZFS Storage Appliance Using the Command Line InterfaceAs a unified storage platform, the Sun ZFS Storage Appliance supports access to block-protocol LUNs using iSCSI and Fibre Channel protocols. This section describes how to use the Sun ZFS Storage Appliance CLI to configure the Sun ZFS Storage Appliance to recognize the Oracle Solaris host and present iSCSI LUNs to it.You must access the CLI using an SSH-enabled terminal session. On a host that has an available SSH client, enter the following:user@host> ssh root@zfssa-ip-address-or-hostnamelogin as: rootUsing keyboard-interactive authentication.Password: XXXXXLast login: Mon Jul XX XX:XX:XX XXXX from desktopzfssa:>Navigation follows a similar pattern in the CLI as in the browser user interface; paths used in CLI commands often correspond to paths delineated through tabs and screens in the BUI.Defining the iSCSI Target GroupBy defining a target group on the Sun ZFS Storage Appliance, you can specify which ports and protocols to use to access a LUN. You can assign the LUN to a particular target group when you create it, or you can add it later by editing the target group. The following example creates an iSCSI target group consisting of a single iSCSI target which is defined, using a default IQN, to allow a LUN to be presented through the appliance’s default ports using iSCSI protocol.Since CHAP will be used for authentication between the storage and the host, CHAP parameters are also specified in this example.zfssa:>configuration san targetszfssa:configuration san targets>iscsizfssa:configuration san targets iscsi>createzfssa:configuration san targets iscsi target (uncommitted)>set alias=iscsi-Targetalias = iscsi-Target (uncommitted)zfssa:configuration san targets iscsi target (uncommitted)>commitzfssa:configuration san targets iscsi>listTARGET ALIAStarget-000 iscsi-Target|+-> IQN.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 zfssa:configuration san targets iscsi>select target-000zfssa:configuration san targets iscsi target-000>listProperties:alias = iscsi-Targetiqn = .sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881auth = nonetargetchapuser = (unset)targetchapsecret = (unset)interfaces = nge0zfssa:configuration san targets iscsi target-000>set targetchapuser=.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881targetchapuser = .sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 (uncommitted)zfssa:configuration san targets iscsi target-000>set targetchapsecret=CHAPsecret11targetchapsecret = ************ (uncommitted)zfssa:configuration san targets iscsi target-000>commitzfssa:configuration san targets iscsi target-000>listProperties:alias =iqn =auth =targetchapuser = .sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881targetchapsecret = ************interfaces =zfssa:configuration san targets iscsi target-000>cd ..zfssa:configuration san targets iscsi>listTARGET ALIAStarget-000 iscsi-Target|+-> IQN.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 zfssa:configuration san targets iscsi>groupzfssa:configuration san targets iscsi groups>createzfssa:configuration san targets iscsi group (uncommitted)>set name=iscsi-TGname = iscsi-TG (uncommitted)zfssa:configuration san targets iscsi group (uncommitted)>set targets=.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881targets = .sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 (uncommitted)zfssa:configuration san targets iscsi group (uncommitted)>commitzfssa:configuration san targets iscsi groups>listGROUP NAMEgroup-000 iscsi-TG|+-> TARGETS.sun:02:e8589be5-144d-c9b2-89d4-f7fe4e887881 zfssa:configuration san targets iscsi groups>cd /zfssa:>Defining the iSCSI InitiatorBy defining an iSCSI initiator, you can restrict which servers have access to a particular volume. If more than one host can write to a given volume concurrently, inconsistency in file system caching between hosts can cause corruption in the on-disk image. Typically, a single initiator is given access to a volume, unless you are using a specialized cluster file system.The iSCSI initiator is the “host” as defined by the Sun ZFS Storage Appliance. To define the Oracle Solaris server as an iSCSI initiator with an alias solaris, you must register the iSCSI IQN for the Oracle Solaris server with the appliance, as shown in the following example.zfssa:>configuration san initiatorszfssa:configuration san initiators>iscsizfssa:configuration san initiators iscsi>lsChildren:groups => Manage groupszfssa:configuration san initiators iscsi>createzfssa:configuration san initiators iscsi initiator (uncommitted)>set alias=solarisalias = solaris (uncommitted)zfssa:configuration san initiators iscsi initiator (uncommitted)>set initiator=.sun:01:80ca413901ff.4e1c1a40initiator = iqn.1986-.sun:01:80ca413901ff.4e1c1a40 (uncommitted)zfssa:configuration san initiators iscsi initiator (uncommitted)>set chapuser=.sun:01:80ca413901ff.4e1c1a40chapuser = iqn.1986-.sun:01:80ca413901ff.4e1c1a40 (uncommitted)zfssa:configuration san initiators iscsi initiator (uncommitted)>set chapsecret=CHAPsecret11chapsecret = ************ (uncommitted)zfssa:configuration san initiators iscsi initiator (uncommitted)>commitzfssa:configuration san initiators iscsi> lsInitiators:NAME ALIASinitiator-000 solaris|+-> INITIATOR.sun:01:80ca413901ff.4e1c1a40Children:groups => Manage groupszfssa:configuration san initiators iscsi>Defining the iSCSI Initiator GroupYou can combine related iSCSI initiators into logical groups in order to simultaneously execute single commands on multiple iSCSI initiators; for example, using one command to assign LUN access to all iSCSI initiators in a group. For this example, the iSCSI initiator group will contain one initiator, but in a cluster, where multiple servers are treated as a single logical entity, the initiator group may contain multiple initiators.zfssa:configuration san initiators iscsi>groupszfssa:configuration san initiators iscsi groups>createzfssa:configuration san initiators iscsi group (uncommitted)>set name=sol-serversname = sol-servers (uncommitted)zfssa:configuration san initiators iscsi group (uncommitted)>set initiators=.sun:01:80ca413901ff.4e1c1a40initiators = iqn.1986-.sun:01:80ca413901ff.4e1c1a40 (uncommitted)zfssa:configuration san initiators iscsi group (uncommitted)>commitzfssa:configuration san initiators iscsi groups >lsGroups:GROUP NAMEgroup-000 sol-servers|+-> INITIATORS.sun:01:80ca413901ff.4e1c1a40zfssa:configuration san initiators iscsi groups>cd /zfssa:>Defining a Sun ZFS Storage Appliance ProjectBy defining a project in the Sun ZFS Storage Appliance, you can group related volumes. A project allows inheritance of properties for file systems and LUNs presented from the project, and also allows you to apply quotas and reservations.Define a project as shown in the following example:zfssa:>shareszfssa:shares>project sol-projectzfssa:shares sol-project (uncommitted)>commitzfssa:shares>cd /zfssa:>Defining a Sun ZFS Storage Appliance LUNYou must now create a LUN from an existing pool of storage resources, which the Oracle Solaris server will access. In this example, a thin-provisioned 64GB LUN called DocArchive1 is created. The LUN will be set up for a ZFS file system.The target group is the iSCSI target group created in the section "Defining the iSCSI Target Group," to ensure that this LUN can be accessed using iSCSI protocol. The initiator group defined in the section "Defining the iSCSI Initiator Group"is used to ensure that only the server(s) defined in the solaris-servers group can access this LUN. (In this example, this group contains only one server.)zfssa:shares>select sol-projectzfssa:shares sol-project>lun DocArchivezfssa:shares sol-project/DocArchive (uncommitted)>set volsize=64Gvolsize = 64G (uncommitted)zfssa:shares sol-project/DocArchive (uncommitted)>set targetgroup=iscsi-TGtargetgroup = iscsi-TG (uncommitted)zfssa:shares sol-project/DocArchive (uncommitted)>set initiatorgroup=sol-serversinitiatorgroup = sol-servers (uncommitted) zfssa:shares sol-project/DocArchive (uncommitted)>listProperties:checksum = fletcher4 (inherited)compression = off (inherited)dedup = false (inherited)copies = 1 (inherited)logbias = latency (inherited)secondarycache = all (inherited)volblocksize = 8K (default)volsize = 64G (uncommitted)sparse = false (default)exported = true (inherited)targetgroup = iscsi-TG (uncommitted)initiatorgroup = sol-servers (uncommitted)lunumber = (default)assignednumber = (default)status = (default)fixednumber = (default)lunguid = (default)canonical_name = (default)nodestroy = (default)Children:snapshots => Manage snapshotsreplication => Manage remote replication zfssa:shares sol-project/DocArchive (uncommitted)>set volblocksize=32kvolblocksize = 32K (uncommitted)zfssa:shares sol-project/DocArchive (uncommitted)>commitzfssa:shares sol-project>cd /zfssa:shares>Configuring the LUN for Use by the Oracle Solaris Server Now that the LUN is prepared and available to an authenticated iSCSI initiator, you must configure the LUN for use by the Oracle Solaris server by completing the following steps:1. Initiate an Oracle Solaris iSCSI session with the Sun ZFS Storage Appliance. Since the LUNwas created prior to initiating the iSCSI session, it will be automatically enabled.root@solaris:~# iscsiadm add discovery-address 192.168.1.12root@solaris:~# iscsiadm modify discovery -t enableroot@solaris:~# iscsiadm list discovery-addressDiscovery Address: 192.168.1.12:3260root@solaris:~# iscsiadm list discoveryDiscovery:Static: disabledSend Targets: enablediSNS: disabledroot@solaris:~# iscsiadm list targetTarget: .sun:02:4ec2b85a-9b5d-e02c-ee9c-bdd55452e7deAlias: iscsi-TargetsTPGT: 2ISID: 4000002a0000Connections: 12. Configure the CHAP authentication.root@solaris:~# iscsiadm modify target-param -H iqn.1986-.sun:02:4ec2b85a-9b5d-e02c-ee9c-bdd55452e7de iqn.1986-.sun:02:4ec2b85a-9b5d-e02c-ee9c-bdd55452e7deroot@solaris:~# iscsiadm modify target-param -a CHAP iqn.1986-.sun:02:4ec2b85a-9b5d-e02c-ee9c-bdd55452e7deroot@solaris:~# iscsiadm modify target-param -C iqn.1986-.sun:02:4ec2b85a-9b5d-e02c-ee9c-bdd55452e7deEnter secret: CHAPsecret11Re-enter secret: CHAPsecret113. Initiate access to the iSCSI LUN.root@solaris:~# devfsadm -c iscsiroot@solaris:~# tail /var/adm/messages[...]Jul 12 12:29:19 solaris iscsi: [ID 559844 ] NOTICE: iscsisession(6) iqn.1986-.sun:02:4ec2b85a-9b5d-e02c-ee9c-bdd55452e7de onlineJul 12 12:29:19 solaris scsi: [ID 583861 ] sd2 at scsi_vhci0:unit-addressg600144f08f1579d600004e1c2e250001: f_tpgsJul 12 12:29:19 solaris genunix: [ID 936769 ] sd2 is/scsi_vhci/disk@g600144f08f1579d600004e1c2e250001Jul 12 12:29:19 solaris genunix: [ID 408114 ]/scsi_vhci/disk@g600144f08f1579d600004e1c2e250001 (sd2) onlineJul 12 12:29:19 solaris genunix: [ID 483743 ]/scsi_vhci/disk@g600144f08f1579d600004e1c2e250001 (sd2) multipath status: degraded: path1 iscsi0/disk@.sun:02:4ec2b85a-9b5d-e02c-ee9c-bdd55452e7de0002,0 isOnline Jul 12 12:29:19 solaris pcplusmp: [ID 805372 ] pcplusmp: lp (ecpp)instance 0 irq 0x7 vector 0x43 ioapic 0x2 intin 0x7 is bound to cpu 0[...]In this example, the multipath status is shown as degraded because IP multipathing has not been configured. In a production environment, IP multipathing would typically be configured.The disk device is now available similarly to an internal server disk.4. Format the LUN as shown:root@solaris:~# formatSearching for disks...doneAVAILABLE DISK SELECTIONS:0. c0t600144F08F1579D600004E1C2E250001d0 <SUN -Sun Storage NAS-1.0 cyl 8352 alt 2 hd 255 sec 63>/scsi_vhci/disk@g600144f08f1579d600004e1c2e2500011. c7t0d0 <ATA -VBOX HARDDISK -1.0 cyl 8351 alt 2 hd 255 sec 63>/pci@0,0/pci8086,2829@d/disk@0,0Specify disk (enter its number): 0selecting c0t600144F08F1579D600004E1C2E250001d0[disk formatted]No Oracle Solaris fdisk partition found.FORMAT MENU:disk - select a disktype - select (define) a disk typepartition - select (define) a partition tablecurrent - describe the current diskformat - format and analyze the diskfdisk - run the fdisk programrepair - repair a defective sectorlabel - write label to the diskanalyze - surface analysisdefect - defect list managementbackup - search for backup labelsverify - read and display labelssave - save new disk/partition definitionsinquiry - show vendor, product and revisionvolname - set 8-character volume name!<cmd> - execute <cmd>, then returnquitformat> fdiskNo fdisk table exists. The default partition for the disk is:a 100% "SOLARIS System" partitionType "y" to accept the default partition, otherwise type "n" to edit the partition table.Yformat> pPARTITION MENU:0 - change `0' partition1 - change `1' partition2 - change `2' partition3 - change `3' partition4 - change `4' partition。
常见主流操作系统iSCSI 启动器配置方法

各种操作系统iSCSI initiator配置系列目录iSCSI initiator配置系列 (1)第一章Redhat4下iscsi initiator的配置方法 (5)1.1基本兼容性 (5)1.2CHAP认证 (5)1.3多路径(在基本兼容性的基础上完成以下操作,并且重点说安装前的准备) (9)第二章Redhat5下iscsi initiator的配置方法 (9)2.1基本兼容性 (9)2.2CHAP认证 (10)2.3多路径(在基本兼容性的基础上完成以下操作,并且重点说安装前的准备) (11)第三章SLES9下iscsi initiator的配置方法 (11)3.1基本兼容性 (11)3.2CHAP认证 (11)3.3多路径(在基本兼容性的基础上完成以下操作,并且重点说安装前的准备) (11)第四章SLES10下iscsi initiator的配置方法 (13)4.1基本兼容性 (14)4.2CHAP认证 (14)4.3多路径(在基本兼容性的基础上完成以下操作,并且重点说安装前的准备) (15)4.4使用Y aST配置initiator (17)第五章Windows系统下软件Initiator的安装、配置和使用指导书 (21)5.1应用系统信息 (21)5.2Initiator安装过程 (21)5.3软件配置过程 (21)5.4其他事项说明 (26)5.5服务自启动和服务依赖设置 (27)第六章Solaris10下iscsi initiator配置方法 (28)6.1查看Solaris操作环境是否启用了iscsi initiator服务 (28)6.2准备工作 (28)6.3使用以下命令之一启用iSCSI 目标搜索方法: (28)6.4为本地系统创建iSCSI 设备链接 (28)6.5使用format 实用程序查看本地系统上的iSCSI 磁盘 (29)6.6监视iSCSI 配置 (29)第七章HP-UX 11i V2下配置iSCSI (29)7.1准备环境 (29)7.2安装软件包 (29)7.3配置iscsi服务器 (30)第八章HP-UX 11i V3下iSCSI的配置方法 (31)8.1环境 (31)8.2安装软件包 (32)8.3配置iscsi服务器 (32)8.4注意事项 (33)第九章Aix5.3与S5300 iSCSI 配置手册 (33)9.1引言 (33)9.2iSCSI介绍 (33)9.3环境准备 (34)9.4iSCSI Initiator 的配置 (37)9.5iSCSI Target的配置 (40)9.6CHAP认证配置 (41)9.7映射主机Lun的扫描 (42)9.8注意事项 (44)第十章FreeBSD 7.0 对接S5000(iscsi)基本兼容性验证过程记录 (45)10.1操作系统简介 (45)10.2操作系统安装方法 (45)10.3FreeBSD IP设置及网络服务重启方法 (45)10.4远程SSH 使用root账户登录的设置方法 (46)10.5iSCSI initiator的安装配置方法 (46)10.6FreeBSD 磁盘管理及文件系统创建 (46)10.7freebsd常用操作命令 (48)第十一章MAC OS 下iSCSI initiator的配置方法 (48)11.1基本兼容性 (48)11.2CHAP认证 (49)11.3附软件包 (49)第一章Redhat4下iscsi initiator的配置方法1.1 基本兼容性1、执行vi /etc/iscsi.conf2、文件中的DiscoveryAddress=xx.xx.xx.xx,将主机所连接的Target地址添加上去,如果连接了多个Target,则需要添加多个DiscoveryAddress=xx.xx.xx.xx注:添加Target的这行命令DiscoveryAddress=xx.xx.xx.xx一定要顶格写,否则在有两条路径的情况下,可能会有拔掉其中任意一根网线,用fdisk –l扫描LUN会挂住,重启iscsi服务也会挂住的情况。
centos上iscsi+multipath多路径存储配置手册

centos上iscsi+multipath多路径存储配置手册目录一:客户端安装iscsi包。
二:zai共享存储上为服务器划分磁盘空间。
三:启用iscsi设备。
四:安装dm-multipath包。
五:配置参数修改和测试。
一;客户端添加iscsi 安装包。
1、服务器安装iscsi initiator包。
安装包从安装光盘中找到root@~>rpm -qa |grep iscsiiscsi-initiator-utils-6.2.0.868-0.7.el52、在/etc/iscsi/目录下/etc/iscsi/initiatorname.iscsi查看此文件可发现主机端的iqn号码。
在EVA command view管理软件中添加HOST时需用到。
二:为服务器划分磁盘阵列的磁盘空间(即Virtual disk)具体详见存储配置。
三:启用ISCSI设备1、在服务器端,启动ISCSI服务:root@~>service iscsi start2、查询ISCSI设备(HP storageworks mpx100)target的iqn号码:(必须)root@~>iscsiadm -m discovery -t sendtargets -p 192.168.14.1 192.168.14.1:3260,0.hp:fcgw.mpx100.0.50014380025bad30.50014380025bad383、登陆到ISCSI存储设备[root@localhost~]#Iscsiadm –m node –T.hp:fcgw.mpx100.0.50014380025bad30.50014380025bad38 -p192.168.14.1:3260 – l上面命令是连续的,其中iqn号码为上面查询得到的号码,ip为iscsi存储中iscsi口对外映射的地址。
4、查看磁盘:[root@localhost ~]# fdisk -lDisk /dev/sda: 8795 MB, 8795105280 bytes255 heads, 63 sectors/track, 1069 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System/dev/sda1 * 1 941 7558551 83 Linux/dev/sda2 942 1068 1020127+ 82 Linux swap / SolarisDisk /dev/sdb: 10.4 GB, 10487232000 bytes255 heads, 63 sectors/track, 1275 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDevice Boot Start End Blocks Id System得到新的盘符5、同样的方法添加另外一个ISCSI路径的target 。
iSCSI详解手册-完美版

iSCSI详解手册-完美版iSCSI详解手册iSCSI详解手册2003年,互联网工程任务组(IETF)批准iSCSI(互联网SCSI)协议后,很多人开始将以太网作为分块存储网络使用(成为“基于IP 的存储”)。
一直以来,人们采用iFCP 和FCIP等现有协议发送基于IP的SCSI命令行,主要允许FC存储区域网络(SAN)通过IP交换数据。
凭借iSCSI,SCSI命令行可以“端对端”地传送到世界各地的以太网中。
TechTarget中国存储站编辑经过仔细研究为大家奉献了一本非常详尽的iSCSI技术手册,供大家参考。
iSCSI应用技巧iSCSI的性能非常好,除了要求苛刻的事务应用程序。
以太网会发生网络堵塞和延迟,1 Gbps的以太网网络带宽远远小于2、4、甚至10 Gbps的光纤通道SAN,对此许多网络专家可能会惊奇不已。
但是,iSCSI也具有一些问题,任何用户都应该考虑到这些问题。
这一部分将对应用iSCSI时需要解决的若干问题进行列举,并对使用用户进行了指导。
●详解iSCSI技术●iSCSI故障查询列表●如何提高 iSCSI 性能●如何用iSCSI进行系统备份●iSCSI网络配置设计与优化●iSCSI怎样避免拥塞●在数据中心如何使用iSCSI?●应用iSCSI整合存储与网络资源(一)●应用iSCSI整合存储与网络资源(二)●应用iSCSI整合存储与网络资源(三)iSCSI还是FC?以前,FCoE比iSCSI应用的更广泛。
一部分是在上层市场上应用iSCSI需要额外的硬件和能力,这与它所宣称的低成本相违背。
现在,iSCSI的低端市场仍然在增长。
中小型企业,SOHO,甚至大一点的中小型企业。
同样,FCoE也会沿着企业逐步走向中小企业市场。
究竟是选择FCoE还是选择iSCSI?这部分的如下文章就为您分析这个问题,供您选用产品时进行参考。
●有了iSCSI我们还需要FCoE吗●iSCSI能“打倒”光纤吗●虚拟服务器环境下用iSCSI还是FC?●和FC相比 ISCSI得到了应有的地位(一)●和FC相比 ISCSI得到了应有的地位(二)●和FC相比 ISCSI得到了应有的地位(三)●和FC相比 ISCSI得到了应有的地位(四)●以iSCSI的价格获得光纤通道的性能?●如何集成iSCSI 和FC存储●如何集成iSCSI和光纤通道iSCSI与虚拟化有报道说iSCSI与虚拟化是非常匹配的一对,因为iSCSI技术允许快速的产品整合与服务器开发。
iSCSI详解手册

iSCSI详解手册iSCSI详解手册2003年,互联网工程任务组(IETF)批准 iSCSI(互联网SCSI)协议后,很多人开始将以太网作为分块存储网络使用(成为“基于IP的存储”)。
一直以来,人们采用iFCP 和FCIP等现有协议发送基于IP的SCSI命令行,主要允许FC存储区域网络(SAN)通过IP交换数据。
凭借iSCSI,SCSI命令行可以“端对端”地传送到世界各地的以太网中。
TechTarget中国存储站编辑经过仔细研究为大家奉献了一本非常详尽的iSCSI技术手册,供大家参考。
iSCSI应用技巧iSCSI的性能非常好,除了要求苛刻的事务应用程序。
以太网会发生网络堵塞和延迟,1 Gbps的以太网网络带宽远远小于2、4、甚至10 Gbps的光纤通道SAN,对此许多网络专家可能会惊奇不已。
但是,iSCSI也具有一些问题,任何用户都应该考虑到这些问题。
这一部分将对应用iSCSI时需要解决的若干问题进行列举,并对使用用户进行了指导。
●详解iSCSI技术●iSCSI故障查询列表●如何提高 iSCSI 性能●如何用iSCSI进行系统备份●iSCSI网络配置设计与优化●iSCSI怎样避免拥塞●在数据中心如何使用iSCSI?●应用iSCSI整合存储与网络资源(一)●应用iSCSI整合存储与网络资源(二)●应用iSCSI整合存储与网络资源(三)iSCSI还是FC?以前,FCoE比iSCSI应用的更广泛。
一部分是在上层市场上应用iSCSI需要额外的硬件和能力,这与它所宣称的低成本相违背。
现在,iSCSI的低端市场仍然在增长。
中小型企业,SOHO,甚至大一点的中小型企业。
同样,FCoE也会沿着企业逐步走向中小企业市场。
究竟是选择FCoE还是选择iSCSI?这部分的如下文章就为您分析这个问题,供您选用产品时进行参考。
●有了iSCSI我们还需要FCoE吗●iSCSI能“打倒”光纤吗●虚拟服务器环境下用iSCSI还是FC?●和FC相比 ISCSI得到了应有的地位(一)●和FC相比 ISCSI得到了应有的地位(二)●和FC相比 ISCSI得到了应有的地位(三)●和FC相比 ISCSI得到了应有的地位(四)●以iSCSI的价格获得光纤通道的性能?●如何集成iSCSI 和FC存储●如何集成iSCSI和光纤通道iSCSI与虚拟化有报道说iSCSI与虚拟化是非常匹配的一对,因为iSCSI技术允许快速的产品整合与服务器开发。
iSCSI initiator软件典型配置

iSCSI initiator软件典型配置WINDOWS系统中iSCSI initiator的安装和配置应用系统信息操作系统版本:Windows XP,Windows 2000 Professional SP4;Windows 2000 Server SP4,Windows 2003 Server SP1Initiator版本:MS iscsi initiator 2.0.1Initiator安装、卸载过程软件安装步骤1. 下载或拷贝MS initiator2.0.1安装文件到windows 机器上●MS initiator安装文件可以从Microsoft的网站上下载●initiator的版本分X86, AMD64和IA64,使用与你的机器类型相匹配的版本2. 双击initiator 2.0.1安装文件,按提示操作即可,都用缺省选项。
3. 重启机器软件卸载步骤1. Windows控制面板–>添加或删除程序2. 选中MS iSCSI Initiator,点击删除按钮3. 重启机器软件配置过程1. 确认microsoft iscsi 服务已启动:开始菜单->控制面板->管理工具->服务,在窗口的右栏中查看“Microsoft iSCSIInitiator Service”的状态是否显示“已启动”(一般该服务默认状态为启动)。
若没有,则选中它并单击鼠标右键,选择“启动”,并将启动类型设为“自动”。
2. 启动initiator配置工具:开始菜单->控制面板,双击iSCSI Initiator图标,如下图:3. (可选)更改initiator名字按General标签中的Change…按钮,可以把缺省名字改为你自已起的名字,这个名字必需是唯一的。
4. 添加Target 在Discovery标签的Target Portal部分,点击Add,进入Add Target Portal窗口。
ISCSI 简介与配置

本条命令需掌握 --tid后面的参数“1”,这个“1”在这里就是个编号,也可以设为2,-T后面 的参数自己随便写,后边需以iqn开头,localhost.localdomain为你的主机名.
b.#tgtadm --lld iscsi --mode logicalunit --op new --tid 1 --lun 1 -b /dev/sda3
* iSCSI Initiator (安装在客户端)
一个安装在计算机上的一个软件或是一个硬件设备,它负责处理同iscsi 存储设备进行通信。iSCSI服务器上安装Initiator后,可以将以太网卡虚拟 为iSCSI卡,进而接受和发送iSCSI数据报文,从而实现主机和iSCSI存储设备 之间的iSCSI协议和TCP/IP协议传输功能。
二、 ISCSI配置
1.挂载镜像文件创建本地yum源:
(1)创建iso存放目录和挂载目录:
mkdir /mnt/iso
mkdir /mnt/cdrom
(2)将iso镜像文件上传到/mnt/iso文件夹下,将/mnt/iso/下的iso文 件挂载到/mnt/cdrom目录
mount -o loop /mnt/iso/XXXXX.iso /mnt/cdrom
扩充性强:对于已经构建的iSCSI存储网络来说,增加iSCSI存储设备和服 务器都将变得简单且无需改变网络的体系结构。
带宽和性能:iSCSI存储网络的访问带宽依赖以太网带宽,会达到甚至超过 光纤通道存储网络的带宽和性能。
突破距离限制:iSCSI存储网络使用的是以太网,因而在服务器和存储设备 的空间布局上的限制就会很少。
(5)myself.repo内容如下: [base] name=RedHat #注:这里的baseurl就是你挂载的目录,在这里是/mnt/cdrom baseurl=file:///mnt/cdrom #注:这里的值enabled一定要为1 enabled=1 #注:gpgckeck的值无所谓 gpgckeck=0 #注:这个你cd /mnt/cdrom/可以看到这个key,这里仅仅 gpgkey=file:///mnt/cdrom/RPM-GPG-KEY-CentOS-6
iSCSI initiator在windows和linux下的安装方法及配置指南

iSCSI initiator在windows和linux下的安装方法及配置指南一、Windows平台iSCSI initiator安装方法Step 1:从下列网址下载Microsoft iSCSI Initiator/windowsserversystem/storage/technologies/iscsi/default.mspx Step 2:安装iSCSI initiator双击“initiator-x86free-version.msi” ,然后一直“next” “next”….Step3:iSCSI配置文件注:开始配置之前,确保主机的IP设置,使主机能够连接上RAStor4000控制器,即在一个子网段内,互相能够ping通。
双击桌面上的“Microsoft iSCSI Initiator”图标。
出现如下界面:该界面是用来添加Target,稍后进行配置。
首先,切换到“Initiator Settings”属性页,如下图所示,记下nitiator node name,这个ID 便是将来RAStor4000中添加主机时所需要使用的WWN,也可以自己改变,但要保证是唯一的。
由于该主机为NF280,主机名为nf280,因此系统会自动给出initiator node name为“.microsoft:nf280”。
然后返回开始属性页“Target Portals”,通过单击“Add。
”,添加RAStor4000的控制器IP,如下图:其中“192.168.0.1”为RAStor4000的控制器0 IP地址,3260为默认的iscsi service端口号。
单击“Advanced…”可以设置连接方式,也可以设置为default。
source IP选择initiator主机的IP Address:192.168.0.5设置完,单击确定,再单击“Add Target Portal”对话框中的OK,进入如下界面:添加完成后,激活Target,激活会话,需要完成以下几步:单击“Log On…”选择第一个复选框,暂时不选择多路径,单击OK。
ISCSI配置手册

ISCSI配置手册1、创建VOLUME依次点击Volume->add点击NEXT:VOLUME的类型选择FlexibleVolume Name:自定义VOL名称,这里我们命名为vol_ipsanLanuage:选择简体中文UTF-8:如果使用中文字符集需要勾选这一项点击NEXT:Containing Aggregate:VOL创建在aggr上,这里我们选择aggr_ipsan Space Guarantee:选择volume点击NEXTVolume Size Type:选择Total SizeVolume Size:输入需要创建的Volume的大小Snapshot Reserve:输入0点击NEXT最终配置确认,点击Commit提交到存储提示操作成功在Volume中我们可以看到新创建的vol_ipsan2、创建LUN依次点击LUNs->Wizard会弹出一个配置向导,点击NEXTPatch:LUN的路径,需要创建在vol_ipsan上,testlun为创建的LUN的名称Size:LUN的大小,小于等于vol_ipsan的大小,这里我们分配100GLUN Protocol Type:使用这个LUN的主机类型,这里我们选择WindowsSpace-reserved:空间保留,勾上这个选项Description:LUN描述,根据需要进行自定义。
点击NEXT提示加入到Initiator Group,我们这里暂时还没有Initiator Group,因此点击NEXT跳过这一步:确认最终配置,点击Commit提交到存储提示已经成功创建LUN。
在manage中我们可以看到新创建的LUN3、创建Initiator Groups依次点击LUNs-> Initiator Groups->add,添加一个Initiator GroupsGroupName:自定义组名称Type:选择ISCSIOperation System:选择WindowsInitiators:输入iSCSI发起端的编号,这个需要在主机上查询。
AIX iscsi 设置方法

AIX 5.3/6.1操作系统Initiator软件安装和配置指导书1 安装环境:1.1 应用系统信息操作系统版本:IBM AIX 5.3(补丁级别:5300-02)内核版本:Initiator版本:AIX iSCSI SW (Ethernet SAN) Initiator for AIX 5.3.0.20操作系统版本:IBM AIX 6.1(补丁级别:6100-00-01-0748)内核版本:Initiator版本:AIX iSCSI SW (Ethernet SAN) Initiator for AIX 6.1.0.02 Initiator安装过程2.1 软件安装AIX 5.3/6.1 默认安装iscsi initiator软件。
如下命令确认系统是否安装相应软件包:AIX 5.3AIX 6.1也可执行下列命令查看,显示Available即为已安装iscsi软件。
说明:●如果系统没有安装iSCSI HBA卡,则软件iSCSI initiator对应为iscsi0,否则则往后递推:如果安装2块iSCSI HBA卡,则HBA对应为iscsi0和iscsi1,软件iSCSI initiator对应为iscsi2。
3 软件配置过程3.1 配置initiator名称(1) step1(进入配置界面)(2) step2(选择适配器)执行smit iscsi之后,会进入如下界面,选择“iSCSI Protocol Device”(3) step3(选择适配器)确定后会进入如下界面,选择“Change / Show Characteristics of an iSCSI Protocol Device”(4) step4(选择适配器)确定之后会进入如下界面,如果没有安装HBA卡的话iscsi software intiator应该对应为iscsi0。
本系统安装了2块iSCSI HBA卡(对应为iscsi0和iscsi1),所以iscsisoftware intiator对应变为iscsi2。
iscsiHBA卡操作手册

一SANsurfer ISCSI HBA Manager 配置1、连接主机:1、打开SANsurfer程序;2、在Enter host name or IP address提示框中输入包含该主机的DNS名称;然后点击Connect to Host dialog窗口中的Connect按钮;3、由于所使用的iSCSI卡还没有被配置,所以会弹出一个提示框显示检测到一个未被配置的端口;选中Do not show this dialog again for this session并点击No;4、在成功登陆后,一些有关主机的概要信息和一个HBA和带有iSCSI Qualified Names IQNs的端口号的列表会被显示出来;看到上图所示表明已经成功连接到主机的iSCSI卡了;2、配置iSCSI HBA的网络连接:1、启动SANsurfer程序,选择左侧iSCSI HBA目录下的Port 0端口,然后点击Port Options标签,然后再点击Network标签,即可看到如下图所示:动态IP地址2、点击Obtain an IP address automatically,再点击Obtain DNS server address automatically...., 然后点击Save Port Settings;3、对于地址的一个配置要求重新设置适配卡,下图显示了当应用程序进入与此适配卡连接的逻辑驱动器时需要先卸载的警告提示,点击Yes接受;4、然后会提示输入SANsurfer的密码,输入并点击OK,SANsurfer的默认密码是config;5、在网络设置被保存后,配置需要重新刷新,点击Yes来刷新配置;6、在配置刷新执行完成后,IP地址即可从DHCP分配获得;配置静态IP地址7、选择左侧iSCSI HBA目录下的Port 1端口,如下图:8、输入IP address, subnet mask, default gateway和DNS server的地址,然后点击Save Port Settings;9、同第3步,确认警告提示;10、同第4步,输入SANsurfer的密码,输入并点击OK;11、同第5步,点击Yes来刷新配置;3、检测网络设置:执行一个ping的检测来确认网络设置是否正常;1、连接SANsurfer GUI端到一台主机,选择需要检测iSCSI HBA卡上的端口,然后点击Diagnostic 标签,然后会看到ping检测的界面,如下图所示:2、输入远端主机的IP地址,例如,默认网关的IP地址,指定要发送的ICMP packets数据包的数量,然后点击Start Testing按钮;在IP地址下面的一行信息显示了数据包发送的状态;3、在所有的数据包都发送完毕后,将会看到类似下图的一个检测情况概览;4、可以重复此操作来对其他的iSCSI HBA端口进行检测;4、配置主机上的iSCSI目标连接:1、启动SANsurfer,选择iSCSI HBA上的第一个端口port0并点击右边的Target Settings标签,一个列出了所有被发现的目标的列表将会显示出来,类似下图所示:2、输入target ip3、这样目标target就添加好了;在新添加的这行目标最后的State状态栏中显示的“Not saved”表明这个对于配置的修改操作还没有被保存,点击Save Target Settings按钮来保存对于目标的设置修改;4、之后会弹出一个警告信息的窗口,如下图所示,点击Yes接受;5、输入SANsurfer的确认密码,默认为config,并点击OK;6、在配置被保存后,一个需要刷新配置列表的窗口会弹出,点击Yes来接受刷新;7、在配置被刷新后,所指定的目标就会列在左边iSCSI HBA对应的端口下,如下图所示的显示为“Sent Target Hosts”的蓝色的特殊目标入口;这个蓝色的入口被用来从目标获得可用的逻辑驱动器LUN;下图中的第三行目标的状态State永远不会是一个活动的会话active session,因为它只是被用来作为发现目标的用途;在目标列表中的第四行,即对应第2步所输入的IP地址的第二行,则象征着之前指定的目标及所有可用的LUN被发现;对于第四行目标信息,这里列出了一个完整的iSCSI qualified name 即iqn编号,并且状态栏State下面显示的也是活动的连接“Session Active”;这时,在左边的iSCSI HBA目录列表中也会包含一个象征着这个新发现的目标的绿色的设备Device,并且所有可用的LUN也将会显示出来;在目标列表中带有iqn的目标对应的Target ID 是64,这说明这个目标是一个动态的目标,并且没有固定的绑定到这个iSCSI HBA卡上;所有的动态目标的Target ID都是从64开始,而固定目标的Target ID则是从0开始;但是ID0和1被保留给可启动的入口目标上,因此,其他目标设备的Target ID是从2开始到63结束,最多可以有62个设备通过这种方式来配置;注意:这些动态发现的目标设备必须被保存为固定绑定的目标,所以要把Dynamic栏下原有的勾去掉,再点击Save Target Settings按钮;如果有其他iSCSI HBA卡,配置方法同上,当所有iSCSI目标入口的IP地址添加到对应iSCSI HBA端口并保存完成后,类似下图所示:这样,所有的连接配置就完成了;二、ISCSI HBA 卡在PC机上启动1、在ISCSI HBA 卡的信息界面出来的时候按ctrl+Q;2、进入ISCSI HBA卡的bios设置页面;3、按下表对参数进行检查和配置:HBA卡设置完成之后,扫描SCSI设备,确认能够发现ISCSI DISK,保存退出; 4、系统远程启动1拔出本地硬盘,模拟系统故障状态;2开机进入BIOS,设置启动顺序中第一启动从硬盘启动,在可选的硬盘里面选择名字中含有“ISCSI”的硬盘镜像盘;3主板BIOS设置完成后,重启服务器,在启动过程中,屏幕会提示通过HBA发现了硬盘,并启动服务器,启动过程和从本地启动一样;。
iscsi存储配置手册_by_BCF

NetApp iSCSI配置手册1、开始安装配置 Iscsi先登陆windows主机、filer和filerview,然后登陆目标filer的filerview,进入aggregates manage 查看磁盘的使用情况,决定在哪个aggr里面创建vol (点Aggregates,然后点manage)图中 aggr0 还有694MB空间,下一步在这个aggregate 里创建vol,进入filer 使用 vol create backup aggr0 200m 的命令创建一个vol,其中backup 是vol的名字,aggr0是创建vol 的aggr的名字,200m是vol的大小。
OK,创建完毕,我们创建的200m的vol其中有20%被snapshot占用,真正可以使用的只有160m,需要把snapshot占用的空间释放出来,使用 snap reserve backup 0 以释放snapshot预留空间,下面创建Lun,点击LUNs中的Add,在路径填刚才创建的vol的路径,protocol type 选windows,Size 选需要创建 lun的大小,选完后add,Lun就建好了。
然后,通过NetApp FilerView 创建Intiator group,如图所示:司SCSI Initiator的Node Name,如图:把刚才创建的lun添加到这个igroup里,进入lun manage 点backup 这个lun 后面的 no maps点add groups to map然后选刚才建的那个groups,AddLun ID 选 0,Apply3、在Windows下使用Filer 共享出的LUN从桌面选择“Microsoft iSCSI initaiator”进入iSCSI配置。
检查“Node Name”。
在“Discovery”中选择“Add”。
填入NetApp存储的IP地址,端口号不改变。
RHEL6---ISCSI配置

RHEL6下实现ISCSIISCSl是利用IP进行远程磁盘访问模拟本地硬盘的一种方式。
下面描述如何在一台RHEL6上通过模拟ISCSi服务。
1.服务端a.安装scsi∙taπ⅞et∙utils#yum-yinstallscsi-target-utilsb.打算好本地磁盘模拟存储系统供应远程访问.#fdisk∕dev∕sdb不用格式化文件系统.#reboot 重启LINUX.C.配置iscsi服务器端#Vi∕etc∕tgt∕targets.conf151initiator-address152initiator-address:chu>187backing-store∕dev∕sdbl188<∕target>186行表示IQN号,可以随意取,但是要遵循这个格式.187行表示供应ISCSI服务的硬盘分区.IQN命名规范optionalname例如:iqn.2023-11 .Xen:hp03d.把SCSi服务器端的服务启动并置于自动启动#servicetgtdstartft chkconfigtgtdonft servicetgtdstatustgtd(pid15661564)isrunning...2.客户端服务器端配置好了,现在配置客户端.a.安装客户端软件iscsiinitiator#yum-yinstalliscsi-initiator-utils b.运用ISCSl发觉目标#iscsiadm-modediscoverydb--typeSendtargets-portal192.168.1.206-discover然后登录#iscsiadm-modenode-targetnameiqn.2023-11:chu-portal192.168.1.206:3260-login# fdisk -cl 分区格式化这块磁盘就可以运用了.分区格式化.#chkconfigiscsion 后须要把iscsi服务置于自动启动.#blkid∕dev∕sddl查看UUlD号.因为系统启动后依据挂载依次可能使得ISCSI盘不固定,可能是SDD也可能是SDE.用UUID 肯定定位到该盘.#Vi∕etc∕fstab挂载书目写入fstab中UUID="..."/iscsifileext4_netdev00然后登出#iscsiadm-modenode-targetnameiqn.2023-11:chu-portal192.168.1.206:3260-logout 这里不登出的话,重启动系统的话会报错,导致很长时间起不来电脑,大家要留意.#reboot 重启即可自动挂载了.#serviceiscsistatus可以用serviceiscsci杳看挂载状态.。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
ISCSI配置手册
1、创建VOLUME
依次点击Volume->add
点击NEXT:
VOLUME的类型选择Flexible
Volume Name:自定义VOL名称,这里我们命名为vol_ipsan
Lanuage:选择简体中文
UTF-8:如果使用中文字符集需要勾选这一项
点击NEXT:
Containing Aggregate:VOL创建在aggr上,这里我们选择aggr_ipsan Space Guarantee:选择volume
点击NEXT
Volume Size Type:选择Total Size
Volume Size:输入需要创建的Volume的大小
Snapshot Reserve:输入0
点击NEXT
最终配置确认,点击Commit提交到存储
提示操作成功
在Volume中我们可以看到新创建的vol_ipsan
2、创建LUN
依次点击LUNs->Wizard
会弹出一个配置向导,点击NEXT
Patch:LUN的路径,需要创建在vol_ipsan上,testlun为创建的LUN的名称Size:LUN的大小,小于等于vol_ipsan的大小,这里我们分配100G
LUN Protocol Type:使用这个LUN的主机类型,这里我们选择Windows
Space-reserved:空间保留,勾上这个选项
Description:LUN描述,根据需要进行自定义。
点击NEXT
提示加入到Initiator Group,我们这里暂时还没有Initiator Group,因此点击NEXT跳过这一步:
确认最终配置,点击Commit提交到存储
提示已经成功创建LUN。
在manage中我们可以看到新创建的LUN
3、创建Initiator Groups
依次点击LUNs-> Initiator Groups->add,添加一个Initiator Groups
GroupName:自定义组名称
Type:选择ISCSI
Operation System:选择Windows
Initiators:输入iSCSI发起端的编号,这个需要在主机上查询。
点击Add添加Group,提示添加成功
点击manage查看创建的group
4、将磁盘分配给刚创建的Initiator Groups
依次点击LUNs->Manage
点击No Maps
点击Add Groups to add
选中我们刚才创建的group,点击Add
输入LUN ID,ID可以自定义,点击Apply
提示添加成功。
5、激活iSCSI协议
依次点击LUNs->Enable\Disable
在Enable iSCSI选项的Enable上打钩,点击Appley
提示操作成功,此时iSCSI协议已经成功启用,存储端配置完成。
6、WIN2003 iSCSI配置
Win2003默认没有带iSCSI Initiator软件包,需要到微软网站下载,这个软件包是免费使用的。
1)iSCSI Initiator安装
目前微软网站最新的iSCSI Initiator软件包是 2.08版本的,下载后我们可以获得一个Initiator-2.08-build3825-x86fre.exe的文件,这个是x86 32位操作系统用的,也可以根据需要下载x64给64位操作系统用,这个软件支持WIN2000/XP/WIN2003。
双击Initiator-2.08-build3825-x86fre.exe
点击下一步
一共有3个选项,全部勾选,点击下一步
点击I Agree,然后点击下一步
点击完成,机器会自动重启,如果不希望机器自动重启,勾选Do noet restart now。
退出安装后,桌面会出现Microsoft Iscsi initiator图标
双击Microsoft Iscsi initiator图标,启动ISCSI initiator软件
启动Iscsi Initiator软件后,记录下Initiator Node Name,这个需要填入到N3600-BAK存储中,创建Initiator Groups时,Initiator的方框中,如下图:
点击Discovery选项,
点击Add,增加一个iSCSI存储
IP address or DNS name:填入存储的IP地址
Port:通信端口,使用默认端口即可,如果有防火墙,需要防火墙开放这个端口点击OK,增加一个iSCSI存储
添加完Discovery以后,点击Taggets选项卡
这时我们可以看到存储的iSCSI名称以及状态,此时的状态为Inactive,未激活状态点击Log On…按钮
点击Advanced
Local adapter:本地Iscsi Initiator程序
Source IP:本地IP,如果主机有多个IP,则选择和存储IP所在网段的IP Target Portat:存储的IP以及端口
选择完成后如下图:
点击确定
如果需要主机启动后自动连接存储,勾上Automatically restore this connection when the system boots 点击OK
此时状态变成了Connected,其他配置项默认即可,点击确定完成配置。
打开WINDOWS磁盘管理器
此时我们在磁盘管理器中即可以看见分配给这台主机的磁盘,对这个磁盘进行初始化及分区格式化操作后即可以当做普通磁盘使用。