码迷,mamicode.com
首页 > 其他好文 > 详细

iscsi initiator 配置

时间:2014-10-06 16:40:40      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:io   os   使用   ar   sp   art   c   on   cti   

 

###iSCSI initiator 配置 1. Linux下iscsi initiator 安装: 在OracleLinux-R6-U4-Server-x86_64-dvd.iso中,找到匹配该系统的iscsi initiator版本iscsi-initiator-utils- 6.2.0.873-2.0.1.el6.x86_64.rpm; 通过rpm -ivh 安装 2. 启动iscsi服务 cd /etc/init.d ./iscsi start chkconfig iscsi on 3. Linux下iscsi initiator 配置: 配置默认在/var/lib/iscsi 1. 首先,存储上需要设置好target 执行这些命令需要root权限才有结果 执行两次命令,查看fdisk -l,发现LUN可以被挂载两次,多次使用命令会多次挂载 2. 发现磁盘的命令:iscsiadm -m discovery -t st -p 10.182.69.161(存储的ip) [root@sherry ~]# iscsiadm -m discovery -t st -p 10.182.69.161 10.182.69.161:3260,2 iqn.1986-03.com.sun:02:f057e3e0-2c3e-67ed-95c9-810a76090bed 发现后执行 iscsiadm -m node可以看到发现的节点 [root@sherry ~]# iscsiadm -m node 10.182.69.161:3260,2 iqn.1986-03.com.sun:02:f057e3e0-2c3e-67ed-95c9-810a76090bed 执行登录命令 iscsiadm -m node --login [root@sherry ~]# iscsiadm -m node --login Logging in to [iface: default, target: iqn.1986-03.com.sun:02:f057e3e0-2c3e-67ed-95c9- 810a76090bed, portal: 10.182.69.161,3260] (multiple) Login to [iface: default, target: iqn.1986-03.com.sun:02:f057e3e0-2c3e-67ed-95c9- 810a76090bed, portal: 10.182.69.161,3260] successful. 可以看到session建立 iscsiadm -m session [root@sherry ~]# iscsiadm -m session tcp: [1] 10.182.69.161:3260,2 iqn.1986-03.com.sun:02:f057e3e0-2c3e-67ed-95c9- 810a76090be 打印当前session情况 iscsiadm -m session -P 3 [root@sherry ~]# iscsiadm -m session -P 3 iSCSI Transport Class version 2.0-870 version 6.2.0-873.2.el6 Target: iqn.1986-03.com.sun:02:f057e3e0-2c3e-67ed-95c9-810a76090bed Current Portal: 10.182.69.161:3260,2 Persistent Portal: 10.182.69.161:3260,2 ********** Interface: ********** Iface Name: default Iface Transport: tcp Iface Initiatorname: iqn.1988-12.com.oracle:c61728d6c927 Iface IPaddress: 10.182.71.184 Iface HWaddress: Iface Netdev: SID: 1 iSCSI Connection State: LOGGED IN iSCSI Session State: LOGGED_IN Internal iscsid Session State: NO CHANGE ********* Timeouts: ********* Recovery Timeout: 120 Target Reset Timeout: 30 LUN Reset Timeout: 30 Abort Timeout: 15 ***** CHAP: ***** username: password: ******** username_in: password_in: ******** ************************ Negotiated iSCSI params: ************************ HeaderDigest: None DataDigest: None MaxRecvDataSegmentLength: 262144 MaxXmitDataSegmentLength: 32768 FirstBurstLength: 65536 MaxBurstLength: 1048576 ImmediateData: Yes InitialR2T: Yes MaxOutstandingR2T: 1 ************************ Attached SCSI devices: ************************ Host Number: 3 State: running scsi3 Channel 00 Id 0 Lun: 0 Attached scsi disk sdb State: running scsi3 Channel 00 Id 0 Lun: 1 Attached scsi disk sdc State: running 通过fdisk -l也可以看到系统已识别新的磁盘 

iscsi initiator 配置

标签:io   os   使用   ar   sp   art   c   on   cti   

原文地址:http://www.cnblogs.com/dnbing/p/4008304.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!