main | DNS | DHCP | Storage | Repo |
Knowledge Base | ZFS & Proxmox | ISCSI & Proxmox & SCST |
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
$ 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
- not sure if ssh was required, but i guess so ```bash $ sudo apt install openssh-server $ sudo systemctl enable –now ssh
create target
sudo targetcli
/iscsi> create
/iscsi> create iqn.2006-04.com.example:444
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
- in our example adress would be
iqn.2006-04.com.example:444
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
$ sudo make 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