On 01.04., Claudio Jeker wrote:
> On Thu, Apr 01, 2021 at 07:27:10AM +0200, Bruno Flueckiger wrote:
> > On 31.03., David Alten wrote:
> > > Hello,
> > >
> > > I???m having issues getting iscsid to work with my Synology NAS.
> > >
> > > The first issue was that the NAS was returning an error code. Turns out
> > > it didn???t like not?? missing the default SessionType=Normal.
> > >
> > > The second issue was that the login sequence never comleted. It seems we
> > > keep hardcoding MaxConnections and MaxRecvDataSegmentLength in
> > > connection.c:conn_gen_kvp() instead of negotiating to the lowest value.
> > > So I just bypassed that function entirely and hardcoded all the default
> > > settings in initiator.c.
> > >
> > > This makes the login step complete, but then nothing else happens after
> > > that. I would expect a new scsi device to be attached so I could use it.
> > >
> > > I did notice that MaxConnection shows as 0, but the NAS does show the
> > > connection as established.
> > >
> > > b1# iscsictl show?? ??
> > > Initiator: ISID base 80d3cf6f qalifier 6e7d
> > >
> > > Session 'disk2':
> > > ?? ?? SessionType: normal MaxConnections: 0
> > > ?? ?? TargetName: iqn.2000-01.com.synology:Target.02
> > > ?? ?? TargetAddr: 192.168.0.4:iscsi
> > > ?? ?? InitiatorName: iqn.1995-11.org.openbsd.iscsid:b1
> > > ?? ?? InitiatorAddr: 192.168.0.9
> > > command successful
> > >
> > > b1$ cat /etc/iscsi.conf?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 
> > > ?? ?? ?? ?? ?? ?? ?? ??
> > > ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ????
> > > target disk2 {
> > > ?? ?? ?? ?? initiatoraddr 192.168.0.9
> > > ?? ?? ?? ?? targetaddr 192.168.0.4
> > > ?? ?? ?? ?? targetname "iqn.2000-01.com.synology:Target.02"
> > > }
> > > Any suggestions on where to go from here?
> > >
> > > Thanks,
> > >
> > > -David
> > >
> >
> > Hi David,
> >
> > I had the same problem some years ago when I tried to attach an iSCSI
> > LUN from my Synology to my APU box. I wrote the patch below which fixed
> > the problem for me. Maybe you can give it a try?
> >
>
> Can someone send me a full pcap file of the negotiation with the synology
> nas device? It seems there is something not quite right in the negotiation
> code but the proposed diffs don't look correct either.
>
> --
> :wq Claudio
>

This is the captures I've used four years ago to analyze the connection
problem between iscsid and my Synology device:

https://www.bsdhowto.ch/downloads/synology_target.pcap

My theory was that the target code expects a confirmation for the
paramters it sends during the login phase. But iscsid keeps responding
with the only two parameters it started the login. As a workaround I
added the "missing" parameters.

Cheers,
Bruno

Reply via email to