Using iSCSI from Ubuntu 19.04

Samba has taken over most of my sharing but I still occasionally need iSCSI. Connecting to it from Ubuntu is straight enough. First step is of course installing necessary package:

sudo apt-get install open-iscsi

Next step is simply connecting to iSCSI and discovering the drive name within dmesg output:

sudo iscsiadm -m discovery -t sendtargets -p,1

sudo iscsiadm --mode node --targetname \
--portal --login

sudo dmesg | grep "Attached SCSI disk" | tail -1
[ 3203.813577] sd 2:0:0:0: [sda] Attached SCSI disk

Lastly, just use the normal mounting to access the disk:

sudo mkdir /mnt/scsi
sudo mount /dev/sda2 /mnt/iscsi

Leave a Reply

Your email address will not be published. Required fields are marked *