Network-Guides

main DNS DHCP Storage Repo

Storage

Knowledge Base ZFS & Proxmox ISCSI & Proxmox & SCST

ISCSI & PROXMOX

Install

RHEL

Firewall

$ sudo firewall-cmd --permanent --add-port=3260/tcp
$ sudo firewall-cmd --reload

Install targetcli and dependencies

$ sudo dnf install git
$ sudo dnf groupinstall "Development Tools" -y
$ sudo dnf install openssl-devel -y
$ sudo dnf install targetcli
$ sudo systemctl start target
$ sudo systemctl enable target

Debian

$ sudo apt update
$ sudo apt install build-essential -y
$ sudo apt install libssl-dev -y
$ sudo apt install multipath-tools -y
$ sudo apt install tgt

creating a iscsi target without scst-project

create target

sudo targetcli
/iscsi> create

create a portal

/iscsi> cd portals/
/iscsi/portals> create 192.168.1.100 3260

export resources

/iscsi> cd backstores/fileio/
/iscsi/backstores/fileio> create blockdev1 fileio /var/lib/mydata 10240
/iscsi> cd core/
/iscsi/core> create tpg1
/iscsi/core/tpg1> create acl iqn.2006-04.com.example:444
/iscsi/core/tpg1/acl> add initiator iqn.1993-08.org.debian:01:123456789abcdef
/iscsi/core/tpg1/luns> map blockdev1 1 0

add portal to proxmox


SCST Project

clone the repo:

$ git clone https://github.com/SCST-project/scst.git
$ cd scst

or

$ wget https://github.com/SCST-project/scst/archive/refs/tags/v3.8.tar.gz
$ tar -xzf v3.8.tar.gz
$ cd scst-3.8

install

make 2release
if rpm -q glibc >/dev/null 2>&1; then
    rm -rf {,scstadmin/}rpmbuilddir
    make rpm
    sudo rpm -U $PWD/{,scstadmin/}rpmbuilddir/RPMS/*/*.rpm
elif dpkg-query -s libc-bin >/dev/null 2>&1; then
    sudo apt install build-essential debhelper devscripts gcc make lintian quilt
    sudo apt install linux-headers-$(uname -r) || sudo apt install pve-headers-$(uname -r)
    make dpkg
    sudo dpkg -i $PWD/dpkg/{scst,iscsi-scst,scstadmin}_*.deb
else
    make 2release
    BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make all
    sudo BUILD_2X_MODULE=y CONFIG_SCSI_QLA_FC=y CONFIG_SCSI_QLA2XXX_TARGET=y make -C "$PWD" install
fi