LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-19-2014, 05:27 PM   #1
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Rep: Reputation: Disabled
How to setup ISCSI targets on Cent OS


Ive posted previously on this topic, and tried multiple times but cannot get around a problem trying to configure ISCSI targets. Specifically, I have tried 2 different physical machines as well as a VM, all running Cent OS 6.5.
Guides on the network suggest it's fairly simple to setup, but for some reason, I encounter the same configuration error during daemon start-up and have not been able to work around it at all.

I was hoping there might be a "better" guide somewhere, perhaps more comprehensive or with greater detail, because the 2 guides I followed both resulted in the same error, so it's not "random", there is definitely something missing or not setup correctly.

Other than finding a more comprehensive guide, does anyone know of a pre-built VM which can be used to manage iSCSI Target luns?
 
Old 09-19-2014, 08:30 PM   #2
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
You are trying to set up a server to HOST LUN TARGETS? Or you are setting up a server to CONNECT TO LUN TARGETS?

Either one is fairly simple, just let me know which you are doing.
 
Old 09-19-2014, 09:44 PM   #3
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by GaWdLy View Post
You are trying to set up a server to HOST LUN TARGETS? Or you are setting up a server to CONNECT TO LUN TARGETS?

Either one is fairly simple, just let me know which you are doing.
Im trying to create scsi target luns for export as block devices to other CentOS nodes.
 
Old 09-19-2014, 10:04 PM   #4
GaWdLy
Member
 
Registered: Feb 2013
Location: San Jose, CA
Distribution: RHEL/CentOS/Fedora
Posts: 457

Rep: Reputation: Disabled
The short and sweet is:

Install iscsi-initiator-utils.x86_64

Configure tgtd

Discover LUNs on client computer

Create LVM on LUNs from client computer

I think this is one of the more complete tutorials: http://opentodo.net/2012/10/setup-is...r-on-centos-6/

Run through it and report back as to where you are getting hung up. I can spin up my old iSCSI target machine from my RHCE days, or set it up again to help you through it. If you tell me where it's breaking down, we can focus on it and get you past it.

Last edited by GaWdLy; 09-20-2014 at 12:38 AM.
 
Old 09-22-2014, 10:11 AM   #5
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
# uname -rv
2.6.32-431.17.1.el6.x86_64 #1 SMP Wed May 7 23:32:49 UTC 2014
# yum install -y scsi-target-utils
# chkconfig tgtd on
# dd if=/dev/zero of=/iscsi/img01.img count=0 bs=1 seek=1G
# cat /etc/tgt/targets.conf
default-driver iscsi
<target iqn.2014-08.dssi:target1>
backing-store /iscsi/img01.img
initiator-address 10.0.0.254
</target>
# /etc/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.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to get iSCSI targets working usao Linux - Server 3 09-02-2014 04:48 AM
How to setup iSCSI targets on CentOS 6.5 with 2.x kernel? usao CentOS 4 08-27-2014 09:26 AM
[SOLVED] pacemaker - iscsi: how to set up iscsi targets/logical units? eantoranz Linux - Server 9 01-02-2013 08:38 AM
What is the recommended way to setup Linux with iSCSI targets the_gripmaster Red Hat 3 06-17-2011 07:51 AM
RHEL4 enumerate iSCSI targets joeldavis Linux - Enterprise 2 05-23-2011 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:57 AM.

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