Gonçalo Rosa
2014-09-16 19:30:29 UTC
Hello,
I did the following procedure:
tgtadm =96lld iscsi =96mode target =96op new =96tid 1 =96targetname
iqn.2014-09.local.vclass:tg0
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 1 =96=
backing-store
/dev/sdg
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 2 =96=
backing-store
/dev/sdh
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 3 =96=
backing-store
/dev/sdi
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 4 =96=
backing-store
/dev/sdj
tgtadm =96lld iscsi =96mode target =96op new =96tid 2 =96targetname
iqn.2014-09.local.vclass:tg1
tgtadm =96lld iscsi =96mode target =96op new =96tid 3 =96targetname
iqn.2014-09.local.vclass:tg2
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 2 =96lun 5 =96=
backing-store
/dev/sde
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 3 =96lun 5 =96=
backing-store
/dev/sdf
tgtadm =96lld iscsi =96op bind =96mode target =96tid 2 =96initiator-add=
ress
172.20.10.61
tgtadm =96lld iscsi =96op bind =96mode target =96tid 3 =96initiator-add=
ress
172.20.10.62
tgtadm =96mode target =96op show
tgt-admin =96dump > /etc/tgt/targets.conf
and the tgtadm =96mode target =96op show output was as shown bellow:
[***@iscsi ~]# tgtadm =96mode target =96op 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 w=
ill
serves shared LUNs 1,2,3 and 4 and tg1 serves LUN 5 to host 172.20.10.6=
1 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 reb=
oot
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" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
I did the following procedure:
tgtadm =96lld iscsi =96mode target =96op new =96tid 1 =96targetname
iqn.2014-09.local.vclass:tg0
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 1 =96=
backing-store
/dev/sdg
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 2 =96=
backing-store
/dev/sdh
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 3 =96=
backing-store
/dev/sdi
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 1 =96lun 4 =96=
backing-store
/dev/sdj
tgtadm =96lld iscsi =96mode target =96op new =96tid 2 =96targetname
iqn.2014-09.local.vclass:tg1
tgtadm =96lld iscsi =96mode target =96op new =96tid 3 =96targetname
iqn.2014-09.local.vclass:tg2
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 2 =96lun 5 =96=
backing-store
/dev/sde
tgtadm =96lld iscsi =96op new =96mode logicalunit =96tid 3 =96lun 5 =96=
backing-store
/dev/sdf
tgtadm =96lld iscsi =96op bind =96mode target =96tid 2 =96initiator-add=
ress
172.20.10.61
tgtadm =96lld iscsi =96op bind =96mode target =96tid 3 =96initiator-add=
ress
172.20.10.62
tgtadm =96mode target =96op show
tgt-admin =96dump > /etc/tgt/targets.conf
and the tgtadm =96mode target =96op show output was as shown bellow:
[***@iscsi ~]# tgtadm =96mode target =96op 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 w=
ill
serves shared LUNs 1,2,3 and 4 and tg1 serves LUN 5 to host 172.20.10.6=
1 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 reb=
oot
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" i=
n
the body of a message to ***@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html