LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2014, 07:36 PM   #1
grosa
LQ Newbie
 
Registered: Sep 2014
Posts: 1

Rep: Reputation: Disabled
tgtadm LUN ID configuration problem


Hello,

I did the following procedure:
tgtadm –lld iscsi –mode target –op new –tid 1 –targetname iqn.2014-09.local.vclass:tg0
tgtadm –lld iscsi –op new –mode logicalunit –tid 1 –lun 1 –backing-store /dev/sdg
tgtadm –lld iscsi –op new –mode logicalunit –tid 1 –lun 2 –backing-store /dev/sdh
tgtadm –lld iscsi –op new –mode logicalunit –tid 1 –lun 3 –backing-store /dev/sdi
tgtadm –lld iscsi –op new –mode logicalunit –tid 1 –lun 4 –backing-store /dev/sdj
tgtadm –lld iscsi –mode target –op new –tid 2 –targetname iqn.2014-09.local.vclass:tg1
tgtadm –lld iscsi –mode target –op new –tid 3 –targetname iqn.2014-09.local.vclass:tg2
tgtadm –lld iscsi –op new –mode logicalunit –tid 2 –lun 5 –backing-store /dev/sde
tgtadm –lld iscsi –op new –mode logicalunit –tid 3 –lun 5 –backing-store /dev/sdf
tgtadm –lld iscsi –op bind –mode target –tid 2 –initiator-address 172.20.10.61
tgtadm –lld iscsi –op bind –mode target –tid 3 –initiator-address 172.20.10.62
tgtadm –mode target –op show
tgt-admin –dump > /etc/tgt/targets.conf

and the tgtadm –mode target –op show output was as shown bellow:
[root@iscsi ~]# tgtadm –mode target –op show
Target 1: iqn.2014-09.local.vclass:tg0
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00010000
SCSI SN: beaf10
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: IET 00010001
SCSI SN: beaf11
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/sdg
Backing store flags:
LUN: 2
Type: disk
SCSI ID: IET 00010002
SCSI SN: beaf12
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/sdh
Backing store flags:
LUN: 3
Type: disk
SCSI ID: IET 00010003
SCSI SN: beaf13
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/sdi
Backing store flags:
LUN: 4
Type: disk
SCSI ID: IET 00010004
SCSI SN: beaf14
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/sdj
Backing store flags:
Account information:
ACL information:
Target 2: iqn.2014-09.local.vclass:tg1
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00020000
SCSI SN: beaf20
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 5
Type: disk
SCSI ID: IET 00020005
SCSI SN: beaf25
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/sde
Backing store flags:
Account information:
ACL information:
172.20.10.61
Target 3: iqn.2014-09.local.vclass:tg2
System information:
Driver: iscsi
State: ready
I_T nexus information:
LUN information:
LUN: 0
Type: controller
SCSI ID: IET 00030000
SCSI SN: beaf30
Size: 0 MB, Block size: 1
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 5
Type: disk
SCSI ID: IET 00030005
SCSI SN: beaf35
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
Backing store type: rdwr
Backing store path: /dev/sdf
Backing store flags:
Account information:
ACL information:
172.20.10.62

My intention is that all LUN IDs should be different per host, so tg0 will serves shared LUNs 1,2,3 and 4 and tg1 serves LUN 5 to host 172.20.10.61 and tg2 serves LUN 5 to host 172.20.10.62. I am using CentOS 6.5
After reboot tg1 and tg2 presents the LUNs both with LUN ID 1.
Also added LUN 5 to both targets in /etc/tgt/targets.conf and after reboot ignores the instruction and still presents with LUN ID 1.

/etc/tgt/targets.conf bellow:

Default-driver iscsi

backing-store /dev/sdf
LUN 5
initiator-address 172.20.10.62

backing-store /dev/sde
LUN 5
initiator-address 172.20.10.61

backing-store /dev/sdg
backing-store /dev/sdh
backing-store /dev/sdi
backing-store /dev/sdj

Please, can anyone be so kind and help me to fix the LUN IDs?

Thank you in advance.
 
  


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
Increasing LUN sizes only, this not adding a new LUN maxmal7 Linux - Kernel 1 11-22-2013 04:55 PM
Replacing 200 GB LUN with 100 GB LUN in LVM rajaniyer123 Linux - Enterprise 4 03-27-2012 12:32 PM
LUN Device Mapping: 2 devices map to same lun DantePasquale Linux - Distributions 0 09-24-2007 02:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:50 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