On 08/19/2016 02:11 PM, Fredrik Nilsson wrote:
> The contents of initiatornam.iscsi is one line:
> 
> GenerateName=yes

Ok, there's the problem. The message from iscsistart is misleading,
because not the target name is invalid, but the initiator name.
(Probably because of the way the options are passed, it thinks
that way.)

The reason why that is is actually a bug in open-iscsi, because
while it does copy the proper file into the root filesystem at the
end of the installer, it doesn't re-generate the initramfs, so that
only contains the default file.

This was fixed in Stretch anyway because we now generate the
initiator name on install (in postinst), but not upon first start
of the daemon anymore.

I've now reported this bug, to be able to track it.
https://bugs.debian.org/834830
(I've reproduced the problem in a VM on my system.)

I'll try to get a fix that for into the next point release - no
promises though.

If you want to boot your system in the mean time, there is a trick
you can do, once you're in the initramfs shell:

echo InitiatorName=iqn.test:test > /etc/initiatorname.iscsi
/scripts/local-top/iscsi
exit

That should boot your system. Once you're in the system, you need
to run (as root):

update-initramfs -k all -u

And then your system should boot normally.

> Looking at the kernel parameters there is no mentioning of any ip settings.
> I have tried supplying static ip settings, initiatorname and target name as
> kernel parameters but to me it looked liked those settings where ignored.

Yeah, so I checked again, and setting kernel parameters is actually
not necessary. (And won't change anything.)

> I have also tried to set the target name via the dhcp root-path option,
> which is then written out on the console at boot time, but the result is
> still the same error message and a drop to the initrams shell.

No, that doesn't help at all. In Jessie, open-iscsi is configured via
the files /etc/iscsi/iscsi.initramfs and /etc/iscsi/initiatorname.iscsi,
and there's no way to override things. In Stretch, there will be some
support for root=iscsi:... though. The DHCP parameters are completely
ignored even there though. (I'm not sure it'd be easy to support that
reliably across different types of configurations.)

Regards,
Christian

Reply via email to