Hello everyone:
I am new to iscsi, and I need to install and use both iscsi initiator and target on my ubuntu system.
The ubuntu system version is 8.10, my gcc/g++ version is 4.1.3. System kernel version is 2.6.27.
The problem is, when I installing open-iscsi with this command:
sudo apt-get install open-iscisi
A error will always occur, it is: "iscsiadm: No records found!", the whole output of this command is as bellow:
Code:
root@zzm-laptop:/home/zzm/iscsitarget-0.4.16# apt-get install open-iscsi
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
open-iscsi
共升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 326 个软件未被升级。
需要下载 160kB 的软件包。
解压缩后会消耗掉 459kB 的额外空间。
获取:1 http://mirrors.163.com intrepid/main open-iscsi 2.0.865-1ubuntu4 [160kB]
下载 160kB,耗时 2s (59.0kB/s)
选中了曾被取消选择的软件包 open-iscsi。
(正在读取数据库 ... 系统当前总共安装有 153858 个文件和目录。)
正在解压缩 open-iscsi (从 .../open-iscsi_2.0.865-1ubuntu4_i386.deb) ...
正在处理用于 man-db 的触发器...
正在设置 open-iscsi (2.0.865-1ubuntu4) ...
* Starting iSCSI initiator service iscsid [ OK ]
* Setting up iSCSI targets
iscsiadm: No records found!
[ OK ]
I think it is may be the wrong configuration of iscsi targets, but I do not know where the error is. My steps of installing and configuring iscsi target are as bellow:
Code:
# apt-get install iscsitatget
(this command run successfully)
# sudo vi /etc/ietf.conf
In the configuration file, I made three changes.
first change: set the isNSServer to local ip, in the file, it is :
iSNSServer 127.0.0.1
second change: set the target, in the file, it is:
Target iqn.2001-04.com.example:storage.disk2.sys1.xyz
third change: changed the line which starts with "Lun" and changed the line to :
Lun 0 Path=/root/test.iso,Type=fileio
Then I restarted the target:
#/etc/init.d/iscsitarget restart
and the output of this command is:
Removing iSCSI enterprise target devices: failed with reason :Connection refused.
So, I changed the command to:
#/etc/init.d/iscsitarget stop
#/etc/init.d/iscsitarget start
and the output of the above command is:
Starting iSCSI enterprise target service: succeeded.
I do not know this is whether shows that the target is well configured and running normally.
I can't make any further step about installing and running iscsi initiator and target on my ubuntu system, please help me, thank you very much!
nicegiving
2009-5-21
P.S. Another problem occured: I can't uninstall iscsi target from my computer, the problem is as bellow:
Code:
zzm@zzm-laptop:~$ sudo apt-get remove iscsitarget
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包将被【卸载】:
iscsitarget
共升级了 0 个软件包,新安装了 0 个软件包,要卸载 1 个软件包,有 326 个软件未被升级。
解压缩后将会空出 217kB 的空间。
您希望继续执行吗?[Y/n]y
(正在读取数据库 ... 系统当前总共安装有 153874 个文件和目录。)
正在删除 iscsitarget ...
Removing iSCSI enterprise target devices: succeeded.
Stopping iSCSI enterprise target service: succeeded.
Removing iSCSI enterprise target modules: FATAL: Module iscsi_trgt is in use.
failed.
invoke-rc.d: initscript iscsitarget, action "stop" failed.
dpkg:处理 iscsitarget (--remove)时出错:
子进程 pre-removal script 返回了错误号 1
Starting iSCSI enterprise target service: succeeded.
在处理时有错误发生:
iscsitarget
E: Sub-process /usr/bin/dpkg returned an error code (1)
and sometimes when I execute this command, the system may tell me that a software is crashed! This makes me confuse!