Copyright (c) 2015 Alexander Motin <mav@FreeBSD.org>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
$FreeBSD: releng/11.0/share/man/man4/ctl.4 288310 2015-09-27 13:47:28Z mav $
.Dd September 27, 2015 .Dt CTL 4 .Os .Sh NAME .Nm ctl .Nd CAM Target Layer / iSCSI target .Sh SYNOPSIS To compile this driver into the kernel, place the following line in your kernel configuration file: d -ragged -offset indent .Cd "device iscsi" .Cd "device ctl" .Ed
p Alternatively, to load the driver as a module at boot time, place the following line in .Xr loader.conf 5 : d -literal -offset indent ctl_load="YES" .Ed .Sh DESCRIPTION The .Nm subsystem provides SCSI disk and processor emulation. It supports features such as:
p l -bullet -compact t Disk, processor and cdrom device emulation t Tagged queueing t SCSI task attribute support (ordered, head of queue, simple tags) t SCSI implicit command ordering support t Full task management support (abort, LUN reset, target reset, etc.) t Support for multiple ports t Support for multiple simultaneous initiators t Support for multiple simultaneous backing stores t Support for VMWare VAAI: COMPARE AND WRITE, XCOPY, WRITE SAME, and UNMAP commands t Support for Microsoft ODX: POPULATE TOKEN/WRITE USING TOKEN, WRITE SAME, and UNMAP commands t Persistent reservation support t Mode sense/select support t Error injection support t High Availability clustering support with ALUA t All I/O handled in-kernel, no userland context switch overhead .El
p It also serves as a kernel component of the native iSCSI target. .Sh SYSCTL VARIABLES The following variables are available as both .Xr sysctl 8 variables and .Xr loader 8 tunables: l -tag -width indent t Va kern.cam.ctl.debug Bit mask of enabled CTL log levels: l -tag -offset indent -compact t 1 log commands with errors; t 2 log all commands; t 4 log data for commands other then READ/WRITE. .El Defaults to 0. t Va kern.cam.ctl.ha_id Specifies unique position of this node within High Availability cluster. Default is 0 -- no HA, 1 and 2 -- HA enabled at specified position. t Va kern.cam.ctl.ha_mode Specifies High Availability cluster operation mode: l -tag -offset indent -compact t 0 Active/Standby -- primary node has backend access and processes requests, while secondary can only do basic LUN discovery and reservation; t 1 Active/Active -- both nodes have backend access and process requests, while secondary node synchronizes processing with primary one; t 2 Active/Active -- primary node has backend access and processes requests, while secondary node forwards all requests and data to primary one; .El All above modes require established connection between HA cluster nodes. If connection is not configured, secondary node will report Unavailable state; if configured but not established -- Transitioning state. Defaults to 0. t Va kern.cam.ctl.ha_peer String value, specifying method to establish connection to peer HA node. Can be "listen IP:port", "connect IP:port" or empty. t Va kern.cam.ctl.ha_link Reports present state of connection between HA cluster nodes: l -tag -offset indent -compact t 0 not configured; t 1 configured but not established; t 2 established. .El t Va kern.cam.ctl.ha_role Specifies default role of this node: l -tag -offset indent -compact t 0 primary; t 1 secondary. .El This role can be overriden on per-LUN basis using "ha_role" LUN option, so that for one LUN one node is primary, while for another -- another. Role change from primary to secondary for HA modes 0 and 2 closes backends, the opposite change -- opens. If there is no primary node (both nodes are secondary, or secondary node has no connection to primary one), secondary node(s) report Transitioning state. State with two primary nodes is illegal (split brain condition). t Va kern.cam.ctl.iscsi.debug Verbosity level for log messages from the kernel part of iSCSI target. Set to 0 to disable logging or 1 to warn about potential problems. Larger values enable debugging output. Defaults to 1. t Va kern.cam.ctl.iscsi.maxcmdsn_delta The number of outstanding commands to advertise to the iSCSI initiator. Technically, it is the difference between ExpCmdSN and MaxCmdSN fields in the iSCSI PDU. Defaults to 256. t Va kern.cam.ctl.iscsi.ping_timeout The number of seconds to wait for the iSCSI initiator to respond to a NOP-In PDU. In the event that there is no response within that time the session gets forcibly terminated. Set to 0 to disable sending NOP-In PDUs. Defaults to 5. .El .Sh SEE ALSO .Xr ctladm 8 , .Xr ctld 8 , .Xr ctlstat 8 .Sh HISTORY The .Nm subsystem first appeared in .Fx 9.1 . .Sh AUTHORS The .Nm subsystem was originally written by .An Kenneth Merry Aq Mt ken@FreeBSD.org . Later work was done by .An Alexander Motin Aq Mt mav@FreeBSD.org .