eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

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

Linux上iSCSI配置
modb.pro

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
*******************************************************************************


历史上的今天...
    >> 2010-11-10文章:
    >> 2009-11-10文章:
    >> 2008-11-10文章:
    >> 2006-11-10文章:

By eygle on 2005-11-10 18:49 | Comments (0) | System | 522 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com