ISCSI(4)

πŸ’– ISCSI(4) πŸ’–

okay so bestie, welcome to the iscsi manual β€” it's in the Kernel Interfaces Manual (section 4, slay), and it's genuinely one of my faves so let's get into it πŸ¦‹


✨ NAME ✨

iscsi β€” iSCSI initiator


✨ SYNOPSIS ✨

So if you wanna compile this driver into the kernel, you drop this line into your kernel config file:

device iscsi

Orrr, if you'd rather load it as a module at boot time instead, you put this line in loader.conf(5):

iscsi_load="YES"

Both valid. Choose your fighter πŸ’…


✨ DESCRIPTION ✨

The iscsi subsystem is literally the kernel component of an iSCSI initiator, and its whole job is implementing the Full Feature Phase of the iSCSI protocol. No cap.

Quick vocab check because it matters: the initiator is the iSCSI client. It connects to an iSCSI target, and boom β€” you get local access to a remote block device. It's giving "the remote disk is in the room with us right now" πŸ’€

The userland component? That's handled by iscsid(8). And both the kernel side and the userland side get configured using iscsictl(8). Two halves, one iconique little ecosystem πŸŽ€


✨ SYSCTL VARIABLES ✨

All of these are available both as sysctl(8) variables and as loader(8) tunables. Double duty, main character energy πŸ‘‘

  • kern.iscsi.debug β€” the verbosity level for log messages coming from the iscsi driver. Set it to 0 to disable logging entirely, or 1 to warn you about potential problems. Bigger values = more debugging output. Defaults to 1.
  • kern.iscsi.ping_timeout β€” how many seconds to wait for the target to respond to a NOP-Out PDU. If there's no response within that window, the session gets forcibly restarted. Set it to 0 to disable sending NOP-Out PDUs altogether. Defaults to 5.
  • kern.iscsi.iscsid_timeout β€” how many seconds to wait for iscsid(8) to establish a session. After that time, iscsi will abort and retry. Defaults to 60.
  • kern.iscsi.login_timeout β€” how many seconds to wait for a login attempt to succeed. After that time, iscsi will abort and retry. Defaults to 60.
  • kern.iscsi.maxtags β€” the maximum number of outstanding IO requests. Defaults to 255.
  • kern.iscsi.fail_on_disconnection β€” this one controls the behavior after an iSCSI connection gets dropped due to network problems. When it's set to 1, a dropped connection causes the iSCSI device nodes to be destroyed. After reconnecting, they'll be created again. By default though, the device nodes are left intact. And while the connection is down, all input/output operations are suspended, waiting to be retried once the connection is reestablished. So like, it's fine, it's just ✨holding its breath✨ 😭
fr fr, read that last one twice β€” whether your device nodes survive a network hiccup depends entirely on this variable.

✨ SEE ALSO ✨

go read them, they're all part of the same friend group 🫢


✨ HISTORY ✨

The iscsi subsystem first appeared in FreeBSD 10.0. OG behavior, honestly 🌸


✨ AUTHORS ✨

The iscsi subsystem was developed by Edward Tomasz Napierala <trasz@FreeBSD.org> under sponsorship from the FreeBSD Foundation. We love a sponsored king πŸ‘‘


and that's the whole page bestie!! this one came from the Debian manual set, dated May 28, 2017, filed under ISCSI(4) β€” tysm for reading, ily, go configure your initiator πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from