For both iSCSI initiator and target increase socket buffer sizes before
establishing connection.
This is a workaround for Chelsio TOE driver, that does not update socket
buffer size in hardware after connection established, and unless that is
done beforehand, kernel code will stuck, attempting to send/receive full
PDU at once.
In conf_apply() remove iSCSI ports from kernel before removing LUNs.
Previous order confused initiators with messages about "removed" LUNs
during simple ctld restart without any real config change. After this
commit initiators only reestablish lost connection, receive "Power on
occurred" UNIT ATTENTION status and continue normal operation.
Add missing error checking for kernel_port_{add,remove}(). Both can fail
for reasons yet unknown; don't make it increment cumulated_error as a kind
of temporary workaround.
MFC r275399:
Fix null pointer dereference.
Sponsored by: The FreeBSD Foundation
While we don't support MCS, hole in received sequence numbers may mean
only PDU loss. While we don't support lost PDU recovery, terminate the
connection to avoid stuck commands.
While there, improve handling of sequence numbers wrap after 2^32 PDUs.
Remove the pidfile clause from the ctl.conf example. Why do everyone
just copy/paste this line into their configs, it's beyond me.
Sponsored by: The FreeBSD Foundation
Add support for sending redirections to iSCSI target.
MFC r274309:
Fix several nits in redirection handling - don't use wrong CSG,
and avoid use-after-free.
Sponsored by: The FreeBSD Foundation
Make it possible to optionally use semicolon to separate statements.
This makes it possible to format stuff like this:
target xxx {
lun 0 { path /foo/bar; size 4G; }
}
Sponsored by: The FreeBSD Foundation
Add discovery-filter. This makes it possible to restrict which targets
are returned during discovery based on initiator portal, name, and CHAP
credentials.
Remove the distinction between strings and numbers from ctld(8) yacc parser.
This fixes problems with passing strings that look like numbers to clauses
that expect strings; previously it caused syntax errors and had to be worked
by user, using quotes. The workaround introduced in r267833 is no longer
neccessary.
Sponsored by: The FreeBSD Foundation
This makes ctld(8) register its iSCSI targets and portals on configured
iSNS servers to allow initiators find them without active discovery.
Fetching of allowed initiators from iSNS is not implemented now, so target
ACLs still should be configured manually.
Relnotes: Yes
Sponsored by: iXsystems, Inc.
Make both iSCSI initiator and target support base64 encoded CHAP data.
While all tested initiators and targets use hex-encoded CHAP data, RFC also
allows base64 encoding there, and Microsoft certificaition tool uses it.
Fix ctld(8) to not show the "auth-group <name> not assigned to any target"
warning for auth-groups assigned to a portal-group.
Sponsored by: The FreeBSD Foundation
Make ctld start even if some LUNs are unable to open backing storage.
Such LUNs will be visible to initiators, but return "not ready" status
on media access commands. If backing storage become available later,
`ctladm modify ...` or `service ctld reload` can trigger its reopen.
on configuration reload also if that size was not specified in the new
configuration.
Previously it happened only if size was explicitly changed in config.
Approved by: re (delphij)
Improve markup and language throughout the ctl.conf man page
MFC r271543:
Add the new iscsi(4) man page
Cross reference it from iscsid(8) and iscsictl(8)
Approved by: re (gjb), bcr (mentor)
Fix ctld(8) to not forget to send TargetPortalGroupTag and TargetAlias
when the initiator skips security negotiation. This fixes interoperability
with Xtend SAN initiator.
PR: 193021
Approved by: re (marius)
Sponsored by: The FreeBSD Foundation
Add missing libraries to DPADD; sort DPADD so DPADD and LDADD match up
This fixes "make checkdpadd"
Approved by: jmmv (mentor)
Phabric: D630
PR: 192765
Close race in r268291 between port destruction, delayed by sessions
teardown, and new port creation during `service ctld restart`.
Close it by returning iSCSI port internal state, that allows to identify
dying ports, which should not be counted as existing, from really alive.
Pass through iSCSI session ISID from LOGIN request to the CTL frontend.
ISID is an important part of initiator transport ID for iSCSI. It is not
used now, but should be to properly implement persistent reservation.
Burry devid port method, which was a gross hack.
Instead make ports provide wanted port and target IDs, and LUNs provide
wanted LUN IDs. After that core Device ID VPD code only had to link all
of them together and add relative port and port group numbers.
LUN ID for iSCSI LUNs no longer created by CTL, but by ctld, and passed
to CTL as "scsiname" LUN option. This makes LUNs to report the same set
of IDs, independently from the port through which it is accessed, as
required by SCSI specifications.
Create separate CTL port for every iSCSI target (and maybe portal group).
Having single port for all iSCSI connections makes problematic implementing
some more advanced SCSI functionality in CTL, that require proper ports
enumeration and identification.
This change extends CTL iSCSI API, making ctld daemon to control list of
iSCSI ports in CTL. When new target is defined in config fine, ctld will
create respective port in CTL. When target is removed -- port will be
also removed after all active commands through that port properly aborted.
This change require ctld to be rebuilt to match the kernel.
As a minor side effect, this allows to have iSCSI targets without LUNs.
While that may look odd and not very useful, that is not incorrect.