iSCSI

Notes

  • vmLS1 ⇒ iSCSI target
  • vmLS2 ⇒ iSCSI initiator

Target

Installation on vmLS1

Configuration files

ietd.conf

Configure authentication for auto discovery, IncomingUser is the initiator and OutgoingUser is the target.

The initiator init the authentication and waits for the authentication from the target. Configure targets

Configure authentication for target.





The initiator init the authentication and waits for the authentication from the target.

Lun number is the ID of target, multiple targets are allowed, but they need different ID’s. In the example the target is an image file, that is the reason for the Type=fileio on the end of line. Of course is also possible to export a block device like /dev/sda7
Create image file

Use image file as block device

Enable iSCSI target on boot

Start iSCSI target

Show exported block device

Initiator

Configuration files

iscsid.conf

Configure auth for target

Configure auth for discovery

Restart initiator

Run discovery

Run target login

iqn.1993-08.org.debian:01:597ed3f953ca is the name of the initiator server srv2, debian uses a random name, because the name should be uniq for each iscsi node. You can change the name on the initiator server in the file /etc/iscsi/initiatorname.iscsi.
Show block device on the initiator

Create a filesystem on the iscsi device

The access for the targets can be configured in /etc/initiators.allow and /etc/targets.allow.