ISCSICTL(8)

πŸ“¦
version 15.1 Β· 2 versions
, in freebsd 15.1

✨ ISCSICTL(8) ✨

okay bestie so this is the iscsictl manual page β€” a System Manager's Manual situation, iSCSI initiator edition πŸ’… buckle up, it's actually not that deep and also extremely deep at the same time.


πŸŽ€ NAME πŸŽ€

iscsictl β€” the iSCSI initiator management utility. that's it, that's the vibe.


🌸 SYNOPSIS 🌸

iscsictl -A -p portal -t target [-u user -s secret] [-w timeout] [-r]
         [-e on|off]
iscsictl -A -d discovery-host [-u user -s secret] [-r] [-e on|off]
iscsictl -A -a [-c path]
iscsictl -A -n nickname [-c path]
iscsictl -M -i session-id [-p portal] [-t target] [-u user] [-s secret]
         [-e on|off]
iscsictl -M -i session-id [-n nickname [-c path]]
iscsictl -R [-p portal] [-t target]
iscsictl -R -a
iscsictl -R -n nickname [-c path]
iscsictl -L [-v] [-w timeout]

like, ten whole shapes of the same command. iconic honestly 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

The iscsictl utility configures the iSCSI initiator. yes that's the whole point. main character energy only.

here's every option, no cap, nothing skipped:

  • --libxo β€” generate output via libxo(3) in a whole selection of different human and machine readable formats πŸ’– see xo_options(7) for the deets on the command line arguments.
  • -A β€” Add session. adding era.
  • -M β€” Modify session. glow-up era.
  • -R β€” Remove session. blocking, unfollowing, etc.
  • -L β€” List sessions. the vibes check πŸ‘€
  • -a β€” When adding, add all sessions defined in the configuration file. When removing, remove all currently established sessions. all of them. periodt.
  • -c path β€” path to the configuration file. the default is /etc/iscsi.conf.
  • -d discovery-host β€” target host name or address used for SendTargets discovery. when you use it, it adds a temporary discovery session, does the discovery, then adds sessions for each discovered target, and removes the temporary discovery session. poof ✨ gone.
  • -e on|off β€” enable or disable the session. lowkey ignored for discovery sessions, but highkey gets passed down to the normal sessions they add.
  • -i session-id β€” session ID, as displayed by iscsictl -v.
  • -n nickname β€” the nickname of a session defined in the configuration file πŸŽ€
  • -p portal β€” target portal β€” host name or address β€” for statically defined targets.
  • -r β€” use iSER (iSCSI over RDMA) instead of plain iSCSI over TCP/IP. switching it up fr fr.
  • -s secret β€” CHAP secret. shhh πŸ™ˆ
  • -t target β€” target name.
  • -u user β€” CHAP login.
  • -v β€” verbose mode. say more, queen.
  • -w timeout β€” instead of returning immediately, wait up to timeout seconds until all configured sessions are successfully established. patience is a virtue bestie.

Certain parameters are necessary when adding a session. you can specify these either via command line (using the -t, -p, -u, and -s options), or configuration file (using the -a or -n options). some functionality β€” for example mutual CHAP β€” is only available via configuration file. sorry, them's the rules πŸ’…

Since connecting to the target is performed in background, a non-zero exit status does not mean the session was successfully established. 😭 like, it does not mean that. use either iscsictl -L to check the connection status, or the -w flag to wait for session establishment.

🚨 also: for the iSCSI initiator to actually be able to connect to a target, the iscsid(8) daemon must be running. no daemon, no session. that's the whole thing.

πŸ“ FILES πŸ“

  • /etc/iscsi.conf β€” iSCSI initiator configuration file. the blueprint ✨

πŸ”₯ EXIT STATUS πŸ”₯

The iscsictl utility exits 0 on success, and >0 if an error occurs. simple as that 🫢


🌈 EXAMPLES 🌈

attach to a target

Attach to target iqn.2012-06.com.example:target0, served by 192.168.1.1:

iscsictl -A -t iqn.2012-06.com.example:target0 -p 192.168.1.1

discovery, but make it disabled

Perform discovery on 192.168.1.1, and add disabled sessions for each discovered target; use -M -e on to connect them:

iscsictl -A -d 192.168.1.1 -e off

the great disconnect

Disconnect all iSCSI sessions:

iscsictl -Ra

πŸ‘‘ SEE ALSO πŸ‘‘

libxo(3), xo_options(7), iscsi(4), iscsi.conf(5), iscsid(8) β€” go read them, they're the supporting cast and they ate πŸ’œ


⭐ HISTORY ⭐

The iscsictl command appeared in FreeBSD 10.0. a legend since day one.


🧚 AUTHORS 🧚

The iscsictl utility was developed by Edward Tomasz Napierala <trasz@FreeBSD.org> under sponsorship from the FreeBSD Foundation. we love a sponsored icon πŸ“


so that's the page!! Debian build, dated July 16, 2025 β€” mwah πŸ’‹ go forth and configure your initiator, bestie. slay πŸ¦‹βœ¨
πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms