From: "Gonçalo Rosa" <goncalo.rosa@gmail.com>
To: linux-scsi@vger.kernel.org
Subject: CentOS 6.5 tgtadm LUN ID set doesn't work
Date: Tue, 16 Sep 2014 14:30:29 -0500 [thread overview]
Message-ID: <000601cfd1e4$ad659ca0$0830d5e0$@gmail.com> (raw)
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2014-09-16 19:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 19:30 Gonçalo Rosa [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-09-17 18:51 CentOS 6.5 tgtadm LUN ID set doesn't work Gonçalo Rosa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000601cfd1e4$ad659ca0$0830d5e0$@gmail.com' \
--to=goncalo.rosa@gmail.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.