iSCSI config and /etc/ctl.conf are misaligned

Status
Not open for further replies.

HermesGroup

Cadet
Joined
May 22, 2017
Messages
9
Hi fellas,
are you aware of the mechanism by which the GUI writes the iSCSI configuration in /etc/ctl.conf?
I found ghost portal groups in /etc/ctl.conf, but in the GUI those are just blank/unconfigured.
If I edit /etc/ctl.conf and service ctld reload nothing changes, but after FreeNAS 11 reboot, /etc/ctl.conf is messed up again.

Thanks

Johnny R.
 
D

dlavigne

Guest
System build (System -> Information)? Did you create the portal groups using the GUI? Did you create them on a fresh install or did you upgrade since they were created/deleted? If so, from which version did you initially create them on?
 

HermesGroup

Cadet
Joined
May 22, 2017
Messages
9
I created everything from the GUI. This NAS is a fresh install of 11.0-RC4, I created volumes and shared them via iSCSI a few days later after updating to 11.0-STABLE.
Current build is a2dc21583.

Johnny R.
 

HermesGroup

Cadet
Joined
May 22, 2017
Messages
9
I'm not experienced at all with FreeNAS, I created everything from the GUI after reading the online doc.
The Portal 1 is still working great: it is serving an Exent via multipath FC, to a pair of XenServer Hosts (thank you so much developers!).
The portal 2 worked just at the beginning, with a basic initiator single connection.
Then I tested some configuration: for example I tried to modify listening port from 3260 to 3261 (and everything broke).
I added then portal 3 in order to try to test a multipath iSCSI setup, but it got worse.

FreeNAS configs:

iSCSI-Sharign.png


Targets.png


The Extent that worked via iSCSI at the beginning is "Extent-iSCSI". I have 3TB on it (it took a week to fill it with 1M files).

Extents.png


AssociatedTargets.png


This is what happens from a Debian 8.8 VM. Working target:

Code:
root@fileserver:~# iscsiadm -d 3 -m discovery -t st -p 10.166.3.100:3260 -I iscsi-0
iscsiadm: ip 10.166.3.100, port 3260, tgpt -1
iscsiadm: Max file limits 65536 65536

iscsiadm: Could not match iface[hw=,ip=,net_if=eth2,iscsi_if=iscsi-0] to host.
iscsiadm: Could not open /etc/iscsi/send_targets/10.166.3.100,3260: No such file or directory

iscsiadm: starting sendtargets discovery, address 10.166.3.100:3260,
iscsiadm: connecting to 10.166.3.100:3260
iscsiadm: connected local port 39228 to 10.166.3.100:3260
iscsiadm: connected to discovery address 10.166.3.100
iscsiadm: login response status 0000
iscsiadm: discovery process to 10.166.3.100:3260 exiting
iscsiadm: disconnecting conn 0x1bbd240, fd 3
10.166.3.100:3260,-1 iqn.2005-10.org.freenas.ctl:storage01


Not working targets:
Code:

root@fileserver:~# iscsiadm -d 3 -m discovery -t st -p 10.166.3.100:3261 -I iscsi-0
iscsiadm: ip 10.166.3.100, port 3261, tgpt -1
iscsiadm: Max file limits 65536 65536

iscsiadm: Could not match iface[hw=,ip=,net_if=eth2,iscsi_if=iscsi-0] to host.
iscsiadm: starting sendtargets discovery, address 10.166.3.100:3261,
iscsiadm: connecting to 10.166.3.100:3261
iscsiadm: connected local port 40474 to 10.166.3.100:3261
iscsiadm: connected to discovery address 10.166.3.100
iscsiadm: login response status 0000
iscsiadm: discovery process to 10.166.3.100:3261 exiting
iscsiadm: disconnecting conn 0x13b4240, fd 3
iscsiadm: No portals found

root@fileserver:~# iscsiadm -d 3 -m discovery -t st -p 10.166.4.100:3262 -I iscsi-1
iscsiadm: ip 10.166.4.100, port 3262, tgpt -1
iscsiadm: Max file limits 65536 65536

iscsiadm: Could not match iface[hw=,ip=,net_if=eth3,iscsi_if=iscsi-1] to host.
iscsiadm: Could not open /etc/iscsi/send_targets/10.166.4.100,3262: No such file or directory

iscsiadm: starting sendtargets discovery, address 10.166.4.100:3262,
iscsiadm: connecting to 10.166.4.100:3262
iscsiadm: connected local port 43554 to 10.166.4.100:3262
iscsiadm: connected to discovery address 10.166.4.100
iscsiadm: login response status 0000
iscsiadm: discovery process to 10.166.4.100:3262 exiting
iscsiadm: disconnecting conn 0x19a3240, fd 3
iscsiadm: No portals found



This is /etc/ctl.conf on FreeNAS: does it look good?

Code:

portal-group default {
}

portal-group pg1 {
  tag 0x0001
  discovery-filter portal-name
  discovery-auth-group no-authentication
  listen 0.0.0.0:3260
  option ha_shared on
}

portal-group pg2 {
  tag 0x0002
  discovery-filter portal-name
  discovery-auth-group no-authentication
  listen 10.166.3.100:3261
  option ha_shared on
}

portal-group pg3 {
  tag 0x0003
  discovery-filter portal-name
  discovery-auth-group no-authentication
  listen 10.166.4.100:3262
  option ha_shared on
}

lun "Extent-XenSR-ISO" {
  ctl-lun 0
  path "/mnt/Eight-8TB-Disks/xensr-iso"
  blocksize 512
  serial "441ea145ccec00"
  device-id "iSCSI Disk  441ea145ccec00"
  size 30G
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc0000001a1c292379c99d084a1
  option insecure_tpc on
  option avail-threshold 28991029248
  option rpm 1
}

lun "Extent-XenSR-VM" {
  ctl-lun 1
  path "/mnt/Eight-8TB-Disks/xensr-vm"
  blocksize 512
  serial "441ea145ccec01"
  device-id "iSCSI Disk  441ea145ccec01"
  size 1560G
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc000000de60f6958693e99de57
  option insecure_tpc on
  option avail-threshold 1507533520896
  option rpm 1
}

lun "Extent-iSCSI" {
  ctl-lun 2
  path "/mnt/Eight-8TB-Disks/Extent-iSCSI"
  blocksize 4096
  serial "441ea145ccec02"
  device-id "iSCSI Disk  441ea145ccec02  "
  size 8T
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc000000380b355d56db68beac9
  option insecure_tpc on
  option avail-threshold 7916483719987
  option rpm 1
}

lun "Extent-iSCSI-OM" {
  ctl-lun 3
  path "/mnt/Eight-8TB-Disks/Extent-iSCSI-OM"
  blocksize 4096
  serial "441ea145ccec03"
  device-id "iSCSI Disk  441ea145ccec03  "
  size 7T
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc00000081d7042ff42cfb72fb8
  option insecure_tpc on
  option avail-threshold 6926923254988
  option rpm 1
}

target iqn.2005-10.org.freenas.ctl:storage01 {
  alias "storage01"
  portal-group pg1 no-authentication

  lun 0 "Extent-XenSR-ISO"
  lun 1 "Extent-XenSR-VM"
}

auth-group ag4tg2_2 {
  initiator-name "10.166.3.0/24"
  initiator-portal "10.166.3.0/24"
  auth-type "none"
}

target iqn.2005-10.org.freenas.ctl:storage01-iscsi-target-a {
  alias "storage01-iscsi-target-a"
  portal-group pg2 ag4tg2_2

  lun 2 "Extent-iSCSI"
  lun 3 "Extent-iSCSI-OM"
}

auth-group ag4tg3_3 {
  initiator-name "10.166.4.0/24"
  initiator-portal "10.166.4.0/24"
  auth-type "none"
}

target iqn.2005-10.org.freenas.ctl:storage01-iscsi-target-b {
  alias "storage01-iscsi-target-b"
  portal-group pg3 ag4tg3_3

  lun 2 "Extent-iSCSI"
  lun 3 "Extent-iSCSI-OM"
}





Johnny R.
 

HermesGroup

Cadet
Joined
May 22, 2017
Messages
9
I'm not experienced at all with FreeNAS, I created everything from the GUI after reading the online doc.
The Portal 1 is still working great: it is serving an Exent via multipath FC, to a pair of XenServer Hosts (thank you so much developers!).
The portal 2 worked just at the beginning, with a basic initiator single connection.
Then I tested some configuration: for example I tried to modify listening port from 3260 to 3261 (and everything broke).
I added then portal 3 in order to try to test a multipath iSCSI setup, but it got worse.

FreeNAS configs:

iSCSI-Sharign.png


Targets.png


The Extent that worked via iSCSI at the beginning is "Extent-iSCSI". I have 3TB on it (it took a week to fill it with 1M files).

Extents.png


AssociatedTargets.png


This is what happens from a Debian 8.8 VM. Working target:

Code:
root@fileserver:~# iscsiadm -d 3 -m discovery -t st -p 10.166.3.100:3260 -I iscsi-0
iscsiadm: ip 10.166.3.100, port 3260, tgpt -1
iscsiadm: Max file limits 65536 65536

iscsiadm: Could not match iface[hw=,ip=,net_if=eth2,iscsi_if=iscsi-0] to host.
iscsiadm: Could not open /etc/iscsi/send_targets/10.166.3.100,3260: No such file or directory

iscsiadm: starting sendtargets discovery, address 10.166.3.100:3260,
iscsiadm: connecting to 10.166.3.100:3260
iscsiadm: connected local port 39228 to 10.166.3.100:3260
iscsiadm: connected to discovery address 10.166.3.100
iscsiadm: login response status 0000
iscsiadm: discovery process to 10.166.3.100:3260 exiting
iscsiadm: disconnecting conn 0x1bbd240, fd 3
10.166.3.100:3260,-1 iqn.2005-10.org.freenas.ctl:storage01


Not working targets:
Code:

root@fileserver:~# iscsiadm -d 3 -m discovery -t st -p 10.166.3.100:3261 -I iscsi-0
iscsiadm: ip 10.166.3.100, port 3261, tgpt -1
iscsiadm: Max file limits 65536 65536

iscsiadm: Could not match iface[hw=,ip=,net_if=eth2,iscsi_if=iscsi-0] to host.
iscsiadm: starting sendtargets discovery, address 10.166.3.100:3261,
iscsiadm: connecting to 10.166.3.100:3261
iscsiadm: connected local port 40474 to 10.166.3.100:3261
iscsiadm: connected to discovery address 10.166.3.100
iscsiadm: login response status 0000
iscsiadm: discovery process to 10.166.3.100:3261 exiting
iscsiadm: disconnecting conn 0x13b4240, fd 3
iscsiadm: No portals found

root@fileserver:~# iscsiadm -d 3 -m discovery -t st -p 10.166.4.100:3262 -I iscsi-1
iscsiadm: ip 10.166.4.100, port 3262, tgpt -1
iscsiadm: Max file limits 65536 65536

iscsiadm: Could not match iface[hw=,ip=,net_if=eth3,iscsi_if=iscsi-1] to host.
iscsiadm: Could not open /etc/iscsi/send_targets/10.166.4.100,3262: No such file or directory

iscsiadm: starting sendtargets discovery, address 10.166.4.100:3262,
iscsiadm: connecting to 10.166.4.100:3262
iscsiadm: connected local port 43554 to 10.166.4.100:3262
iscsiadm: connected to discovery address 10.166.4.100
iscsiadm: login response status 0000
iscsiadm: discovery process to 10.166.4.100:3262 exiting
iscsiadm: disconnecting conn 0x19a3240, fd 3
iscsiadm: No portals found



This is /etc/ctl.conf on FreeNAS: does it look good?
I expected to have a different configuration for pg2 and pg3 such as
"portal-group pg1 no-authentication"

Code:

portal-group default {
}

portal-group pg1 {
  tag 0x0001
  discovery-filter portal-name
  discovery-auth-group no-authentication
  listen 0.0.0.0:3260
  option ha_shared on
}

portal-group pg2 {
  tag 0x0002
  discovery-filter portal-name
  discovery-auth-group no-authentication
  listen 10.166.3.100:3261
  option ha_shared on
}

portal-group pg3 {
  tag 0x0003
  discovery-filter portal-name
  discovery-auth-group no-authentication
  listen 10.166.4.100:3262
  option ha_shared on
}

lun "Extent-XenSR-ISO" {
  ctl-lun 0
  path "/mnt/Eight-8TB-Disks/xensr-iso"
  blocksize 512
  serial "441ea145ccec00"
  device-id "iSCSI Disk  441ea145ccec00"
  size 30G
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc0000001a1c292379c99d084a1
  option insecure_tpc on
  option avail-threshold 28991029248
  option rpm 1
}

lun "Extent-XenSR-VM" {
  ctl-lun 1
  path "/mnt/Eight-8TB-Disks/xensr-vm"
  blocksize 512
  serial "441ea145ccec01"
  device-id "iSCSI Disk  441ea145ccec01"
  size 1560G
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc000000de60f6958693e99de57
  option insecure_tpc on
  option avail-threshold 1507533520896
  option rpm 1
}

lun "Extent-iSCSI" {
  ctl-lun 2
  path "/mnt/Eight-8TB-Disks/Extent-iSCSI"
  blocksize 4096
  serial "441ea145ccec02"
  device-id "iSCSI Disk  441ea145ccec02  "
  size 8T
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc000000380b355d56db68beac9
  option insecure_tpc on
  option avail-threshold 7916483719987
  option rpm 1
}

lun "Extent-iSCSI-OM" {
  ctl-lun 3
  path "/mnt/Eight-8TB-Disks/Extent-iSCSI-OM"
  blocksize 4096
  serial "441ea145ccec03"
  device-id "iSCSI Disk  441ea145ccec03  "
  size 7T
  option vendor "FreeNAS"
  option product "iSCSI Disk"
  option revision "0123"
  option naa 0x6589cfc00000081d7042ff42cfb72fb8
  option insecure_tpc on
  option avail-threshold 6926923254988
  option rpm 1
}

target iqn.2005-10.org.freenas.ctl:storage01 {
  alias "storage01"
  portal-group pg1 no-authentication

  lun 0 "Extent-XenSR-ISO"
  lun 1 "Extent-XenSR-VM"
}

auth-group ag4tg2_2 {
  initiator-name "10.166.3.0/24"
  initiator-portal "10.166.3.0/24"
  auth-type "none"
}

target iqn.2005-10.org.freenas.ctl:storage01-iscsi-target-a {
  alias "storage01-iscsi-target-a"
  portal-group pg2 ag4tg2_2

  lun 2 "Extent-iSCSI"
  lun 3 "Extent-iSCSI-OM"
}

auth-group ag4tg3_3 {
  initiator-name "10.166.4.0/24"
  initiator-portal "10.166.4.0/24"
  auth-type "none"
}

target iqn.2005-10.org.freenas.ctl:storage01-iscsi-target-b {
  alias "storage01-iscsi-target-b"
  portal-group pg3 ag4tg3_3

  lun 2 "Extent-iSCSI"
  lun 3 "Extent-iSCSI-OM"
}





Johnny R.
 
D

dlavigne

Guest
What happens if you use the GUI to delete the non-working "Associated Targets" and "Portals" and remake them?

Also, is there a firewall between the system and the client initiators?
 

HermesGroup

Cadet
Joined
May 22, 2017
Messages
9
Thanks I removed the configuration again. This time I noticed the problem and fixed Initiator configuration, just specified ALL for authorized initiators and it works.

A messagge such as "iscsiadm: No Authorized initiator" would be very useful :) It is not a FreeNAS problem in this case, but It would still be useful to have this error in FreeNAS logs.

Regards,

Johnny R.
 
Last edited:
Status
Not open for further replies.
Top