One minute
Import iSCSI storage in Ubuntu
This post is about importing iSCSI devices in Ubuntu 20.04 LTS. This could be useful if you for example want share tape drives from your virtual tape library (VTL).
I’m assumes that your iSCSI target is configured and working. I’ve tested this under Ubuntu 20.04 LTS but it might also work under Ubutnu 18.04 and 22.04 LTS.
installation
First we need to install open-iscsi for compatiblity of our Ubuntu OS
sudo apt install lsscsi open-iscsi
Next we have to setup some initial configuration
sudo vi /etc/iscsi/initiatorname.iscsi
# DO NOT EDIT OR REMOVE THIS FILE!
...
# for each iSCSI initiator. Do NOT duplicate iSCSI InitiatorNames
InitiatorName=iqn.2006-06.com.quadstor.vtl.test.autoloader
And restart the service sudo systemctl restart open-iscsi
also you can enable the service with sudo systemctl enable open-iscsi
if you want the service to operate also after a reboots.
configuration
Let us check if our iSCSI target is working
$ sudo iscsiadm -m discovery -t sendtargets -p quadstor.lan
192.168.178.30:3260,1 iqn.2006-06.com.quadstor.vtl.test.autoloader
192.168.178.30:3260,1 iqn.2006-06.com.quadstor.vtl.test.drive1
192.168.178.30:3260,1 iqn.2006-06.com.quadstor.vtl.test.drive2
next we have to login into the iSCSI devices
sudo iscsiad -m node --loginall all
checks
sudo shutdown -r now