Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

Ubuntu 20.04 - PetaSAN kernel 4.12.14-28-petasan not presenting iSCSI targets

I know this topic isn't totally PetaSAN related, but I am using the 4.12.14-28-petasan kernel on top of Ubuntu 20.04 in an attempt to get LIO iSCSI on top of rbd (I know certain kernel modules must be loaded to make this work).

As a first pass I am trying to get generic file based iSCSI working. I can get this working with the stock Ubuntu kernel, and the target appears when queried from an iSCSI initiator, however when I boot the 4.12.14-28-petasan kernel the target no longer appears when queried from an iSCSI initiator.

Here is a list of the targetcli-fb configuration when running the 4.12.14-28-petasan kernel:

o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 1]
  | | o- disk01 ............................................................... [/var/lib/disk01.img (10.0GiB) write-back activated]
  | |   o- alua ................................................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  | o- rbd .................................................................................................... [Storage Objects: 0]
  | o- user:fbo ............................................................................................... [Storage Objects: 0]
  | o- user:qcow .............................................................................................. [Storage Objects: 0]
  | o- user:rbd ............................................................................................... [Storage Objects: 0]
  | o- user:zbc ............................................................................................... [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.iscsitest.x8664:sn.9a316eae1540 ....................................................... [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.1991-05.com.microsoft:win-vl3jr2deeet ............................................................ [Mapped LUNs: 1]
  |     |   o- mapped_lun1 ............................................................................... [lun1 fileio/disk01 (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun1 ......................................................... [fileio/disk01 (/var/lib/disk01.img) (default_tg_pt_gp)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]
  o- xen-pvscsi ....................................................................................................... [Targets: 0]

Here is a list of the targetcli-fb configuration when running the stock Ubuntu kernel:

o- / ......................................................................................................................... [...]
  o- backstores .............................................................................................................. [...]
  | o- block .................................................................................................. [Storage Objects: 0]
  | o- fileio ................................................................................................. [Storage Objects: 1]
  | | o- disk01 ............................................................... [/var/lib/disk01.img (10.0GiB) write-back activated]
  | |   o- alua ................................................................................................... [ALUA Groups: 1]
  | |     o- default_tg_pt_gp ....................................................................... [ALUA state: Active/optimized]
  | o- pscsi .................................................................................................. [Storage Objects: 0]
  | o- ramdisk ................................................................................................ [Storage Objects: 0]
  | o- rbd .................................................................................................... [Storage Objects: 0]
  | o- user:fbo ............................................................................................... [Storage Objects: 0]
  | o- user:qcow .............................................................................................. [Storage Objects: 0]
  | o- user:rbd ............................................................................................... [Storage Objects: 0]
  | o- user:zbc ............................................................................................... [Storage Objects: 0]
  o- iscsi ............................................................................................................ [Targets: 1]
  | o- iqn.2003-01.org.linux-iscsi.iscsitest.x8664:sn.9a316eae1540 ....................................................... [TPGs: 1]
  |   o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
  |     o- acls .......................................................................................................... [ACLs: 1]
  |     | o- iqn.1991-05.com.microsoft:win-vl3jr2deeet ............................................................ [Mapped LUNs: 1]
  |     |   o- mapped_lun1 ............................................................................... [lun1 fileio/disk01 (rw)]
  |     o- luns .......................................................................................................... [LUNs: 1]
  |     | o- lun1 ......................................................... [fileio/disk01 (/var/lib/disk01.img) (default_tg_pt_gp)]
  |     o- portals .................................................................................................... [Portals: 1]
  |       o- 0.0.0.0:3260 ..................................................................................................... [OK]
  o- loopback ......................................................................................................... [Targets: 0]
  o- vhost ............................................................................................................ [Targets: 0]
  o- xen-pvscsi ....................................................................................................... [Targets: 0]

Please let me know what additional troubleshooting data you need from me to figure out why LIO is not presenting the iSCSI targets to initiators

It turns out having the portal use 0.0.0.0 causes the target not to present. You have to specify the IP address that the target will present on. This gave me a clue: https://github.com/robertoberto/petasan/blob/master/kernel/ps-06-sendtarget-match-portal.patch