4

We have a Debian Lenny server with open-iscsi that's configured to log into a target automatically:

hostname:~# grep \\.startup /etc/iscsi/iscsid.conf
node.startup = automatic
hostname:~# grep \\.startup /etc/iscsi/nodes/iqn..../the.correct.ip.address\,port
node.startup = automatic
node.conn[0].startup = automatic
hostname:~#

If I issue a restart of open-iscsi via init.d, it works fine. But if I reboot the machine, iscsi starts, but does not even search for targets. I have to manually restart it before it works.

Any ideas how to make it find the target on boot?

Coops
  • 5,967
  • 1
  • 31
  • 52
Creshal
  • 269
  • 1
  • 5
  • 16

4 Answers4

2

The problem is the /etc/network/if-up.d/open-iscsi script is looking for the iscsi node config files in the wrong place.

/etc/iscsi/nodes/*/*/default

vs

/etc/iscsi/nodes/*/*

or, if you have multiple interfaces configured:

/etc/iscsi/nodes/*/*/*

Edit that file accordingly and the interface should be able to be brought up on networking start.

missionsix
  • 21
  • 2
0

Not sure how you mount the iscsi on boot, but if you use the fstab file, this should be your solution.

change defautls to _netdev:

LABEL=labelname /mnt/data ext4 defaults 0 2 

This will wait until network interfaces are up and then will look for iscsi targets to login and mount.

Thanks to ewwhite's answer on this post.

answered on 2015

MoRK
  • 1
  • 1
0

Could it be because the iSCSI service is coming up before the networking services have come online? i.e. when iSCSI loads there is no network connection for it to scan?

Coops
  • 5,967
  • 1
  • 31
  • 52
  • Nope, it starts after the network daemon. As far as I know, it *should* search for targets anyway. If it'd search, but not find anything, that's one thing, but it does not even try searching, that's my problem. – Creshal Mar 21 '11 at 13:06
0

Assuming you use a static network configuration, try change your interface declaration (in /etc/network/interfaces) from allow-hotplug to auto