iSCSI target configuration help
Running Cent OS 6.5 on an HP rackmount server. Read some notes on the web about setting up iSCSI targets and tried the following:
yum -y install scsi-target-utils dd if=/dev/zero of=/iscsi/img01.img count=0 bs=1 seek=2T Added the following entry to /etc/tgt/targets.conf: <target iqn.2014-08.com.bar.foo:target1> backing-store /iscsi/img01.img initiator-address 10.0.0.254 </target> Here's the problem: # /etc/rc.d/init.d/tgtd start Starting SCSI target daemon: [ OK ] tgtadm: invalid request Command: tgtadm -C 0 --lld iscsi --op new --mode logicalunit --tid 1 --lun 1 -b /iscsi/img01.img exited with code: 22. |
Try:
Code:
grep CONFIG_ISCSI_TARGET /boot/config-`uname -r` |
[root@hpse1 ~]# grep CONFIG_ISCSI_TARGET /boot/config-`uname -r`
[root@hpse1 ~]# uname -r 2.6.32-431.17.1.el6.x86_64 [root@hpse1 ~]# ls -l /boot/conf* -rw-r--r--. 1 root root 105200 May 7 16:58 /boot/config-2.6.32-431.17.1.el6.x86_64 -rw-r--r--. 1 root root 105195 Nov 21 2013 /boot/config-2.6.32-431.el6.x86_64 Does this mean im not runing the corect kernel and I need a reboot? |
After reboot, kernel version matches to /boot file config.
[root@hpse1 ~]# grep CONFIG_ISCSI_TARGET /boot/config-`uname -r` [root@hpse1 ~]# l /boot/config-`uname -r` -rw-r--r--. 1 root root 105200 May 7 16:58 /boot/config-2.6.32-431.17.1.el6.x86_64 [root@hpse1 ~]# grep ISCSI /boot/config-`uname -r` CONFIG_SCSI_ISCSI_ATTRS=m CONFIG_ISCSI_TCP=m CONFIG_ISCSI_BOOT_SYSFS=m CONFIG_SCSI_CXGB3_ISCSI=m CONFIG_SCSI_CXGB4_ISCSI=m CONFIG_SCSI_BNX2_ISCSI=m CONFIG_BE2ISCSI=m CONFIG_SCSI_QLA_ISCSI=m CONFIG_ISCSI_IBFT_FIND=y CONFIG_ISCSI_IBFT=m |
It means your kernel does not support ISCSI target mode, only initiator.
|
Quote:
|
Looks to me like iSCSI target code was added to the 3.1 kernel, so it won't exist in older kernels unless somebody backported it.
|
Quote:
|
Well you can download a kernel and make support for iscsi target mode i have it enabled on my box works like a charm
|
I have no idea how to go about doing that. I was told that the default CentOS 6.5 would work, in fact there are several web-sites which say they built iscsi target support and I followed their instructions, but not having any luck.
What exactly is wrong/missing with the default kernel? |
All times are GMT -5. The time now is 12:30 PM. |