LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 08-24-2014, 11:37 AM   #1
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Rep: Reputation: Disabled
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.
 
Old 08-24-2014, 05:45 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
Try:

Code:
grep CONFIG_ISCSI_TARGET /boot/config-`uname -r`
 
Old 08-25-2014, 09:36 AM   #3
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
[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?
 
Old 08-25-2014, 10:18 AM   #4
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
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
 
Old 08-25-2014, 11:54 AM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
It means your kernel does not support ISCSI target mode, only initiator.
 
Old 08-25-2014, 12:00 PM   #6
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
It means your kernel does not support ISCSI target mode, only initiator.
How can I "fix" that? I already installed the "scsi-target-utils" package, is there something else which is needed?
 
Old 08-25-2014, 12:52 PM   #7
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
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.
 
Old 08-25-2014, 12:56 PM   #8
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
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.
Ok, I don't know how to change the kernel to 3+, so ill have to wait for CentOS to upgrade I guess...
 
Old 08-31-2014, 10:17 AM   #9
osucowboy0510
LQ Newbie
 
Registered: Aug 2014
Distribution: CentOS 7
Posts: 11

Rep: Reputation: Disabled
Well you can download a kernel and make support for iscsi target mode i have it enabled on my box works like a charm
 
Old 08-31-2014, 05:53 PM   #10
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
determine iscsi target infocrmation dmz1213 Linux - Server 1 12-26-2012 06:27 PM
iSCSI target configuration GUI Nick_C Linux - Server 0 11-04-2012 02:49 PM
[SOLVED] Iscsi target on Freenas 7 or 8 jefro *BSD 5 01-03-2011 04:39 PM
changes on other iscsi nodes attached to an ext3 iscsi target not being seen sldahlin Linux - Server 1 06-07-2008 02:02 AM
iSCSI target software from Ardis pliva Linux - Software 2 05-13-2006 01:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 03:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration