ISCSI

ISCSI

iSCSI stands for Internet Small Computer Systems Interface. It is an IP-based storage networking standard for linking data storage facilities. It allows client machines (called initiators) to send SCSI commands (CDBs) to SCSI storage devices (targets) on remote servers. It is a popular protocol used for exchanging SCSI commands over IP networks, enabling the use of the existing network infrastructure to connect storage

On the Server side

sudo apt-get install tgt

Go to /etc/tgt/targets.conf and add a target which is the ip address of the server side.

<target 192.168.1.9:target01>
backing-store /dev/md0
incominguser admin admin
</target>

Restart the service: systemctl restart tgt

and now let’s see the target we have installed:

root@k8snode:/home/touk# tgtadm --mode target --op show
Target 1: 192.168.1.9:target01
    System information:
        Driver: iscsi
        State: ready
    I_T nexus information:
    LUN information:
        LUN: 0
            Type: controller
            SCSI ID: IET     00010000
            SCSI SN: beaf10
            Size: 0 MB, Block size: 1
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            SWP: No
            Thin-provisioning: No
            Backing store type: null
            Backing store path: None
            Backing store flags:
    Account information:
        admin
    ACL informat

On the Client side (Initiator):

sudo apt-get install open-iscsi

then let’s change the config file to set up a connection to the server:

sudo vim /etc/iscsi/iscsid.conf

look for node.session.auth.username_in and password and change the credentials to admin admin like we did

Start the iscsid daemon :

systemctl start iscsid

systemctl status iscsid

and sure enough we can now discover the iSCSI targets available on the server. :

Now lets see something before we login:

And now !!

We have the sdb disk remotly connected to our machine

Last updated