免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1265 | 回复: 0
打印 上一主题 下一主题

linux下几分钟即可配置完成iSCSI的服务端 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-12-25 16:49 |只看该作者 |倒序浏览

按照一下的说明,几分钟即可配置完成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
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP