1009ea47eSEdward Tomasz Napierala.\" Copyright (c) 2012 The FreeBSD Foundation 2*db7bf2baSAlexander Motin.\" Copyright (c) 2015 Alexander Motin <mav@FreeBSD.org> 3009ea47eSEdward Tomasz Napierala.\" All rights reserved. 4009ea47eSEdward Tomasz Napierala.\" 5009ea47eSEdward Tomasz Napierala.\" This software was developed by Edward Tomasz Napierala under sponsorship 6009ea47eSEdward Tomasz Napierala.\" from the FreeBSD Foundation. 7009ea47eSEdward Tomasz Napierala.\" 8009ea47eSEdward Tomasz Napierala.\" Redistribution and use in source and binary forms, with or without 9009ea47eSEdward Tomasz Napierala.\" modification, are permitted provided that the following conditions 10009ea47eSEdward Tomasz Napierala.\" are met: 11009ea47eSEdward Tomasz Napierala.\" 1. Redistributions of source code must retain the above copyright 12009ea47eSEdward Tomasz Napierala.\" notice, this list of conditions and the following disclaimer. 13009ea47eSEdward Tomasz Napierala.\" 2. Redistributions in binary form must reproduce the above copyright 14009ea47eSEdward Tomasz Napierala.\" notice, this list of conditions and the following disclaimer in the 15009ea47eSEdward Tomasz Napierala.\" documentation and/or other materials provided with the distribution. 16009ea47eSEdward Tomasz Napierala.\" 17009ea47eSEdward Tomasz Napierala.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 18009ea47eSEdward Tomasz Napierala.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19009ea47eSEdward Tomasz Napierala.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20009ea47eSEdward Tomasz Napierala.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 21009ea47eSEdward Tomasz Napierala.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22009ea47eSEdward Tomasz Napierala.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23009ea47eSEdward Tomasz Napierala.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24009ea47eSEdward Tomasz Napierala.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25009ea47eSEdward Tomasz Napierala.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26009ea47eSEdward Tomasz Napierala.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27009ea47eSEdward Tomasz Napierala.\" SUCH DAMAGE. 28009ea47eSEdward Tomasz Napierala.\" 29009ea47eSEdward Tomasz Napierala.\" $FreeBSD$ 30009ea47eSEdward Tomasz Napierala.\" 31*db7bf2baSAlexander Motin.Dd September 7, 2015 32009ea47eSEdward Tomasz Napierala.Dt CTL.CONF 5 33009ea47eSEdward Tomasz Napierala.Os 34009ea47eSEdward Tomasz Napierala.Sh NAME 35009ea47eSEdward Tomasz Napierala.Nm ctl.conf 36009ea47eSEdward Tomasz Napierala.Nd CAM Target Layer / iSCSI target daemon configuration file 37009ea47eSEdward Tomasz Napierala.Sh DESCRIPTION 38009ea47eSEdward Tomasz NapieralaThe 39009ea47eSEdward Tomasz Napierala.Nm 40009ea47eSEdward Tomasz Napieralaconfiguration file is used by the 41009ea47eSEdward Tomasz Napierala.Xr ctld 8 42009ea47eSEdward Tomasz Napieraladaemon. 43009ea47eSEdward Tomasz NapieralaLines starting with 44009ea47eSEdward Tomasz Napierala.Ql # 45c63d8c3bSEdward Tomasz Napieralaare interpreted as comments. 46009ea47eSEdward Tomasz NapieralaThe general syntax of the 47009ea47eSEdward Tomasz Napierala.Nm 48009ea47eSEdward Tomasz Napieralafile is: 49009ea47eSEdward Tomasz Napierala.Bd -literal -offset indent 50d1e933edSAllan Jude.No pidfile Ar path 51009ea47eSEdward Tomasz Napierala 52d1e933edSAllan Jude.No auth-group Ar name No { 53d1e933edSAllan Jude.Dl chap Ar user Ar secret 54d1e933edSAllan Jude.Dl ... 55009ea47eSEdward Tomasz Napierala} 56009ea47eSEdward Tomasz Napierala 57d1e933edSAllan Jude.No portal-group Ar name No { 58d1e933edSAllan Jude.Dl listen Ar address 593a6accd5SEdward Tomasz Napierala.\".Dl listen-iser Ar address 60d1e933edSAllan Jude.Dl discovery-auth-group Ar name 61d1e933edSAllan Jude.Dl ... 62009ea47eSEdward Tomasz Napierala} 63009ea47eSEdward Tomasz Napierala 64d1e933edSAllan Jude.No target Ar name { 65d1e933edSAllan Jude.Dl auth-group Ar name 6610b5297fSEdward Tomasz Napierala.Dl portal-group Ar name 67d1e933edSAllan Jude.Dl lun Ar number No { 68d1e933edSAllan Jude.Dl path Ar path 69d1e933edSAllan Jude.Dl } 70d1e933edSAllan Jude.Dl ... 71009ea47eSEdward Tomasz Napierala} 72009ea47eSEdward Tomasz Napierala.Ed 73d1e933edSAllan Jude.Ss Global Context 74009ea47eSEdward Tomasz Napierala.Bl -tag -width indent 75d1e933edSAllan Jude.It Ic auth-group Ar name 76d1e933edSAllan JudeCreate an 77d1e933edSAllan Jude.Sy auth-group 78d1e933edSAllan Judeconfiguration context, 79ce20734fSAllan Judedefining a new auth-group, 80009ea47eSEdward Tomasz Napieralawhich can then be assigned to any number of targets. 81d1e933edSAllan Jude.It Ic debug Ar level 82d1e933edSAllan JudeThe debug verbosity level. 83009ea47eSEdward Tomasz NapieralaThe default is 0. 84d1e933edSAllan Jude.It Ic maxproc Ar number 85d1e933edSAllan JudeThe limit for concurrently running child processes handling 86009ea47eSEdward Tomasz Napieralaincoming connections. 87009ea47eSEdward Tomasz NapieralaThe default is 30. 88d1e933edSAllan JudeA setting of 0 disables the limit. 89d1e933edSAllan Jude.It Ic pidfile Ar path 90d1e933edSAllan JudeThe path to the pidfile. 91009ea47eSEdward Tomasz NapieralaThe default is 92009ea47eSEdward Tomasz Napierala.Pa /var/run/ctld.pid . 93d1e933edSAllan Jude.It Ic portal-group Ar name 94d1e933edSAllan JudeCreate a 95d1e933edSAllan Jude.Sy portal-group 96d1e933edSAllan Judeconfiguration context, 974f66b233SEdward Tomasz Napieraladefining a new portal-group, 98009ea47eSEdward Tomasz Napieralawhich can then be assigned to any number of targets. 99920c6cbaSAlexander Motin.It Ic lun Ar name 100920c6cbaSAlexander MotinCreate a 101920c6cbaSAlexander Motin.Sy lun 102d3219654SEdward Tomasz Napieralaconfiguration context, defining a LUN to be exported by any number of targets. 103d1e933edSAllan Jude.It Ic target Ar name 104d1e933edSAllan JudeCreate a 105d1e933edSAllan Jude.Sy target 106d3219654SEdward Tomasz Napieralaconfiguration context, which can optionally contain one or more 107d1e933edSAllan Jude.Sy lun 108d1e933edSAllan Judecontexts. 109d1e933edSAllan Jude.It Ic timeout Ar seconds 110d1e933edSAllan JudeThe timeout for login sessions, after which the connection 111009ea47eSEdward Tomasz Napieralawill be forcibly terminated. 112009ea47eSEdward Tomasz NapieralaThe default is 60. 113d1e933edSAllan JudeA setting of 0 disables the timeout. 114829603e2SAlexander Motin.It Ic isns-server Ar address 115829603e2SAlexander MotinAn IPv4 or IPv6 address and optionally port of iSNS server to register on. 116829603e2SAlexander Motin.It Ic isns-period Ar seconds 117829603e2SAlexander MotiniSNS registration period. 118829603e2SAlexander MotinRegistered Network Entity not updated during this period will be unregistered. 119be6527d5SEdward Tomasz NapieralaThe default is 900. 120829603e2SAlexander Motin.It Ic isns-timeout Ar seconds 121829603e2SAlexander MotinTimeout for iSNS requests. 122be6527d5SEdward Tomasz NapieralaThe default is 5. 123009ea47eSEdward Tomasz Napierala.El 124d1e933edSAllan Jude.Ss auth-group Context 125009ea47eSEdward Tomasz Napierala.Bl -tag -width indent 126d1e933edSAllan Jude.It Ic auth-type Ar type 127d1e933edSAllan JudeSets the authentication type. 128d1e933edSAllan JudeType can be either 129d1e933edSAllan Jude.Qq Ar none , 130d1e933edSAllan Jude.Qq Ar deny , 131d1e933edSAllan Jude.Qq Ar chap , 132d1e933edSAllan Judeor 133d1e933edSAllan Jude.Qq Ar chap-mutual . 134a8a5af86SWarren BlockIn most cases it is not necessary to set the type using this clause; 135d1e933edSAllan Judeit is usually used to disable authentication for a given 136d1e933edSAllan Jude.Sy auth-group . 137d1e933edSAllan Jude.It Ic chap Ar user Ar secret 138d1e933edSAllan JudeA set of CHAP authentication credentials. 139d1e933edSAllan JudeNote that for any 140d1e933edSAllan Jude.Sy auth-group , 141d1e933edSAllan Judethe configuration may only contain either 142d1e933edSAllan Jude.Sy chap 143d1e933edSAllan Judeor 144d1e933edSAllan Jude.Sy chap-mutual 145d1e933edSAllan Judeentries; it is an error to mix them. 146d1e933edSAllan Jude.It Ic chap-mutual Ar user Ar secret Ar mutualuser Ar mutualsecret 147d1e933edSAllan JudeA set of mutual CHAP authentication credentials. 148d1e933edSAllan JudeNote that for any 149d1e933edSAllan Jude.Sy auth-group , 150d1e933edSAllan Judethe configuration may only contain either 151d1e933edSAllan Jude.Sy chap 152d1e933edSAllan Judeor 153d1e933edSAllan Jude.Sy chap-mutual 154d1e933edSAllan Judeentries; it is an error to mix them. 155d1e933edSAllan Jude.It Ic initiator-name Ar initiator-name 156d1e933edSAllan JudeAn iSCSI initiator name. 157d1e933edSAllan JudeOnly initiators with a name matching one of the defined 158d1e933edSAllan Judenames will be allowed to connect. 1598cb2e958SEdward Tomasz NapieralaIf not defined, there will be no restrictions based on initiator 1608cb2e958SEdward Tomasz Napieralaname. 161d1e933edSAllan Jude.It Ic initiator-portal Ar address Ns Op / Ns Ar prefixlen 162d1e933edSAllan JudeAn iSCSI initiator portal: an IPv4 or IPv6 address, optionally 163d1e933edSAllan Judefollowed by a literal slash and a prefix length. 164d1e933edSAllan JudeOnly initiators with an address matching one of the defined 165d1e933edSAllan Judeaddresses will be allowed to connect. 1668cb2e958SEdward Tomasz NapieralaIf not defined, there will be no restrictions based on initiator 1678cb2e958SEdward Tomasz Napieralaaddress. 168009ea47eSEdward Tomasz Napierala.El 169d1e933edSAllan Jude.Ss portal-group Context 170009ea47eSEdward Tomasz Napierala.Bl -tag -width indent 171d1e933edSAllan Jude.It Ic discovery-auth-group Ar name 172d1e933edSAllan JudeAssign a previously defined authentication group to the portal group, 173009ea47eSEdward Tomasz Napieralato be used for target discovery. 1744af184b9SEdward Tomasz NapieralaBy default, portal groups are assigned predefined 175d1e933edSAllan Jude.Sy auth-group 176d1e933edSAllan Jude.Qq Ar default , 177d1e933edSAllan Judewhich denies discovery. 178d1e933edSAllan JudeAnother predefined 179d1e933edSAllan Jude.Sy auth-group , 180d1e933edSAllan Jude.Qq Ar no-authentication , 181d1e933edSAllan Judemay be used 182ccb1f04dSEdward Tomasz Napieralato permit discovery without authentication. 18305374883SEdward Tomasz Napierala.It Ic discovery-filter Ar filter 18405374883SEdward Tomasz NapieralaDetermines which targets are returned during discovery. 18505374883SEdward Tomasz NapieralaFilter can be either 18605374883SEdward Tomasz Napierala.Qq Ar none , 18705374883SEdward Tomasz Napierala.Qq Ar portal , 18805374883SEdward Tomasz Napierala.Qq Ar portal-name , 18905374883SEdward Tomasz Napieralaor 19005374883SEdward Tomasz Napierala.Qq Ar portal-name-auth . 19105374883SEdward Tomasz NapieralaWhen set to 19205374883SEdward Tomasz Napierala.Qq Ar none , 19305374883SEdward Tomasz Napieraladiscovery will return all targets assigned to that portal group. 19405374883SEdward Tomasz NapieralaWhen set to 19505374883SEdward Tomasz Napierala.Qq Ar portal , 19605374883SEdward Tomasz Napieraladiscovery will not return targets that cannot be accessed by the 19705374883SEdward Tomasz Napieralainitiator because of their 19805374883SEdward Tomasz Napierala.Sy initiator-portal . 19905374883SEdward Tomasz NapieralaWhen set to 20005374883SEdward Tomasz Napierala.Qq Ar portal-name , 20105374883SEdward Tomasz Napieralathe check will include both 20205374883SEdward Tomasz Napierala.Sy initiator-portal 20305374883SEdward Tomasz Napieralaand 20405374883SEdward Tomasz Napierala.Sy initiator-name . 20505374883SEdward Tomasz NapieralaWhen set to 20605374883SEdward Tomasz Napierala.Qq Ar portal-name-auth , 20705374883SEdward Tomasz Napieralathe check will include 20805374883SEdward Tomasz Napierala.Sy initiator-portal , 20905374883SEdward Tomasz Napierala.Sy initiator-name , 2101195fe34SEdward Tomasz Napieralaand authentication credentials. 2111195fe34SEdward Tomasz NapieralaThe target is returned if it does not require CHAP authentication, 2121195fe34SEdward Tomasz Napieralaor if the CHAP user and secret used during discovery match those 2131195fe34SEdward Tomasz Napieralaused by the target. 21405374883SEdward Tomasz NapieralaNote that when using 21505374883SEdward Tomasz Napierala.Qq Ar portal-name-auth , 21605374883SEdward Tomasz Napieralatargets that require CHAP authentication will only be returned if 21705374883SEdward Tomasz Napierala.Sy discovery-auth-group 21805374883SEdward Tomasz Napieralarequires CHAP. 21905374883SEdward Tomasz NapieralaThe default is 22005374883SEdward Tomasz Napierala.Qq Ar none . 221d1e933edSAllan Jude.It Ic listen Ar address 222d1e933edSAllan JudeAn IPv4 or IPv6 address and port to listen on for incoming connections. 2233a6accd5SEdward Tomasz Napierala.\".It Ic listen-iser Ar address 2243a6accd5SEdward Tomasz Napierala.\"An IPv4 or IPv6 address and port to listen on for incoming connections 2253a6accd5SEdward Tomasz Napierala.\"using iSER (iSCSI over RDMA) protocol. 226a9d78210SEdward Tomasz Napierala.It Ic offload Ar driver 227a9d78210SEdward Tomasz NapieralaDefine iSCSI hardware offload driver to use for this 228a9d78210SEdward Tomasz Napierala.Sy portal-group . 2298774c018SEdward Tomasz Napierala.It Ic redirect Ar address 2306dbdbf82SEdward Tomasz NapieralaIPv4 or IPv6 address to redirect initiators to. 2316dbdbf82SEdward Tomasz NapieralaWhen configured, all initiators attempting to connect to portal 2326dbdbf82SEdward Tomasz Napieralabelonging to this 2336dbdbf82SEdward Tomasz Napierala.Sy portal-group 2346dbdbf82SEdward Tomasz Napieralawill get redirected using "Target moved temporarily" login response. 2356dbdbf82SEdward Tomasz NapieralaRedirection happens before authentication and any 2366dbdbf82SEdward Tomasz Napierala.Sy initiator-name 2376dbdbf82SEdward Tomasz Napieralaor 2386dbdbf82SEdward Tomasz Napierala.Sy initiator-portal 2396dbdbf82SEdward Tomasz Napieralachecks are skipped. 240*db7bf2baSAlexander Motin.It Ic tag Ar value 241*db7bf2baSAlexander MotinUnique 16-bit tag value of this 242*db7bf2baSAlexander Motin.Sy portal-group . 243*db7bf2baSAlexander MotinIf not specified, the value is generated automatically. 244*db7bf2baSAlexander Motin.It Ic foreign 245*db7bf2baSAlexander MotinSpecifies that this 246*db7bf2baSAlexander Motin.Sy portal-group 247*db7bf2baSAlexander Motinis listened by some other host. 248*db7bf2baSAlexander MotinThis host will announce it on discovery stage, but won't listen. 249009ea47eSEdward Tomasz Napierala.El 250d1e933edSAllan Jude.Ss target Context 251009ea47eSEdward Tomasz Napierala.Bl -tag -width indent 252d1e933edSAllan Jude.It Ic alias Ar text 253d1e933edSAllan JudeAssign a human-readable description to the target. 254009ea47eSEdward Tomasz NapieralaThere is no default. 255d1e933edSAllan Jude.It Ic auth-group Ar name 256d1e933edSAllan JudeAssign a previously defined authentication group to the target. 257affb88f5SEdward Tomasz NapieralaBy default, targets that do not specify their own auth settings, 258d1e933edSAllan Judeusing clauses such as 259d1e933edSAllan Jude.Sy chap 260d1e933edSAllan Judeor 261d1e933edSAllan Jude.Sy initiator-name , 262d1e933edSAllan Judeare assigned 263d1e933edSAllan Judepredefined 264d1e933edSAllan Jude.Sy auth-group 265d1e933edSAllan Jude.Qq Ar default , 266d1e933edSAllan Judewhich denies all access. 267d1e933edSAllan JudeAnother predefined 268d1e933edSAllan Jude.Sy auth-group , 269d1e933edSAllan Jude.Qq Ar no-authentication , 270d1e933edSAllan Judemay be used to permit access 271009ea47eSEdward Tomasz Napieralawithout authentication. 272d3219654SEdward Tomasz NapieralaNote that this clause can be overridden using the second argument 273d3219654SEdward Tomasz Napieralato a 274d3219654SEdward Tomasz Napierala.Sy portal-group 275d3219654SEdward Tomasz Napieralaclause. 276d1e933edSAllan Jude.It Ic auth-type Ar type 277d1e933edSAllan JudeSets the authentication type. 278d1e933edSAllan JudeType can be either 279d1e933edSAllan Jude.Qq Ar none , 280d1e933edSAllan Jude.Qq Ar deny , 281d1e933edSAllan Jude.Qq Ar chap , 282d1e933edSAllan Judeor 283d1e933edSAllan Jude.Qq Ar chap-mutual . 284a8a5af86SWarren BlockIn most cases it is not necessary to set the type using this clause; 285d1e933edSAllan Judeit is usually used to disable authentication for a given 286d1e933edSAllan Jude.Sy target . 287d1e933edSAllan JudeThis clause is mutually exclusive with 288d1e933edSAllan Jude.Sy auth-group ; 289d1e933edSAllan Judeone cannot use 290df9900fbSEdward Tomasz Napieralaboth in a single target. 291d1e933edSAllan Jude.It Ic chap Ar user Ar secret 292d1e933edSAllan JudeA set of CHAP authentication credentials. 293d1e933edSAllan JudeNote that targets must only use one of 294d1e933edSAllan Jude.Sy auth-group , chap , No or Sy chap-mutual ; 295d1e933edSAllan Judeit is a configuration error to mix multiple types in one target. 296d1e933edSAllan Jude.It Ic chap-mutual Ar user Ar secret Ar mutualuser Ar mutualsecret 297d1e933edSAllan JudeA set of mutual CHAP authentication credentials. 298d1e933edSAllan JudeNote that targets must only use one of 299d1e933edSAllan Jude.Sy auth-group , chap , No or Sy chap-mutual ; 300d1e933edSAllan Judeit is a configuration error to mix multiple types in one target. 301d1e933edSAllan Jude.It Ic initiator-name Ar initiator-name 302d1e933edSAllan JudeAn iSCSI initiator name. 303d1e933edSAllan JudeOnly initiators with a name matching one of the defined 304d1e933edSAllan Judenames will be allowed to connect. 3058cb2e958SEdward Tomasz NapieralaIf not defined, there will be no restrictions based on initiator 3068cb2e958SEdward Tomasz Napieralaname. 307d1e933edSAllan JudeThis clause is mutually exclusive with 308d1e933edSAllan Jude.Sy auth-group ; 309d1e933edSAllan Judeone cannot use 3108cb2e958SEdward Tomasz Napieralaboth in a single target. 311d1e933edSAllan Jude.It Ic initiator-portal Ar address Ns Op / Ns Ar prefixlen 312d1e933edSAllan JudeAn iSCSI initiator portal: an IPv4 or IPv6 address, optionally 313d1e933edSAllan Judefollowed by a literal slash and a prefix length. 314d1e933edSAllan JudeOnly initiators with an address matching one of the defined 315d1e933edSAllan Judeaddresses will be allowed to connect. 3168cb2e958SEdward Tomasz NapieralaIf not defined, there will be no restrictions based on initiator 3178cb2e958SEdward Tomasz Napieralaaddress. 318d1e933edSAllan JudeThis clause is mutually exclusive with 319d1e933edSAllan Jude.Sy auth-group ; 320d1e933edSAllan Judeone cannot use 3218cb2e958SEdward Tomasz Napieralaboth in a single target. 322d3219654SEdward Tomasz Napierala.Pp 323d3219654SEdward Tomasz NapieralaThe 324d3219654SEdward Tomasz Napierala.Sy auth-type , 325d3219654SEdward Tomasz Napierala.Sy chap , 326d3219654SEdward Tomasz Napierala.Sy chap-mutual , 327d3219654SEdward Tomasz Napierala.Sy initiator-name , 328d3219654SEdward Tomasz Napieralaand 329d3219654SEdward Tomasz Napierala.Sy initiator-portal 330d3219654SEdward Tomasz Napieralaclauses in the target context provide an alternative to assigning an 331d3219654SEdward Tomasz Napierala.Sy auth-group 332d3219654SEdward Tomasz Napieraladefined separately, useful in the common case of authentication settings 333d3219654SEdward Tomasz Napieralaspecific to a single target. 334d3219654SEdward Tomasz Napierala.It Ic portal-group Ar name Op Ar ag-name 335d1e933edSAllan JudeAssign a previously defined portal group to the target. 336d1e933edSAllan JudeThe default portal group is 337d1e933edSAllan Jude.Qq Ar default , 338d1e933edSAllan Judewhich makes the target available 339009ea47eSEdward Tomasz Napieralaon TCP port 3260 on all configured IPv4 and IPv6 addresses. 340d3219654SEdward Tomasz NapieralaOptional second argument specifies 341d3219654SEdward Tomasz Napierala.Sy auth-group 342d3219654SEdward Tomasz Napieralafor connections to this specific portal group. 343d3219654SEdward Tomasz NapieralaIf second argument is not specified, target 344d3219654SEdward Tomasz Napierala.Sy auth-group 345d3219654SEdward Tomasz Napieralais used. 346057abcb0SAlexander Motin.It Ic port Ar name 347d83595b2SAlexander Motin.It Ic port Ar name/pp 348d83595b2SAlexander Motin.It Ic port Ar name/pp/vp 349d83595b2SAlexander MotinAssign specified CTL port (such as "isp0" or "isp2/1") to the target. 350d3219654SEdward Tomasz NapieralaThis is used to export the target through a specific physical - eg Fibre 351d3219654SEdward Tomasz NapieralaChannel - port, in addition to portal-groups configured for the target. 352d3219654SEdward Tomasz NapieralaUse 353d3219654SEdward Tomasz Napierala.Cm "ctladm portlist" 354d3219654SEdward Tomasz Napieralacommand to retrieve the list of available ports. 355d3219654SEdward Tomasz NapieralaOn startup 356d3219654SEdward Tomasz Napierala.Xr ctld 8 357d3219654SEdward Tomasz Napieralaconfigures LUN mapping and enables all assigned ports. 358057abcb0SAlexander MotinEach port can be assigned to only one target. 3598774c018SEdward Tomasz Napierala.It Ic redirect Ar address 3606dbdbf82SEdward Tomasz NapieralaIPv4 or IPv6 address to redirect initiators to. 3616dbdbf82SEdward Tomasz NapieralaWhen configured, all initiators attempting to connect to this target 3626dbdbf82SEdward Tomasz Napieralawill get redirected using "Target moved temporarily" login response. 3636dbdbf82SEdward Tomasz NapieralaRedirection happens after successful authentication. 364920c6cbaSAlexander Motin.It Ic lun Ar number Ar name 365920c6cbaSAlexander MotinExport previously defined 366920c6cbaSAlexander Motin.Sy lun 367920c6cbaSAlexander Motinby the parent target. 368d1e933edSAllan Jude.It Ic lun Ar number 369d1e933edSAllan JudeCreate a 370d1e933edSAllan Jude.Sy lun 371d1e933edSAllan Judeconfiguration context, defining a LUN exported by the parent target. 372d3219654SEdward Tomasz Napierala.Pp 373d3219654SEdward Tomasz NapieralaThis is an alternative to defining the LUN separately, useful in the common 374d3219654SEdward Tomasz Napieralacase of a LUN being exported by a single target. 375009ea47eSEdward Tomasz Napierala.El 376d1e933edSAllan Jude.Ss lun Context 377009ea47eSEdward Tomasz Napierala.Bl -tag -width indent 378d1e933edSAllan Jude.It Ic backend Ar block No | Ar ramdisk 379d1e933edSAllan JudeThe CTL backend to use for a given LUN. 380009ea47eSEdward Tomasz NapieralaValid choices are 381d1e933edSAllan Jude.Qq Ar block 382009ea47eSEdward Tomasz Napieralaand 383d1e933edSAllan Jude.Qq Ar ramdisk ; 384009ea47eSEdward Tomasz Napieralablock is used for LUNs backed 385c63d8c3bSEdward Tomasz Napieralaby files or disk device nodes; ramdisk is a bitsink device, used mostly for 386009ea47eSEdward Tomasz Napieralatesting. 387009ea47eSEdward Tomasz NapieralaThe default backend is block. 388d1e933edSAllan Jude.It Ic blocksize Ar size 389d1e933edSAllan JudeThe blocksize visible to the initiator. 390009ea47eSEdward Tomasz NapieralaThe default blocksize is 512. 391d1e933edSAllan Jude.It Ic device-id Ar string 392d1e933edSAllan JudeThe SCSI Device Identification string presented to the initiator. 393d1e933edSAllan Jude.It Ic option Ar name Ar value 394d1e933edSAllan JudeThe CTL-specific options passed to the kernel. 395d1e933edSAllan JudeAll CTL-specific options are documented in the 396d1e933edSAllan Jude.Sx OPTIONS 397d1e933edSAllan Judesection of 3984f66b233SEdward Tomasz Napierala.Xr ctladm 8 . 399d1e933edSAllan Jude.It Ic path Ar path 4006775608bSEdward Tomasz NapieralaThe path to the file, device node, or 4016775608bSEdward Tomasz Napierala.Xr zfs 8 4026775608bSEdward Tomasz Napieralavolume used to back the LUN. 4036775608bSEdward Tomasz NapieralaFor optimal performance, create the volume with the 4046775608bSEdward Tomasz Napierala.Qq Ar volmode=dev 4056775608bSEdward Tomasz Napieralaproperty set. 406d1e933edSAllan Jude.It Ic serial Ar string 407d1e933edSAllan JudeThe SCSI serial number presented to the initiator. 408d1e933edSAllan Jude.It Ic size Ar size 409d1e933edSAllan JudeThe LUN size, in bytes. 410009ea47eSEdward Tomasz Napierala.El 411009ea47eSEdward Tomasz Napierala.Sh FILES 412009ea47eSEdward Tomasz Napierala.Bl -tag -width ".Pa /etc/ctl.conf" -compact 413009ea47eSEdward Tomasz Napierala.It Pa /etc/ctl.conf 414009ea47eSEdward Tomasz NapieralaThe default location of the 415009ea47eSEdward Tomasz Napierala.Xr ctld 8 416009ea47eSEdward Tomasz Napieralaconfiguration file. 417009ea47eSEdward Tomasz Napierala.El 418009ea47eSEdward Tomasz Napierala.Sh EXAMPLES 419009ea47eSEdward Tomasz Napierala.Bd -literal 4203bea5b97SEdward Tomasz Napieralaauth-group ag0 { 421009ea47eSEdward Tomasz Napierala chap-mutual "user" "secret" "mutualuser" "mutualsecret" 422009ea47eSEdward Tomasz Napierala chap-mutual "user2" "secret2" "mutualuser" "mutualsecret" 423a5f9f526SEdward Tomasz Napierala initiator-portal 192.168.1.1/16 424009ea47eSEdward Tomasz Napierala} 425009ea47eSEdward Tomasz Napierala 4263bea5b97SEdward Tomasz Napieralaauth-group ag1 { 4273bea5b97SEdward Tomasz Napierala auth-type none 4283bea5b97SEdward Tomasz Napierala initiator-name "iqn.2012-06.com.example:initiatorhost1" 4293bea5b97SEdward Tomasz Napierala initiator-name "iqn.2012-06.com.example:initiatorhost2" 4303bea5b97SEdward Tomasz Napierala initiator-portal 192.168.1.1/24 4313bea5b97SEdward Tomasz Napierala initiator-portal [2001:db8::de:ef] 4323bea5b97SEdward Tomasz Napierala} 4333bea5b97SEdward Tomasz Napierala 4343bea5b97SEdward Tomasz Napieralaportal-group pg0 { 435009ea47eSEdward Tomasz Napierala discovery-auth-group no-authentication 4363bea5b97SEdward Tomasz Napierala listen 0.0.0.0:3260 4373bea5b97SEdward Tomasz Napierala listen [::]:3260 4383bea5b97SEdward Tomasz Napierala listen [fe80::be:ef]:3261 439009ea47eSEdward Tomasz Napierala} 440009ea47eSEdward Tomasz Napierala 441009ea47eSEdward Tomasz Napieralatarget iqn.2012-06.com.example:target0 { 442c63d8c3bSEdward Tomasz Napierala alias "Example target" 443009ea47eSEdward Tomasz Napierala auth-group no-authentication 444009ea47eSEdward Tomasz Napierala lun 0 { 445a178d09eSEdward Tomasz Napierala path /dev/zvol/tank/example_0 446009ea47eSEdward Tomasz Napierala blocksize 4096 447009ea47eSEdward Tomasz Napierala size 4G 448009ea47eSEdward Tomasz Napierala } 449009ea47eSEdward Tomasz Napierala} 450009ea47eSEdward Tomasz Napierala 451920c6cbaSAlexander Motinlun example_1 { 4523bea5b97SEdward Tomasz Napierala path /dev/zvol/tank/example_1 4533bac1be8SAlexander Motin option naa 0x50015178f369f093 454009ea47eSEdward Tomasz Napierala} 455920c6cbaSAlexander Motin 456920c6cbaSAlexander Motintarget iqn.2012-06.com.example:target1 { 4573bea5b97SEdward Tomasz Napierala auth-group ag0 4583bea5b97SEdward Tomasz Napierala portal-group pg0 459920c6cbaSAlexander Motin lun 0 example_1 460009ea47eSEdward Tomasz Napierala lun 1 { 461920c6cbaSAlexander Motin path /dev/zvol/tank/example_2 462d3219654SEdward Tomasz Napierala option vendor "FreeBSD" 463009ea47eSEdward Tomasz Napierala } 464009ea47eSEdward Tomasz Napierala} 4653bac1be8SAlexander Motin 4663bac1be8SAlexander Motintarget naa.50015178f369f092 { 4673bac1be8SAlexander Motin port isp0 4683bac1be8SAlexander Motin port isp1 4693bac1be8SAlexander Motin lun 0 example_1 4703bac1be8SAlexander Motin} 471009ea47eSEdward Tomasz Napierala.Ed 472009ea47eSEdward Tomasz Napierala.Sh SEE ALSO 473009ea47eSEdward Tomasz Napierala.Xr ctl 4 , 474009ea47eSEdward Tomasz Napierala.Xr ctladm 8 , 4756775608bSEdward Tomasz Napierala.Xr ctld 8 , 4766775608bSEdward Tomasz Napierala.Xr zfs 8 477009ea47eSEdward Tomasz Napierala.Sh AUTHORS 478009ea47eSEdward Tomasz NapieralaThe 479009ea47eSEdward Tomasz Napierala.Nm 480009ea47eSEdward Tomasz Napieralaconfiguration file functionality for 481009ea47eSEdward Tomasz Napierala.Xr ctld 8 482009ea47eSEdward Tomasz Napieralawas developed by 48301c2b8acSBaptiste Daroussin.An Edward Tomasz Napierala Aq Mt trasz@FreeBSD.org 484009ea47eSEdward Tomasz Napieralaunder sponsorship from the FreeBSD Foundation. 485