eygle.com   eygle.com
eygle.com  
 

« 给20年后的自己发封邮件 | Blog首页 | 被人晃点 »

Linux上iSCSI配置

作者:eygle |【转载时请务必以超链接形式标明文章和作者信息及本声明
链接:
站内相关文章|Related Articles
1.修改配置文件
修改/etc/iscsi.conf文件,增加以下配置(还有很多参数可以配置):

DiscoveryAddress=172.16.35.228
TargetName=iqn.1987-05.com.cisco:test2

2.启动iscsi

[root@test2 ~]# /etc/init.d/iscsi start 
Checking iscsi config:  [  OK  ]
Loading iscsi driver:  [  OK  ]
Starting iscsid: [  OK  ]

3.观察日志
Nov  8 15:25:33 test2 kernel: iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-1
Nov  8 15:25:33 test2 kernel: iscsi-sfnet: Control device major number 254
Nov  8 15:25:33 test2 iscsi: Loading iscsi driver:  succeeded
Nov  8 15:25:38 test2 iscsid[9664]: version 4:0.1.11 variant (12-Jan-2005)
Nov  8 15:25:38 test2 iscsi: iscsid startup succeeded
Nov  8 15:25:38 test2 iscsid[9668]: cannot make connection to 172.16.35.228:3260: Connection refused
Nov  8 15:25:38 test2 iscsid[9668]: Connection to Discovery Address 172.16.35.228 failed
Nov  8 15:25:39 test2 iscsid[9668]: cannot make connection to 172.16.35.228:3260: Connection refused
Nov  8 15:25:39 test2 iscsid[9668]: Connection to Discovery Address 172.16.35.228 failed
Nov  8 15:25:40 test2 iscsid[9668]: cannot make connection to 172.16.35.228:3260: Connection refused

如果你看到如上错误,那么你需要启用NetApp的iSCSI支持并创建相应卷组。
4.配置好Netapp
此时日志显示:
Nov  8 15:43:38 test2 kernel: iscsi-sfnet:host0: Session established
Nov  8 15:43:38 test2 kernel: scsi0 : SFNet iSCSI driver
Nov  8 15:43:38 test2 kernel: scsi: unknown device type 31
Nov  8 15:43:38 test2 kernel:   Vendor: NETAPP    Model: LUN               Rev: 0.2
Nov  8 15:43:38 test2 kernel:   Type:   Unknown                            ANSI SCSI revision: 04

这显示主机已经发现了iscsi设备
在dmesg输出中也可以看到这个信息
SCSI subsystem initialized
iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-1
iscsi-sfnet: Control device major number 254
iscsi-sfnet: Loading iscsi_sfnet version 4:0.1.11-1
iscsi-sfnet: Control device major number 254
iscsi-sfnet:host0: Session established
scsi0 : SFNet iSCSI driver
scsi: unknown device type 31
  Vendor: NETAPP    Model: LUN               Rev: 0.2 
  Type:   Unknown                            ANSI SCSI revision: 04

5.查看设备信息
此时可以使用iscsi-ls等命令查看相关Lun信息
[root@test2 etc]# iscsi-ls
*******************************************************************************
SFNet iSCSI Driver Version ...4:0.1.11(12-Jan-2005)
*******************************************************************************
TARGET NAME             : iqn.1992-08.com.netapp:sn.84192734
TARGET ALIAS            : 
HOST ID                 : 0
BUS ID                  : 0
TARGET ID               : 0
TARGET ADDRESS          : 172.16.35.228:3260,1
SESSION STATUS          : ESTABLISHED AT Tue Nov  8 15:43:38 CST 2005
SESSION ID              : ISID 00023d000001 TSIH 101
*******************************************************************************

By eygle on 2005-11-10 18:49 | Comments (0) | Posted to Unix&Linux | Edit |Pageviews:

相关文章 随机文章
V$TEMPSEG_USAGE与Oracle排序
Oracle诊断案例-SGA与Swap之一
生命的律动
谁是第一位《循序渐进Oracle》的读者?
How to Use Oracle10g release 2 ASM
网上相关主题:
Google

留言 (0)

发表留言:



Remember Me?
(输入验证码后方可评论,谢谢支持)



CopyRight © 2004 eygle.com, All rights reserved.