ISCSI Storage

Fonte: ARDITI - WIKI
Saltar para a navegação Saltar para a pesquisa

Available iSCSI Storages

The following iSCSI blocks are available for ARDITI:

iSCSI Target Portal Server Purpose
iqn.2005-10.org.freenas.ctl:iscsi-arditi 192.168.10.238,3260 nas.int.m-iti.org Used as an external archival storage for ARDITI


Mount Points

The following are the mount points for the mapped iSCSI targets:

iSCSI Target Local Mount Point Server Purpose
iqn.2005-10.org.freenas.ctl:iscsi-arditi /mnt hera Used as an external archival storage for Hera.

How to use the iSCSI initiator and mount it

  • First of all we need to install open-iscsi:
sudo apt install open-iscsi
  • Edit /etc/iscsi/iscsid.conf and set node.startup to automatic:
node.startup = automatic
  • Restart the iSCSI initiator:
sudo service open-iscsi restart
  • Now we connect to the target (FreeNAS) and check what storage devices it has to offer:
sudo iscsiadm -m discovery -t st -p <freenas_ip>
sudo iscsiadm -m node
  • The output should look something like this:
sudo iscsiadm -m discovery -t st -p 192.168.10.238
192.168.10.238:3260,2 iqn.2005-10.org.freenas.ctl:iscsi-arditi

sudo iscsiadm -m node
192.168.10.238:3260,2 iqn.2005-10.org.freenas.ctl:iscsi-arditi


  • Login to the target
sudo iscsiadm -m node --login
  • Confirm the established session
sudo iscsiadm -m session -o show
  • Confirm the partitions
sudo cat /proc/partitions

#The output should like this 

major minor  #blocks  name

  11        0    1048575 sr0
   2        0          4 fd0
   8        0  209715200 sda
   8        1    2097152 sda1
   8        2          1 sda2
   8        5  207616000 sda5
   8       16   67108864 sdb
   8       17   67107840 sdb1
 253        0  234876928 dm-0
 253        1    6291456 dm-1
   8       32 2147483664 sdc
  • Install Partition Editor:
sudo apt install parted
  • Create Label:
sudo parted --script /dev/sdc "mklabel msdos"
  • Create Partition:
sudo parted --script /dev/sdc "mkpart primary 0% 100%"
  • Format with ext4:
sudo mkfs.ext4 /dev/sdc1
  • Mount the partition:
sudo mount /dev/sdc1 /mnt
  • Additionally we can get the UUID (in case to use in /etc/fstab)
sudo blkid

# The output should show something similar
/dev/sdc1: UUID="cd9bf391-94de-42a2-a608-baaeffca6780" TYPE="ext4" PARTUUID="030e4b30-01"
  • Add the entry to fstab and make sure an extra line was left bellow to avoid warnings:
UUID="cd9bf391-94de-42a2-a608-baaeffca6780"     /mnt    auto    rw,user,auto    0       0