Home Linux File Server with Software RAID and iSCSI (4+5/10)

Continuation from Home Linux File Server

Challenge 4 and 5: Setup and configure iSCSI Target and Mount the LUN from a separate computer

I’m going to be using a guide here: [Set up an iSCSI Target and Initiator]


So, the first concept is to make the linux box an iSCSI target. We’ve originally mounted and formatted /dev/md0 to ext4, so in order to property iSCSI this we’ll need to undo our mounting and let the destination machines use this as they want to use it.

So, I umount /dev/md0 and remove it from /etc/fstab. For the sake of validating it, I reboot the box.

Setting up iSCSI Target

Gotta install some tools and services:

# yum install scsi-target-utils
# service tgtd start
# chkconfig tgtd on

and then we setup /etc/tgt/targets.conf with the following:

# Set the driver. If not specified, defaults to "iscsi".
# This can be iscsi or iser. To override a specific target set the
# "driver" setting in the target's config.
default-driver iscsi
<target iqn.2018-01.eye-scrunchie:target1>
        backing-store /dev/md0

Reload the new configuration:

# service tgtd restart

and check the configuration:

# tgt-admin --show
Target 1: iqn.2018-01.eye-scrunchie:target1
    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
            Backing store type: null
            Backing store path: None
            Backing store flags:
        LUN: 1
            Type: disk
            SCSI ID: IET     00010001
            SCSI SN: beaf11
            Size: 533 MB, Block size: 512
            Online: Yes
            Removable media: No
            Prevent removal: No
            Readonly: No
            Backing store type: rdwr
            Backing store path: /dev/md0
            Backing store flags:
    Account information:
    ACL information:

Step 4 done!

Mounting my iSCSI Target on my Initiator

For Step 5, i’m using a Windows 10 machine and the iSCSI Initiator Desktop App.

For Target: I give it the IP Address of my Linux Virtuabox ( and click Quick Connect...

The I go to my Disk Management, Initialize the Disk, give it a Letter, and done!

Step 5 Done!

Leave a Reply