OpenBSD and iSCSI part2: the initiator (client)

=> Comment on Mastodon

This is the second article of the serie about iSCSI. In this one, you will

learn how to connect to an iSCSI target using OpenBSD base daemon iscsid.

The configuration file of iscsid doesn't exist by default, its location is

target1="100.64.2.3"

myaddress="100.64.2.2"

target "disk1" {

    initiatoraddr $myaddress

    targetaddr $target1

    targetname "iqn.1994-04.org.netbsd.iscsi-target:target0"

}

While most lines are really obvious, it is mandatory to have the line

initiatoraddr, many thanks to cwen@ for pointing this out when I was stuck on

it.

The targetname value will depend of the iSCSI target server. If you use

netbsd-iscsi-target, then you only need to care about the last part, aka

default one).

Then we can enable the daemon and start it:

# rcctl enable iscsid

# rcctl start iscsid

In your dmesg, you should see a line like:

sd4 at scsibus0 targ 1 lun 0: <NetBSD, NetBSD iSCSI, 0> SCSI3 0/direct fixed t10.NetBSD_0x5c6cf1b69fc3b38a

If you use netbsd-iscsi-target, the whole line should be identic except for the

sd4 part which can change, depending of your hardware.

If you don't see it, you may need to reload iscsid configuration file with

Proxy Information
Original URL
gemini://perso.pw/blog//articles/iscsi-client.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
140.093641 milliseconds
Gemini-to-HTML Time
0.761442 milliseconds

This content has been proxied by September (ba2dc).