ISCSI.CONF(5)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… 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 to CHAP, both chapIName and chapSecret must 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, in address[:port] format. The address can be either an IP address, or hostname. The optional port defaults to 3260. optional port, but the default is 3260 in case you were wondering πŸ“
  • SessionType β€” Sets the session type. Type can be either "Discovery", or "Normal". Default is "Normal". For normal sessions, the TargetName must be defined. Discovery sessions result in the initiator connecting to all the targets returned by SendTargets iSCSI discovery with the defined TargetAddress. so basically discovery mode = connect to everything SendTargets hands you, and normal mode = you better have defined that TargetName, fr fr
  • Enable β€” 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, the PingTimeout can 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". The LoginTimeout can 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: PingTimeout and LoginTimeout both only accept positive values starting with "1". don't try to be cute with 0. and if you leave them out of the conf file, the driver pulls the defaults from kern.iscsi.ping_timeout and kern.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