[Bug 293076] ctld regression in FreeBSD 15: multiple physical ports per target rejected and ports not enabled automatically

[email protected] Wed, 11 Mar 2026 08:07:21 +0000
Newsgroups gmane.os.freebsd.devel.scsi
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D293076

--- Comment #4 from Ken J. Thomson <[email protected]> ---
Hi,

Multiple port issue seems fixed, however port online still there.

as you said port::kernel_add() is only called for new ports, not existing o=
nes.
On first start, ports already exist in the kernel like this case not enable=
d.
Also ctld reload case could be an issue in this situation.=20


# ctld -d -f /etc/ctl.conf=20
ctld: obtaining configuration from /etc/ctl.conf
ctld: /etc/ctl.conf is world-readable
ctld: auth-group "default" not defined; going with defaults
ctld: portal-group "default" not defined; going with defaults
ctld: transport-group "default" not defined; going with defaults
ctld: opening pidfile /var/run/ctld.pid
ctld: obtaining previously configured CTL luns from the kernel
ctld: CTL port 0 "camsim" wasn't managed by ctld;=20
ctld: CTL port 1 "ioctl" wasn't managed by ctld;=20
ctld: CTL port 2 "tpc" wasn't managed by ctld;=20
ctld: CTL port 3 "ocs_fc0" wasn't managed by ctld;=20
ctld: CTL port 4 "ocs_fc1" wasn't managed by ctld;=20
ctld: adding lun "example_1"
ctld: adding port "default-naa.50015178f369f092"
ctld: listening on 0.0.0.0, portal-group "default"
ctld: listening on [::], portal-group "default"
ctld: not listening on transport-group "default", not assigned to any target

# ctladm portlist -v
Port Online Frontend Name     pp vp
0    NO     camsim   camsim   0  0  naa.5000000ccf2b8f01
  Target: naa.5000000ccf2b8f00
  All LUNs mapped
      port_type=3D8
1    YES    ioctl    ioctl    0  0=20=20
  All LUNs mapped
      port_type=3D4
2    YES    tpc      tpc      0  0=20=20
  All LUNs mapped
      port_type=3D8
3    NO     camtgt   ocs_fc0  0  0=20=20
  All LUNs mapped
      port_type=3D1
4    NO     camtgt   ocs_fc1  0  0=20=20
  All LUNs mapped
      port_type=3D1
5    YES    iscsi    iscsi    256 1  naa.50015178f369f092,t,0x0100
  Target: naa.50015178f369f092
  LUN 0: 0
      port_type=3D16
      cfiscsi_state=3D1
      cfiscsi_target=3Dnaa.50015178f369f092
      ctld_portal_group_name=3Ddefault
      cfiscsi_portal_group_tag=3D256


# ctladm port -o on
Front End Ports enabled

# ctladm portlist -v
Port Online Frontend Name     pp vp
0    YES    camsim   camsim   0  0  naa.5000000ccf2b8f01
  Target: naa.5000000ccf2b8f00
  All LUNs mapped
      port_type=3D8
1    YES    ioctl    ioctl    0  0=20=20
  All LUNs mapped
      port_type=3D4
2    YES    tpc      tpc      0  0=20=20
  All LUNs mapped
      port_type=3D8
3    YES    camtgt   ocs_fc0  0  0  naa.100000109b223c61
  Target: naa.200000109b223c61
  All LUNs mapped
      port_type=3D1
4    YES    camtgt   ocs_fc1  0  0  naa.100000109b223c62
  Target: naa.200000109b223c62
  All LUNs mapped
      port_type=3D1
5    YES    iscsi    iscsi    256 1  naa.50015178f369f092,t,0x0100
  Target: naa.50015178f369f092
  LUN 0: 0
      port_type=3D16
      cfiscsi_state=3D1
      cfiscsi_target=3Dnaa.50015178f369f092
      ctld_portal_group_name=3Ddefault
      cfiscsi_portal_group_tag=3D256

--=20
You are receiving this mail because:
You are the assignee for the bug.=