Open-E Knowledgebase
Email to friend
Multiple emails allowed. Separate with commas



[JDSS][DSS V7] How can I connect to a iSCSI target from Linux console?

Additional information:

  • product name: JovianDSS / DSSv7
  • product version: all
  • build: all

Subject: 

In this article, we look into connecting to a remote iSCSI target.

Contents:

  • Installing open-iSCSI / iSCSI-initiator-utils

Debian based distributions:

sudo apt-get install open-iscsi

RHEL based distributions:

sudo yum install iscsi-initiator-utils
 

.

.

  • Discovering targets
iscsiadm -m discovery -t sendtargets -p 192.168.234.10

Where 192.168.234.10 is the IP address of your iSCSI host.

Now we should get a output similar to the one below:

192.168.234.10:3260,1 iqn.2020-04.iscsi:node-e88c5a8b.target0

Where 192.168.234.10:3260 is the portal IP and after the 1 the target name.

iscsiadm --mode node --targetname iqn.2020-04.iscsi:node-e88c5a8b.target0 --portal 192.168.234.10:3260 --login

Now the target should be attached to our client. To check we can do:

tail -f /var/log/messages​​​​​​

We should get an output containing a similar lane like below:

[sdb] 314572800 512-byte logical blocks: (161 GB/150 GiB)

Where sdb is the name of the disk in the device manager
.

.

  • Formating the iSCSI Volume

Fdisk will allow us to format the volume.

fdisk /dev/sdb

Formatting the volume.

mkfs.ext4 /dev/sdb1

Mounting the volume:

mkdir /mnt/iscsi
mount /dev/sb1 /mnt/iscsi
The Knowledge base is managed by Open-E data storage software company.