首页 > 代码库 > iscsi initiator 配置
iscsi initiator 配置
###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 配置
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。