#664604 "add event based mount support for open-iscsi"

Package:
open-iscsi
Source:
open-iscsi
Description:
iSCSI initiator tools
Submitter:
Philipp Gysin
Date:
2025-08-17 17:47:46 UTC
Severity:
wishlist
Tags:
#664604#5
Date:
2012-03-19 10:16:22 UTC
From:
To:
I noticed that the init.d script is not mounting my iscsi device listed in fstab as a _netdev.
The problem seems to be that the properly contacted target is not yet in the /dev tree when mount is called

I added a tiny sleep 0.1 before the mount call and got rid of my problem

Here the patch for /etc/init.d/open-iscsi:
128c128
< 	if mount -a -O _netdev >/dev/null 2>&1; then
---

Greetings,
Philipp

#664604#10
Date:
2012-03-20 07:37:28 UTC
From:
To:
That's an okay workaround but not the best solution. Do you have
/dev/.udev ?

I ask because the check we do in Squeeze is based on the presence of
/dev/.udev. Not the best one. If that path is not existent, we do not
settle for devices. Apart from that, I cannot see anything else causing
the issue.

Do you have the resources to check the same on the current version in
Wheezy / Sid ?

#664604#15
Date:
2012-03-20 10:23:21 UTC
From:
To:
Hi Ritesh,
called "udevdam settle" manually. This one returns but the dev tree is
still not complete, i.e. /dev/sdb does not exist yet when it's time to mount

BTW, sleep 1 is more reliable than sleep 0.1 I found out - and yes, I agree
that this is not the best solution

Greetings,
Philipp


I ask because the check we do in Squeeze is based on the presence of
Unfortunately not

#664604#20
Date:
2012-05-21 18:31:16 UTC
From:
To:
reassign 664604 udev
thanks

This cannot be tackled using random sleeps. If there is really a bug, we
need more efficient rules in udev to handle the block devices.

#664604#25
Date:
2012-05-21 18:31:51 UTC
From:
To:
reassign 664604 udev
thanks

This cannot be tackled using random sleeps. If there is really a bug, we
need more efficient rules in udev to handle the block devices.

#664604#34
Date:
2012-05-21 19:25:44 UTC
From:
To:
reassign 664604 open-iscsi
thanks
Correct.
The real bug is that you are trying to synchronous operations in
a process which is asynchronous. You need to mount these block devices
using udev rules.
OTOH, this may be solved more generally by init scripts, have a look at
upstart and systemd.

#664604#41
Date:
2012-05-21 22:19:55 UTC
From:
To:
Then we don't have much choice. A udev rule can be cooked up, but that
would be very specific.

Or else you could do a test with the newer init systems and see if that
serves your purpose