ISCSI-INITIATOR(8)

πŸ“¦ in fedora 43, fedora 44

iscsi-initiator β€” the refuse-based iSCSI initiator πŸ’–

okay bestie, welcome to iscsi-initiator(8) from the System Manager's Manual section β€” yes it's section 8, yes it's for the sysadmin girlies, and yes it's about to be your new fave πŸ’…


✨ NAME ✨

iscsi-initiator β€” a refuse-based iSCSI initiator πŸ¦‹


πŸŽ€ SYNOPSIS πŸŽ€

iscsi-initiator [-46bcDfVv] [-a authentication-type] [-d digest-type]
                [-h target-hostname] [-p target-port-number]
                [-t target-number] [-u username] mount_point

πŸ’« DESCRIPTION πŸ’«

so like,, the iscsi-initiator utility is what you use to reach out and touch an iSCSI target β€” think iscsi-target(8) energy β€” and grab the block storage that target has been out here exporting to the world. no cap. πŸ“¦

everything you wanna know about the target gets displayed underneath the mount point, plus the device that corresponds to the storage the target is exporting. it's giving transparency, it's giving full visibility, it's giving main character energy πŸ‘‘

the various arguments are as follows, and yes we're doing all of them:

  • -4 β€” use an IPv4 connection to the target.
  • -6 β€” use an IPv6 connection to the target.
  • -a authentication-type β€” use the specified authentication type when communicating with the target. the possible values are chap, kerberos, srp or none. the default value is none. (write that down πŸ“)
  • -b β€” show the storage as a block device.
  • -c β€” show the storage as a character device.
  • -d digest-type β€” use the specified digest type when communicating with the target. the possible values are header, data, both, all or none. the default value is none.
  • -D β€” list the LUNs on the specified target and exit (i.e. discovery only) πŸ” like, just looking, not touching.
  • -f β€” show the storage as a regular file.
  • -h hostname β€” connect to the iSCSI target running on the host specified as the argument.
  • -p port-number β€” connect to the iSCSI target running on the port specified as the argument. the default value is 3260.
  • -t target β€” connect to the number of the iSCSI target running as the argument.
  • -u username β€” use the specified user's credentials when logging in to the iSCSI target. there is no default. πŸ™ˆ
  • -V β€” print out the version number and then exit. bye bestie πŸ‘‹
  • -v β€” be verbose in operation. tell me everything, i wanna hear it all πŸ’¬

the refuse(3) library is what's serving up the file system features here. iconic collaboration fr fr 🫢

the mandatory parameter is the local mount point. mandatory. you literally cannot skip it. periodt.


🌸 the way this actually looks 🌸

this iSCSI initiator presents a view of the targets underneath the mount point. first it creates a directory tree with the hostname of the target, and inside that directory, a virtual directory gets created for each target name exported by the iSCSI target program.

within that virtual target directory, there are symbolic links for:

  • the hostname (for convenience πŸ’…)
  • a textual representation of the IP address
  • the iSCSI target product name
  • the iSCSI target IQN
  • the iSCSI target vendor
  • the version number

and one other directory entry is presented in the virtual target directory, all about the storage the iSCSI target is presenting. that can be a regular file (which is also the default, fyi), a block device, or a character device.

⚠️ bestie please note: the iscsi-initiator utility needs the β€œpuffs” kernel module loaded via modload(8) to operate. no puffs, no party. πŸ’€

πŸ”₯ EXAMPLES πŸ”₯

# ./iscsi-initiator -u agc -h iscsi-target0.alistaircrooks.co.uk /mnt
# ls -al /mnt/target0
total 576
drwxr-xr-x  2 agc  agc        512 May 11 22:24 .
drwxr-xr-x  2 agc  agc        512 May 11 22:24 ..
lrw-r--r--  1 agc  agc         39 May 11 22:24 hostname -> iscsi-target0.alistaircrooks.co.uk
lrw-r--r--  1 agc  agc         14 May 11 22:24 ip -> 172.16.135.130
lrw-r--r--  1 agc  agc         16 May 11 22:24 product -> NetBSD iSCSI
-rw-r--r--  1 agc  agc  104857600 May 11 22:24 storage
lrw-r--r--  1 agc  agc         43 May 11 22:24 targetname -> iqn.1994-04.org.netbsd.iscsi-target:target0
lrw-r--r--  1 agc  agc          8 May 11 22:24 vendor -> NetBSD
lrw-r--r--  1 agc  agc          4 May 11 22:24 version -> 0
#

look at that ls -al output. the symlinks? immaculate. the storage file? 104857600 bytes of pure vibes. this is the moment. 🌈


πŸ‘€ SEE ALSO πŸ‘€

puffs(3), refuse(3), iscsi-target(8)


πŸ“œ HISTORY πŸ“œ

the iscsi-initiator utility first appeared in NetBSD 6.0. a legend was born. ⭐


πŸ’– AUTHORS πŸ’–

the iscsi-initiator utility was written by Alistair Crooks ⟨agc@NetBSD.org⟩. thank you for your service king 🫑


πŸ’€ BUGS πŸ’€

okay so this is the part where we keep it real:

iscsi-initiator currently only supports a CHAP challenge length of 16 octets. other initiators support up to 1024, and thus it's expected that most targets will also support such lengths. this means CHAP compatibility with other targets apart from iscsi-target(8) is likely to be poor. 😭

to workaround this, please use authentication type none by not specifying a username with the -u option. no username, no problem. problem solved bestie 🧚

Debian Β· February 22, 2011 Β· and that's the whole ISCSI-INITIATOR(8) page babes, go mount something gorgeous πŸ’…βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from