/ 中存储网

Vistor虚拟带库安装及配置-建立Linux介质服务器

2011-04-27 15:37:47 来源:中存储网

本文由中存储aladuo原创,转载请注明原文地址:Vistor虚拟带库安装及配置-建立Linux介质服务器

Vistor虚拟带库安装及配置图文详解一文中我们对Vistor有了一个大概了解,本篇将介绍如何在另外一台Linux服务器(介质服务器)上配置Vistor虚拟带库。

架构:

服务器1 hostname:vistor:Vistor本身,iSCSI target,将该服务器看做仅仅是一个带IP的设备。IP 192.168.139.199

服务器2 hostname:cent41:介质服务器,iSCSI initiator,IP 192.168.139.133,操作系统CentOS4.4

服务器1上的操作:

通过web方式进行虚拟带库的配置,参照Vistor虚拟带库安装及配置图文详解,

确保状态是running。

服务器2上的操作:

1、编辑/etc/iscsi.conf文件,加入语句:DiscoveryAddress=192.168.139.199:3260    ---这里用的ip是服务器1的。

2、重启iscsi服务:service iscsi restart

3、编辑/etc/initiatorname.iscsi 修改initiator的名字为你自定义的,这里我们用cent41

4、重启iscsi,/etc/init.d/iscsi restart

Searching for iscsi-based multipath maps

Found 0 maps

Stopping iscsid:                                           [  OK  ]

Removing iscsi driver:                                     [  OK  ]

Checking iscsi config:                                     [  OK  ]

Loading iscsi driver:                                      [  OK  ]

Starting iscsid:                                           [  OK  ]

5、[root@cent41 ~]# tail /var/log/messages

Mar 15 13:13:35 cent41 kernel: Attached scsi generic sg1 at scsi1, channel 0, id 0, lun 0,  type 8

Mar 15 13:13:35 cent41 kernel: Attached scsi generic sg2 at scsi1, channel 0, id 0, lun 1,  type 1

Mar 15 13:13:35 cent41 kernel: Attached scsi generic sg3 at scsi1, channel 0, id 0, lun 2,  type 1

Mar 15 13:13:35 cent41 scsi.agent[5124]: tape at /devices/platform/host1/target1:0:0/1:0:0:2

Mar 15 13:13:35 cent41 scsi.agent[5053]: tape at /devices/platform/host1/target1:0:0/1:0:0:1

Mar 15 13:13:35 cent41 kernel: st: Version 20040403, fixed bufsize 32768, s/g segs 256

Mar 15 13:13:35 cent41 kernel: Attached scsi tape st0 at scsi1, channel 0, id 0, lun 1

Mar 15 13:13:35 cent41 kernel: st0: try direct i/o: yes (alignment 512 B), max page reachable by HBA 1048575

Mar 15 13:13:35 cent41 kernel: Attached scsi tape st1 at scsi1, channel 0, id 0, lun 2

Mar 15 13:13:35 cent41 kernel: st1: try direct i/o: yes (alignment 512 B), max page reachable by HBA 1048575

6、[root@cent41 ~]# iscsi-ls -l

*******************************************************************************

SFNet iSCSI Driver Version ...4:0.1.11-3(02-May-2006)

*******************************************************************************

TARGET NAME             : iqn.2002-12.com.4bridgeworks.000000:ensemble

TARGET ALIAS            : Bridgeworks-Alias

HOST ID                 : 1

BUS ID                  : 0

TARGET ID               : 0

TARGET ADDRESS          : 192.168.139.139:3260,1

SESSION STATUS          : ESTABLISHED AT Tue Mar 15 13:13:35 CST 2011

SESSION ID              : ISID 00023d000001 TSIH 1

DEVICE DETAILS:

---------------

LUN ID : 0

Vendor: QUANTUM  Model: Scalar           Model: i500             Rev: 1.00

Type:   Medium             Type:   Changer                          ANSI SCSI revision: 03

LUN ID : 1

Vendor: IBM      Model: ULTRIUM-TD3      Rev: 1.00

Type:   Sequential-Access                ANSI SCSI revision: 03

1:0:0:1: sg_io failed status 0x8 0x0 0x0 0x2

1:0:0:1: sense buffer too small 32 bytes, 6 bytes too short

1:0:0:1: Unable to get INQUIRY vpd 1 page 0x83.

page83 type0: 

page80: 6139663737626131310a

Device: /dev/st0

LUN ID : 2

Vendor: IBM      Model: ULTRIUM-TD3      Rev: 1.00

Type:   Sequential-Access                ANSI SCSI revision: 03

1:0:0:2: sg_io failed status 0x8 0x0 0x0 0x2

1:0:0:2: sense buffer too small 32 bytes, 6 bytes too short

1:0:0:2: Unable to get INQUIRY vpd 1 page 0x83.

page83 type0: 

page80: 6139663737626131320a

Device: /dev/st1

*******************************************************************************

7、[root@cent41 dev]# cat /proc/scsi/scsi

Attached devices:

Host: scsi0 Channel: 00 Id: 00 Lun: 00

Vendor: VMware,  Model: VMware Virtual S Rev: 1.0 

Type:   Direct-Access                    ANSI SCSI revision: 02

Host: scsi1 Channel: 00 Id: 00 Lun: 00

Vendor: QUANTUM  Model: Scalar i500      Rev: 1.00

Type:   Medium Changer                   ANSI SCSI revision: 03

Host: scsi1 Channel: 00 Id: 00 Lun: 01

Vendor: IBM      Model: ULTRIUM-TD3      Rev: 1.00

Type:   Sequential-Access                ANSI SCSI revision: 03

Host: scsi1 Channel: 00 Id: 00 Lun: 02

Vendor: IBM      Model: ULTRIUM-TD3      Rev: 1.00

Type:   Sequential-Access                ANSI SCSI revision: 03

8、以上就完成介质服务器的配置了。