iscsi mit synology NAS-Gehäuse SYNOLOGY DiskStation DS1815+

our setup had CHAP credentials enabled

errors

iscsid: connect to 169.254.180.65:3260 failed (No route to host)

[  388.964566] Hardware name: LENOVO 4290A68/4290A68, BIOS 8DET70WW (1.40 ) 05/14/2015
[  388.964568]  0000000000000000 00000000b3916143 ffffffff812ddf19 0000000000000000
[  388.964570]  ffffffff81072afd ffff8800af0e2400 ffff8802131ccb30 0000000000000001
[  388.964573]  ffff88007e158420 0000000000000000 ffffffffa0375883 0000000000000003
[  388.964575] Call Trace:
[  388.964582]  [<ffffffff812ddf19>] ? dump_stack+0x40/0x57
[  388.964585]  [<ffffffff81072afd>] ? warn_slowpath_common+0x7d/0xb0
[  388.964589]  [<ffffffffa0375883>] ? iscsi_complete_task+0x103/0x110 [libiscsi]
[  388.964593]  [<ffffffffa0378bb8>] ? __iscsi_complete_pdu+0x398/0xa10 [libiscsi]
[  388.964596]  [<ffffffff81532686>] ? ip6_finish_output2+0x1a6/0x4b0
[  388.964600]  [<ffffffffa0379268>] ? iscsi_complete_pdu+0x38/0x60 [libiscsi]
[  388.964603]  [<ffffffffa0384677>] ? iscsi_tcp_hdr_recv_done+0x267/0xbf0 [libiscsi_tcp]
[  388.964605]  [<ffffffff81531c0d>] ? ip6_xmit+0x22d/0x520
[  388.964609]  [<ffffffffa03840c7>] ? iscsi_tcp_recv_skb+0xa7/0x3f0 [libiscsi_tcp]
[  388.964612]  [<ffffffffa038abd0>] ? iscsi_sw_tcp_write_space+0xa0/0xa0 [iscsi_tcp]
[  388.964614]  [<ffffffffa038ac2d>] ? iscsi_sw_tcp_recv+0x5d/0x100 [iscsi_tcp]
[  388.964618]  [<ffffffff814d6ddc>] ? tcp_read_sock+0x9c/0x1e0
[  388.964621]  [<ffffffffa038b1fc>] ? iscsi_sw_tcp_data_ready+0x5c/0x100 [iscsi_tcp]
[  388.964624]  [<ffffffff814e33c4>] ? tcp_rcv_established+0x4b4/0x740
[  388.964626]  [<ffffffff8155c55d>] ? tcp_v6_do_rcv+0x18d/0x540
[  388.964628]  [<ffffffff8155d099>] ? tcp_v6_rcv+0x789/0x9c0
[  388.964631]  [<ffffffff814eeb10>] ? tcp_v4_rcv+0x850/0xa60
[  388.964634]  [<ffffffff81534b61>] ? ip6_input_finish+0x61/0x410
[  388.964636]  [<ffffffff8153541c>] ? ip6_input+0x2c/0xa0
[  388.964639]  [<ffffffff8153f9c5>] ? ip6_dst_check+0x65/0x90
[  388.964641]  [<ffffffff8155b477>] ? tcp_v6_early_demux+0x107/0x160
[  388.964643]  [<ffffffff81535229>] ? ipv6_rcv+0x319/0x4e0
[  388.964645]  [<ffffffff81534a60>] ? ip6_make_skb+0x1c0/0x1c0
[  388.964648]  [<ffffffff8148f570>] ? __netif_receive_skb_core+0x700/0x9d0
[  388.964660]  [<ffffffffa0859947>] ? ieee80211_crypto_ccmp_decrypt+0x1d7/0x2f0 [mac80211]
[  388.964662]  [<ffffffff8148f8bf>] ? netif_receive_skb_internal+0x2f/0xa0
[  388.964674]  [<ffffffffa08728ff>] ? ieee80211_deliver_skb+0x13f/0x1a0 [mac80211]
[  388.964685]  [<ffffffffa0874a89>] ? ieee80211_rx_handlers+0xd89/0x24e0 [mac80211]
[  388.964688]  [<ffffffff810d4288>] ? ns_to_timeval+0x38/0x80
[  388.964699]  [<ffffffffa08763a0>] ? ieee80211_prepare_and_rx_handle+0x1c0/0xa70 [mac80211]
[  388.964709]  [<ffffffffa0876f26>] ? ieee80211_rx_napi+0x2d6/0x870 [mac80211]
[  388.964715]  [<ffffffffa08367e3>] ? iwl_pcie_irq_handler+0x743/0xd10 [iwlwifi]
[  388.964718]  [<ffffffff810c6320>] ? irq_finalize_oneshot.part.33+0xe0/0xe0
[  388.964721]  [<ffffffff810c633b>] ? irq_thread_fn+0x1b/0x40
[  388.964723]  [<ffffffff810c6667>] ? irq_thread+0x127/0x150
[  388.964726]  [<ffffffff810c63c0>] ? irq_forced_thread_fn+0x60/0x60
[  388.964728]  [<ffffffff810c6540>] ? irq_thread_check_affinity+0xe0/0xe0
[  388.964731]  [<ffffffff810904ad>] ? kthread+0xcd/0xf0
[  388.964734]  [<ffffffff810903e0>] ? kthread_create_on_node+0x190/0x190
[  388.964737]  [<ffffffff815867cf>] ? ret_from_fork+0x3f/0x70
[  388.964739]  [<ffffffff810903e0>] ? kthread_create_on_node+0x190/0x190
[  388.964741] ---[ end trace e31c99d4fbad4a0f ]---
[  388.971645]  connection1:0: detected conn error (1020)
[  388.995082]  connection2:0: detected conn error (1020)

discovery

   iscsiadm -m discovery -t sendtargets -p fd00::111:1111:1232:2234

removing

after detection we need to remove all redundant links to the synology

   cd /etc/iscsi/nodes
   rm -r 169.254.*        

we only left the ipv6 entry.

note: this might circumevent an issue with multiple logins on the synology *guess*

manual loading

   iscsiadm -m node --login

note: this has to be done once

autoloading

you can set 'automatic' in both files:

   /etc/iscsi/iscsi.conf
   /etc/iscsi/nodes/iqn.2000-01.com.synology:foobar-media.target-1/fd00::111:1111:1232:2234,3260,0/default 

note: the more important is the latter one

mount

/etc/systemd/system/music_storage.mount

systemctl disable iscsi.service to remove legacy crap
# /run/systemd/generator/music_storage.mount
# Automatically generated by systemd-fstab-generator

[Unit]
Before=remote-fs.target

[Mount]
What=/dev/vol_grp1/music_storage
Where=/music_storage
Type=xfs

[Install]
WantedBy=remote-fs.target
cat music_storage.automount 
[Unit]
Description=Provides automount for grammofy /music_storage

[Automount]
Where=/music_storage
Powered by MediaWiki