[Pkg-iscsi-maintainers] Bug#833917: open-iscsi: LVM fails to see iSCSI targets for non-mounted devices with systemd.

Christian Seiler christian at iwakd.de
Thu Aug 11 09:30:26 UTC 2016


On 08/11/2016 11:16 AM, IOhannes m zmölnig (Debian/GNU) wrote:
> On 2016-08-10 15:52, Christian Seiler wrote:
>> Could you give me the output of the following?
>>
>> journalctl -u open-iscsi
> 
> attached as open-iscsi.log
> 
> i have also attached a 2nd logfile open-iscsi2.log, which contains some
> more messages (after the initial connection to the iSCSI target failed
> and before open-iscsi tries to reactivate the VG) from the kernel,
> shwing how the interface is being brought up.

That was very helpful.

So what appears to happen is the following: the disks do show
up before the iscsiadm --loginall=automatic command returns,
but the partitions of those disks aren't scanned until after
that. This means that there's a race condition between the
kernel finding the partitions that contain the PVs and the
open-iscsi init script calling vgchange -a y - and in your
case the vgchange happens _before_ the kernel finds the
partitions. (Probably only by milliseconds.)

(In general, the current startup model is not ideal - and in
Stretch we plan to move to a more dynamic model that is more
event-based - but that requires lvmetad to work when using
LVM, and IIRC lvmetad is broken in Jessie.)

In the init scripts, there's line 110 that contains

    udevadm settle || true;

Could you add a

    sleep 1

_before_ that line and see if that fixes things for you?

Regards,
Christian



More information about the Pkg-iscsi-maintainers mailing list