Install iSCSI target
apt update
apt install tgt -y
systemctl status tgt
配置iscsi target:
touch /etc/tgt/conf.d/iscsi.conf
<target iqn.2020-07.example.com:lun1>
backing-store /dev/sdb
initiator-address 192.168.0.5
incominguser iscsi-user password
outgoinguser iscsi-target secretpass
</target>
systemctl restart tgt
tgtadm --mode target --op show