Ubuntu connect synology iscsi

From Luniwiki
Jump to: navigation, search

Create iscsi target on Synology DSM

We assume that 1TB volume has already been created.
Iscsi 001.png
Iscsi 002.png
Iscsi 003.png
Iscsi 004.png
Iscsi 005.png

Install software

apt install open-iscsi

Configuration

Modify /etc/iscsi/iscsid.conf

#node.startup = manual
node.startup = automatic

Discover the iscsi target

iscsiadm -m discovery -t st -p <SERVER_NAME>
<IPv4>:3260,1 iqn.2000-01.com.synology:altair.Target-1.457e4eb7fa
[<IPv6>]:3260,1 iqn.2000-01.com.synology:altair.Target-1.457e4eb7fa
[<IPv6>]:3260,1 iqn.2000-01.com.synology:altair.Target-1.457e4eb7fa
[<IPv6_local>]:3260,1 iqn.2000-01.com.synology:altair.Target-1.457e4eb7fa

Log on to iSCSI target

iscsiadm -m node --targetname "iqn.2000-01.com.synology:altair.Target-1.457e4eb7fa" --portal "<IPv4>:3260" --login
Logging in to [iface: default, target: iqn.2000-01.com.synology:altair.Target-1.457e4eb7fa, portal: <IPv4>,3260] (multiple)
Login to [iface: default, target: iqn.2000-01.com.synology:altair.Target-1.457e4eb7fa, portal: <IPv4>,3260] successful.

check logs

dmesg 
[25499.237718] scsi host4: iSCSI Initiator over TCP/IP
[25499.264591] scsi 4:0:0:1: Direct-Access     SYNOLOGY iSCSI Storage    3.1  PQ: 0 ANSI: 5
[25499.266552] sd 4:0:0:1: Attached scsi generic sg1 type 0
[25499.271392] sd 4:0:0:1: [sdb] 2111832064 512-byte logical blocks: (1.08 TB/1007 GiB)
[25499.271907] sd 4:0:0:1: [sdb] Write Protect is off
[25499.271915] sd 4:0:0:1: [sdb] Mode Sense: 3b 00 00 00
[25499.273127] sd 4:0:0:1: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[25499.294485] sd 4:0:0:1: [sdb] Attached SCSI disk

References

Daniel Simao (talk) 11:13, 2 September 2018 (EDT) [Category:Hardware]]