Closed timolow closed 1 month ago
We might need to add a SN field here: https://github.com/openstack/cinder/blob/master/cinder/volume/targets/iscsi.py#L195
root@genestack-storage1:~# cat /var/lib/cinder/volumes/a19767d8-31bc-4396-a62f-3b35fd57185f
<target iqn.2010-10.org.openstack:a19767d8-31bc-4396-a62f-3b35fd57185f>
backing-store /dev/cinder-volumes-1/a19767d8-31bc-4396-a62f-3b35fd57185f
driver iscsi
incominguser Xzyajwk9N8Ej4dxxLoVa fT5EFvNWt4dYffdi
write-cache on
</target>
Fix applied to fork of Openstack cinder: https://github.com/timolow/cinder/blob/master/cinder/volume/targets/tgt.py https://github.com/timolow/cinder/commit/f79b7fc0e4915e45c29b6bc50768b71dbf433663
TGT now outputs unique SN and ID:
Target 2: iqn.2010-10.org.openstack:4db17aa5-bd26-4ca0-bcb1-98b17b44a756
System information:
Driver: iscsi
State: ready
I_T nexus information:
I_T nexus: 27
Initiator: iqn.2004-10.com.ubuntu:01:ccf450ecfaa2 alias: genestack-compute1.lab.underworld.local
Connection: 0
IP Address: 10.1.1.212
I_T nexus: 28
Initiator: iqn.2004-10.com.ubuntu:01:ccf450ecfaa2 alias: genestack-compute1.lab.underworld.local
Connection: 0
IP Address: 10.1.2.212
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
SWP: No
Thin-provisioning: No
Backing store type: null
Backing store path: None
Backing store flags:
LUN: 1
Type: disk
SCSI ID: 4db17aa5-bd26-4ca0-bcb1-98b17b44a756
SCSI SN: 4db17aa5-bd26-4ca0-bcb1-98b17b44a756
Size: 10737 MB, Block size: 512
Online: Yes
Removable media: No
Prevent removal: No
Readonly: No
SWP: No
Thin-provisioning: No
Backing store type: rdwr
Backing store path: /dev/cinder-volumes-1/4db17aa5-bd26-4ca0-bcb1-98b17b44a756
Backing store flags:
Account information:
iodthiu9TmDzRZaNu2CF
ACL information:
ALL
Compute node with 4 attached volumes:
root@genestack-compute1:~# multipath -v3 -d
39299.324958 | set open fds limit to 1048576/1048576
39299.324994 | loading //lib/multipath/libchecktur.so checker
39299.325114 | checker tur: message table size = 3
39299.325138 | loading //lib/multipath/libprioconst.so prioritizer
39299.325273 | _init_foreign: foreign library "nvme" is not enabled
39299.331331 | sda: size = 20971520
39299.331489 | sda: vendor = IET
39299.331532 | sda: product = VIRTUAL-DISK
39299.331565 | sda: rev = 0001
39299.332319 | sda: h:b:t:l = 2:0:0:1
39299.332821 | sda: tgt_node_name = iqn.2010-10.org.openstack:86bbf246-9676-422b-abbe-7e3264e9c953
39299.332848 | sda: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.332856 | sda: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.333284 | sda: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.333310 | sda: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.333351 | sda: serial = 86bbf246-9676-422b-abbe-7e3264e9c953
39299.333375 | sda: detect_checker = yes (setting: multipath internal)
39299.334201 | sda: path_checker = tur (setting: multipath internal)
39299.334229 | sda: checker timeout = 30 s (setting: kernel sysfs)
39299.335425 | sda: tur state = up
39299.335455 | sda: uid = 36246096760422b0abbe07e3264e9c953 (udev)
39299.335485 | sda: detect_prio = yes (setting: multipath internal)
39299.335505 | sda: prio = const (setting: storage device configuration)
39299.335524 | sda: prio args = "" (setting: storage device configuration)
39299.335550 | sda: const prio = 1
39299.335832 | sdb: size = 20971520
39299.336114 | sdb: vendor = IET
39299.336165 | sdb: product = VIRTUAL-DISK
39299.336219 | sdb: rev = 0001
39299.337050 | sdb: h:b:t:l = 3:0:0:1
39299.337427 | sdb: tgt_node_name = iqn.2010-10.org.openstack:86bbf246-9676-422b-abbe-7e3264e9c953
39299.337448 | sdb: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.337455 | sdb: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.337668 | sdb: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.337688 | sdb: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.337723 | sdb: serial = 86bbf246-9676-422b-abbe-7e3264e9c953
39299.337742 | sdb: detect_checker = yes (setting: multipath internal)
39299.338361 | sdb: path_checker = tur (setting: multipath internal)
39299.338382 | sdb: checker timeout = 30 s (setting: kernel sysfs)
39299.338815 | sdb: tur state = up
39299.338834 | sdb: uid = 36246096760422b0abbe07e3264e9c953 (udev)
39299.338840 | sdb: detect_prio = yes (setting: multipath internal)
39299.338845 | sdb: prio = const (setting: storage device configuration)
39299.338859 | sdb: prio args = "" (setting: storage device configuration)
39299.338877 | sdb: const prio = 1
39299.339073 | sdc: size = 20971520
39299.339270 | sdc: vendor = IET
39299.339322 | sdc: product = VIRTUAL-DISK
39299.339375 | sdc: rev = 0001
39299.340130 | sdc: h:b:t:l = 4:0:0:1
39299.340457 | sdc: tgt_node_name = iqn.2010-10.org.openstack:4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.340475 | sdc: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.340479 | sdc: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.340649 | sdc: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.340666 | sdc: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.340687 | sdc: serial = 4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.340700 | sdc: detect_checker = yes (setting: multipath internal)
39299.341195 | sdc: path_checker = tur (setting: multipath internal)
39299.341215 | sdc: checker timeout = 30 s (setting: kernel sysfs)
39299.341565 | sdc: tur state = up
39299.341585 | sdc: uid = 36aa50bd2604ca00bcb1098b17b44a756 (udev)
39299.341590 | sdc: detect_prio = yes (setting: multipath internal)
39299.341614 | sdc: prio = const (setting: storage device configuration)
39299.341623 | sdc: prio args = "" (setting: storage device configuration)
39299.341651 | sdc: const prio = 1
39299.341801 | sdd: size = 20971520
39299.342073 | sdd: vendor = IET
39299.342116 | sdd: product = VIRTUAL-DISK
39299.342140 | sdd: rev = 0001
39299.342811 | sdd: h:b:t:l = 5:0:0:1
39299.343154 | sdd: tgt_node_name = iqn.2010-10.org.openstack:4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.343172 | sdd: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.343176 | sdd: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.343354 | sdd: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.343370 | sdd: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.343444 | sdd: serial = 4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.343469 | sdd: detect_checker = yes (setting: multipath internal)
39299.343988 | sdd: path_checker = tur (setting: multipath internal)
39299.344380 | sdd: checker timeout = 30 s (setting: kernel sysfs)
39299.344761 | sdd: tur state = up
39299.344780 | sdd: uid = 36aa50bd2604ca00bcb1098b17b44a756 (udev)
39299.344785 | sdd: detect_prio = yes (setting: multipath internal)
39299.344797 | sdd: prio = const (setting: storage device configuration)
39299.344808 | sdd: prio args = "" (setting: storage device configuration)
39299.344813 | sdd: const prio = 1
39299.344976 | sde: size = 20971520
39299.345133 | sde: vendor = IET
39299.345174 | sde: product = VIRTUAL-DISK
39299.345205 | sde: rev = 0001
39299.345851 | sde: h:b:t:l = 6:0:0:1
39299.346193 | sde: tgt_node_name = iqn.2010-10.org.openstack:0d286758-8b21-4bca-bcd4-8defefc8e060
39299.346210 | sde: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.346214 | sde: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.346404 | sde: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.346420 | sde: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.346441 | sde: serial = 0d286758-8b21-4bca-bcd4-8defefc8e060
39299.346454 | sde: detect_checker = yes (setting: multipath internal)
39299.347074 | sde: path_checker = tur (setting: multipath internal)
39299.347090 | sde: checker timeout = 30 s (setting: kernel sysfs)
39299.347363 | sde: tur state = up
39299.347382 | sde: uid = 3675808b2104bca0bcd408defefc8e060 (udev)
39299.347387 | sde: detect_prio = yes (setting: multipath internal)
39299.347405 | sde: prio = const (setting: storage device configuration)
39299.347410 | sde: prio args = "" (setting: storage device configuration)
39299.347424 | sde: const prio = 1
39299.347555 | sdf: size = 20971520
39299.347690 | sdf: vendor = IET
39299.347723 | sdf: product = VIRTUAL-DISK
39299.347746 | sdf: rev = 0001
39299.348486 | sdf: h:b:t:l = 7:0:0:1
39299.348814 | sdf: tgt_node_name = iqn.2010-10.org.openstack:0d286758-8b21-4bca-bcd4-8defefc8e060
39299.348832 | sdf: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.348836 | sdf: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.349006 | sdf: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.349023 | sdf: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.349044 | sdf: serial = 0d286758-8b21-4bca-bcd4-8defefc8e060
39299.349057 | sdf: detect_checker = yes (setting: multipath internal)
39299.349521 | sdf: path_checker = tur (setting: multipath internal)
39299.349538 | sdf: checker timeout = 30 s (setting: kernel sysfs)
39299.349803 | sdf: tur state = up
39299.349822 | sdf: uid = 3675808b2104bca0bcd408defefc8e060 (udev)
39299.349827 | sdf: detect_prio = yes (setting: multipath internal)
39299.349839 | sdf: prio = const (setting: storage device configuration)
39299.349852 | sdf: prio args = "" (setting: storage device configuration)
39299.349869 | sdf: const prio = 1
39299.349999 | sdg: size = 20971520
39299.350146 | sdg: vendor = IET
39299.350181 | sdg: product = VIRTUAL-DISK
39299.350212 | sdg: rev = 0001
39299.350874 | sdg: h:b:t:l = 8:0:0:1
39299.351190 | sdg: tgt_node_name = iqn.2010-10.org.openstack:a38f7efb-8650-454d-a533-c8b5857c6451
39299.351208 | sdg: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.351212 | sdg: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.351387 | sdg: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.351403 | sdg: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.351424 | sdg: serial = a38f7efb-8650-454d-a533-c8b5857c6451
39299.351437 | sdg: detect_checker = yes (setting: multipath internal)
39299.351840 | sdg: path_checker = tur (setting: multipath internal)
39299.351857 | sdg: checker timeout = 30 s (setting: kernel sysfs)
39299.352109 | sdg: tur state = up
39299.352129 | sdg: uid = 36efb086500454d0a5330c8b5857c6451 (udev)
39299.352134 | sdg: detect_prio = yes (setting: multipath internal)
39299.352153 | sdg: prio = const (setting: storage device configuration)
39299.352178 | sdg: prio args = "" (setting: storage device configuration)
39299.352197 | sdg: const prio = 1
39299.352346 | sdh: size = 20971520
39299.352502 | sdh: vendor = IET
39299.352543 | sdh: product = VIRTUAL-DISK
39299.352574 | sdh: rev = 0001
39299.353252 | sdh: h:b:t:l = 9:0:0:1
39299.353593 | sdh: tgt_node_name = iqn.2010-10.org.openstack:a38f7efb-8650-454d-a533-c8b5857c6451
39299.353611 | sdh: uid_attribute = ID_SERIAL (setting: storage device configuration)
39299.353616 | sdh: recheck_wwid = 1 (setting: multipath.conf defaults/devices section)
39299.353808 | sdh: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.353825 | sdh: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.353882 | sdh: serial = a38f7efb-8650-454d-a533-c8b5857c6451
39299.353891 | sdh: detect_checker = yes (setting: multipath internal)
39299.354357 | sdh: path_checker = tur (setting: multipath internal)
39299.354375 | sdh: checker timeout = 30 s (setting: kernel sysfs)
39299.354726 | sdh: tur state = up
39299.354745 | sdh: uid = 36efb086500454d0a5330c8b5857c6451 (udev)
39299.354750 | sdh: detect_prio = yes (setting: multipath internal)
39299.354767 | sdh: prio = const (setting: storage device configuration)
39299.354772 | sdh: prio args = "" (setting: storage device configuration)
39299.354789 | sdh: const prio = 1
39299.354905 | rbd0: device node name blacklisted
39299.355019 | xvda: device node name blacklisted
39299.355321 | xvdb: device node name blacklisted
39299.355491 | loop0: device node name blacklisted
39299.355579 | loop1: device node name blacklisted
39299.355709 | loop2: device node name blacklisted
39299.355862 | loop3: device node name blacklisted
39299.355962 | loop4: device node name blacklisted
39299.356197 | loop5: device node name blacklisted
39299.356287 | loop6: device node name blacklisted
39299.356426 | loop7: device node name blacklisted
39299.356547 | nbd0: device node name blacklisted
39299.356652 | nbd1: device node name blacklisted
39299.356800 | nbd10: device node name blacklisted
39299.356901 | nbd11: device node name blacklisted
39299.357040 | nbd12: device node name blacklisted
39299.357133 | nbd13: device node name blacklisted
39299.357231 | nbd14: device node name blacklisted
39299.357371 | nbd15: device node name blacklisted
39299.357481 | nbd2: device node name blacklisted
39299.357588 | nbd3: device node name blacklisted
39299.357694 | nbd4: device node name blacklisted
39299.357794 | nbd5: device node name blacklisted
39299.357962 | nbd6: device node name blacklisted
39299.358061 | nbd7: device node name blacklisted
39299.358167 | nbd8: device node name blacklisted
39299.358263 | nbd9: device node name blacklisted
39299.358432 | dm-0: device node name blacklisted
39299.358534 | dm-1: device node name blacklisted
39299.358634 | dm-2: device node name blacklisted
39299.358765 | dm-3: device node name blacklisted
===== paths list =====
uuid hcil dev dev_t pri dm_st chk_st vend/prod/rev dev_st
36246096760422b0abbe07e3264e9c953 2:0:0:1 sda 8:0 1 undef undef IET,VIRTUAL-DISK unknown
36246096760422b0abbe07e3264e9c953 3:0:0:1 sdb 8:16 1 undef undef IET,VIRTUAL-DISK unknown
36aa50bd2604ca00bcb1098b17b44a756 4:0:0:1 sdc 8:32 1 undef undef IET,VIRTUAL-DISK unknown
36aa50bd2604ca00bcb1098b17b44a756 5:0:0:1 sdd 8:48 1 undef undef IET,VIRTUAL-DISK unknown
3675808b2104bca0bcd408defefc8e060 6:0:0:1 sde 8:64 1 undef undef IET,VIRTUAL-DISK unknown
3675808b2104bca0bcd408defefc8e060 7:0:0:1 sdf 8:80 1 undef undef IET,VIRTUAL-DISK unknown
36efb086500454d0a5330c8b5857c6451 8:0:0:1 sdg 8:96 1 undef undef IET,VIRTUAL-DISK unknown
36efb086500454d0a5330c8b5857c6451 9:0:0:1 sdh 8:112 1 undef undef IET,VIRTUAL-DISK unknown
39299.360765 | multipath-tools v0.8.8 (03/12, 2021)
39299.360794 | libdevmapper version 1.02.175
39299.360962 | kernel device mapper v4.45.0
39299.361006 | DM multipath kernel driver v1.14.0
39299.361260 | sda: size = 20971520
39299.361281 | sda: vendor = IET
39299.361285 | sda: product = VIRTUAL-DISK
39299.361302 | sda: rev = 0001
39299.361926 | sda: h:b:t:l = 2:0:0:1
39299.362059 | sda: tgt_node_name = iqn.2010-10.org.openstack:86bbf246-9676-422b-abbe-7e3264e9c953
39299.362106 | sda: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.362113 | sda: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.362150 | sda: serial = 86bbf246-9676-422b-abbe-7e3264e9c953
39299.362789 | sda: tur state = up
39299.362838 | sdb: size = 20971520
39299.362855 | sdb: vendor = IET
39299.362859 | sdb: product = VIRTUAL-DISK
39299.362863 | sdb: rev = 0001
39299.363469 | sdb: h:b:t:l = 3:0:0:1
39299.363713 | sdb: tgt_node_name = iqn.2010-10.org.openstack:86bbf246-9676-422b-abbe-7e3264e9c953
39299.363776 | sdb: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.363799 | sdb: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.363835 | sdb: serial = 86bbf246-9676-422b-abbe-7e3264e9c953
39299.364489 | sdb: tur state = up
39299.364614 | sde: size = 20971520
39299.364636 | sde: vendor = IET
39299.364640 | sde: product = VIRTUAL-DISK
39299.364645 | sde: rev = 0001
39299.365358 | sde: h:b:t:l = 6:0:0:1
39299.365556 | sde: tgt_node_name = iqn.2010-10.org.openstack:0d286758-8b21-4bca-bcd4-8defefc8e060
39299.365612 | sde: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.365636 | sde: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.365694 | sde: serial = 0d286758-8b21-4bca-bcd4-8defefc8e060
39299.366277 | sde: tur state = up
39299.366335 | sdf: size = 20971520
39299.366367 | sdf: vendor = IET
39299.366387 | sdf: product = VIRTUAL-DISK
39299.366395 | sdf: rev = 0001
39299.367048 | sdf: h:b:t:l = 7:0:0:1
39299.367275 | sdf: tgt_node_name = iqn.2010-10.org.openstack:0d286758-8b21-4bca-bcd4-8defefc8e060
39299.367315 | sdf: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.367333 | sdf: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.367405 | sdf: serial = 0d286758-8b21-4bca-bcd4-8defefc8e060
39299.367756 | sdf: tur state = up
39299.367879 | sdc: size = 20971520
39299.367904 | sdc: vendor = IET
39299.367913 | sdc: product = VIRTUAL-DISK
39299.367946 | sdc: rev = 0001
39299.368671 | sdc: h:b:t:l = 4:0:0:1
39299.368856 | sdc: tgt_node_name = iqn.2010-10.org.openstack:4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.368919 | sdc: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.368966 | sdc: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.369015 | sdc: serial = 4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.369456 | sdc: tur state = up
39299.369515 | sdd: size = 20971520
39299.369545 | sdd: vendor = IET
39299.369565 | sdd: product = VIRTUAL-DISK
39299.369573 | sdd: rev = 0001
39299.370219 | sdd: h:b:t:l = 5:0:0:1
39299.370436 | sdd: tgt_node_name = iqn.2010-10.org.openstack:4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.370483 | sdd: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.370506 | sdd: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.370559 | sdd: serial = 4db17aa5-bd26-4ca0-bcb1-98b17b44a756
39299.370987 | sdd: tur state = up
39299.371122 | sdh: size = 20971520
39299.371145 | sdh: vendor = IET
39299.371155 | sdh: product = VIRTUAL-DISK
39299.371182 | sdh: rev = 0001
39299.371846 | sdh: h:b:t:l = 9:0:0:1
39299.372272 | sdh: tgt_node_name = iqn.2010-10.org.openstack:a38f7efb-8650-454d-a533-c8b5857c6451
39299.372311 | sdh: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.372325 | sdh: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.372346 | sdh: serial = a38f7efb-8650-454d-a533-c8b5857c6451
39299.372784 | sdh: tur state = up
39299.372834 | sdg: size = 20971520
39299.372842 | sdg: vendor = IET
39299.372847 | sdg: product = VIRTUAL-DISK
39299.372851 | sdg: rev = 0001
39299.373414 | sdg: h:b:t:l = 8:0:0:1
39299.373547 | sdg: tgt_node_name = iqn.2010-10.org.openstack:a38f7efb-8650-454d-a533-c8b5857c6451
39299.373584 | sdg: 10240 cyl, 64 heads, 32 sectors/track, start at 0
39299.373598 | sdg: vpd_vendor_id = 0 "undef" (setting: multipath internal)
39299.373618 | sdg: serial = a38f7efb-8650-454d-a533-c8b5857c6451
39299.374087 | sdg: tur state = up
39299.374156 | sda: udev property ID_WWN whitelisted
39299.374186 | sdb: udev property ID_WWN whitelisted
39299.374211 | sdc: udev property ID_WWN whitelisted
39299.374242 | sdd: udev property ID_WWN whitelisted
39299.374265 | sde: udev property ID_WWN whitelisted
39299.374294 | sdf: udev property ID_WWN whitelisted
39299.374318 | sdg: udev property ID_WWN whitelisted
39299.374352 | sdh: udev property ID_WWN whitelisted
39299.374785 | unloading tur checker
39299.374847 | unloading const prioritizer
root@genestack-compute1:~#
When using multiple LVM iSCSI nodes with TGT and creating identically sized volumes being mounted to the same compute node causes incorrect grouping of paths by multipath, leading to attachment issues. This may be due to identical serial numbers being created.
single 10gb volume being attached to instance
two 10gb volumes being attached to instance from two different lvm nodes
TGT view
when creating different size volumes multipath does not map correctly: