ISCSI.CONF(5)
π iscsi.conf β the iSCSI initiator config file, bestie
okay so this is iscsi.conf, aka the file formats manual queen herself, and she's the config file that iscsictl(8) reads. yes, that iscsictl β the utility. she's the main character here, we're just her config π
β¨ NAME β¨
iscsi.conf β the iSCSI initiator configuration file. that's her. that's the whole name. periodt.
πΈ DESCRIPTION πΈ
okay so bestie, the iscsi.conf configuration file is used by the iscsictl(8) utility. The general syntax is:
# this is a comment
nickname_1 {
variable = value;
...
}
nickname_2 {
variable = value;
...
}
...
like, you give each block a nickname, you fill it with variables, you move on. it's giving organized. it's giving clean. we love her π
π¦ the variables (yes, all of them, no skipping)
AuthMethodβ Sets the authentication type. Type can be either"None", or"CHAP". Default is"None". When set toCHAP, bothchapINameandchapSecretmust be defined. no cap, both of them, or it's not gonna work πchapINameβ Login for CHAP authentication.chapSecretβ Secret for CHAP authentication. keep it secret, keep it safe πtgtChapNameβ Target login for Mutual CHAP authentication.tgtChapSecretβ Target secret for Mutual CHAP authentication.HeaderDigestβ Sets the header digest; a checksum calculated over the header of iSCSI PDUs, and verified on receive. Digest can be either"None", or"CRC32C". Default is"None". so like, it's a little vibe check on the header, and you can turn it off or set it to CRC32C β¨DataDigestβ Sets the data digest; a checksum calculated over the Data Section of iSCSI PDUs, and verified on receive. Digest can be either"None", or"CRC32C". Default is"None". same vibe check, but for the data section this time π«ΆInitiatorNameβ Sets the initiator name. By default, the name is concatenation of"iqn.1994-09.org.freebsd:"with the hostname. she just auto-builds herself, iconic πTargetNameβ Sets the target name. Not required for discovery sessions. so if you're in discovery mode, you can literally skip her, no stress πTargetAddressβ Sets the target address and port, inaddress[:port]format. The address can be either an IP address, or hostname. The optional port defaults to3260. optional port, but the default is3260in case you were wondering πSessionTypeβ Sets the session type. Type can be either"Discovery", or"Normal". Default is"Normal". For normal sessions, theTargetNamemust be defined. Discovery sessions result in the initiator connecting to all the targets returned by SendTargets iSCSI discovery with the definedTargetAddress. so basically discovery mode = connect to everything SendTargets hands you, and normal mode = you better have defined thatTargetName, fr frEnableβ Enable or disable the session. State can be either"On", or"Off". Default is"On". she's on by default, main character energy πOffloadβ Name of selected iSCSI hardware offload driver. Default is"None".Protocolβ Name of selected protocol. It can be either"iSER", for iSCSI over RDMA, or"iSCSI". Default is"iSCSI". two options, pick your fighter π₯dscpβ The DiffServ Codepoint used for sending data. The DSCP can be set to numeric, or hexadecimal values directly, as well as the well-defined"cs<n>"and"af<xx>"codepoints. Default is no specified dscp codepoint, which means the default of the outgoing interface is used. so like, you can go full numbers, full hex, or use the fancy named codepoints β or just let the outgoing interface do her thing πpcpβ The 802.1Q Priority CodePoint used for sending packets. The PCP can be set to a value in the range between"0"to"7". When omitted, the default for the outgoing interface is used. tiny range, huge responsibility π₯PingTimeoutβ Specify the time in seconds to wait between pings (SCSI NOP), and for a ping response before declaring the session as dead and attempting a re-establishment. If this entry is not present in the conf file, the default value configured using"kern.iscsi.ping_timeout"(default at"5"seconds) is taken by the driver. If present, thePingTimeoutcan be set to any positive value starting with"1". so it's the "u up?" timer, and if the session ghosts you, she gets declared dead and a re-establishment is attempted πLoginTimeoutβ Specify the time in seconds to wait for a login PDU to be sent or received after trying to establish a new session. When no login PDU is received within this time, the login on a particular connection fails and a new reconnection attempt is made. If this entry is not present in the conf file, the default value of"60"seconds is used, as configured by"kern.iscsi.login_timeout". TheLoginTimeoutcan be set to any positive value starting with"1". so if the login PDU doesn't show up in time, that login fails on that connection and she tries again β persistence is hot π
real talk bestie:PingTimeoutandLoginTimeoutboth only accept positive values starting with"1". don't try to be cute with0. and if you leave them out of the conf file, the driver pulls the defaults fromkern.iscsi.ping_timeoutandkern.iscsi.login_timeout. that's just how it is π«Ά
π§ FILES π§
/etc/iscsi.confβ the one and only, the home of all your nicknames π
π EXAMPLES π
okay so here's the standard one, plain and simple:
myiscsi { # nickname
targetaddress = iscsi1
targetname = iqn.1900.com.com:sn.123456
}
and here's the IPv6 edition, brackets and all, because we stan a bracket-using queen:
myiscsi6 { # nickname
targetaddress = [2001:db8::de:ef]:3260
targetname = iqn.1900.com.com:sn.123456
}
and here's the CHAP one, with the semicolons living their best life:
chaptest {
targetaddress = 10.0.0.1;
targetname = iqn.1900.com.com:sn.123456;
initiatorname = iqn.2005-01.il.ac.huji.cs:nobody;
authmethod = CHAP;
chapiname = iqn.2005-01.il.ac.huji.cs:nobody;
chapsecret = "secretsecret";
}
look at her go. ate. no crumbs. π
π SEE ALSO π
iscsictl(8)β go read her next, she's the whole reason this file exists π¦
and that's the whole page, bestie π this edition came from Debian, dated February 25, 2022 β so yeah, thanks Debian, love u, mwah π«Άβ¨π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright (c) 2007-2010 Daniel Braniss <danny@cs.huji.ac.il>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms