- 论坛徽章:
- 0
|
按照一下的说明,几分钟即可配置完成iSCSI的服务端,即Target
先在下面的网址下载iSCSI TARGET(或者叫服务端比较顺口) http://iscsitarget.sourceforge.net 用uname -r 看看你的内核版本,不能低于kernel 2.6.14 or newer. (实际测试中只有FedoraCore4、5成功的编译。Suse10,10.1,SLES,SLED,Debian,Ubuntu均不能正常编译)
完成之后可能需要重新启动
安装 iSCSI
首先解压文件
tar xvfz iscsitarget-0.4.13.tar.gz
cd iscsitarget-0.4.13
再非Fedora Core上安装需要指定源码位置
export KERNELSRC=/usr/src/kernels/2.6.14-1.1526_FC4-i686
然后编译安装
make && make install
将配置文件复制到 /etc
cp etc/ietd.conf /etc
[
edit
]配置iSCSI target service
Well, you can play around with the options that you have, but actually, you only need to setup Target (for identifying this box), Incoming/Outgoing user (if you would like to use authentication), the part of storage that you are exporting and possibly Alias for this target. So i basically changed just the following:
编辑配置文件,下面是一个基本的配置
Target iqn.2009-08.local.fog:storage.lvm
# Users, who can access this target
# (no users means anyone can access the target)
#IncomingUser
#OutgoingUser
# Lun definition
# (right now only block devices are possible)
Lun 0 Path=/dev/hdb
# Alias name for this target
Alias iSCSI
# various iSCSI parameters
# (not all are used right now, see also iSCSI spec
This is how my config file looks like. My domain name is fog.local, I'm not using authentication, I'm exporting second HDD (hdb) and the alias of this target is iSCSI. Feel free to look at the manual page for ietd.conf file for more parameters explanations.
启动服务
At this point you are ready to start the service. Fire it up with
/etc/init.d/iscsi-target start
If you configured everything correct, you should see a message like this in your log file /var/log/messages
Oct 5 10:45:01 iscsi-fc4-prod kernel: iSCSI Enterprise Target Software - version 0.4.13
Oct 5 10:45:01 iscsi-fc4-prod kernel: iotype_init(97) register fileio
Oct 5 10:45:01 iscsi-fc4-prod kernel: iet_target_param_set(128) d 1 8192 262144 65536 2 20 8 0
Oct 5 10:45:01 iscsi-fc4-prod iscsi-target: ietd startup succeeded
设定iSCSI服务的启动级别
chkconfig iscsi-target on
配置Windows客户端,并连接到FC4的iSCSI Target
下载连接器先
http://www.microsoft.com/windowsserver2003/technologies/storage/iscsi/msfiSCSI.mspx
Configure the IP address of the iSCSI target server:
![]()
Make the iSCSI target available and Log On to it. Note, that you can automatically restore the target by checking the first checkbox.
![]()
好了,可以开始使用了。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/14184/showart_449902.html |
|