You are root when you do this, right?
And the /etc/iscsi/nodes/<..>/../ does have a default file?
What version of open-iscsi are you using? Did it come from
open-iscsi.org or a distro? If it is a distro could you send the
open-iscsi script from /etc/init.d/open-iscsi?
I just tried it real quick with open-iscsi-2.0-869.2 and it worked ok here.
Also after you run the command to set automatic startup could you run:
iscsiadm -m node -L automatic -d 8
and send all the output (the init script should just be doing that
command, so this will dump out a lot of debugging info)?
What version of the tools are you using and did you upgrade or switch
tool versions?
And did you make this node by hand/manually by doing
iscsiadm -m node -T target -p ip:port --op new
?
The wierd part is that we see this in the log out put you snipped:
iscsiadm: found 10.3.2.7,3260,-1
Here the tpgt is -1 which means it did not get set. Normally targets are
going to send us this so if we did sendtargets we should have that info.
If you do the old style build by hand with no tpgt like this to create
the record:
iscsiadm -m node -T target -p ip:port --op new
then the db uses the old format (so
/etc/iscsi/nodes/<targetname>/10.3.2.1,3260 would be a file)
To use the new format you have to pass in the tpgt
iscsiadm -m node -T target -p ip:port,tpgt --op new
(here there is no /etc/iscsi/nodes/<targetname>/10.3.2.1,3260 file and
we have /etc/iscsi/nodes/<targetname>/10.3.2.1,3260,tpgt as a dir).
> iscsiadm -m node -T <targetname> --op update -n node.startup -v
> automatic
>
This is the right command for the new DB format where the tpgt is known
(not -1).
For the old format you had to pass in the target and portal:
iscsiadm -m node -T target -p ip:port --op update -n node.startup -v
automatic
So if you are creating the records manually but do not know the tpgt you
can pass in anything greater than -1 when you create the record, and we
will figure it out dynamically (later to manage the node you would not
pass in anything for the tpgt and we will figure it out or pass in
whatever you passed in when you created it).
iscsiadm -m node -T target -p ip:port,tpgt --op new
Attached is a patch to support the old behavior with new tools. I
thought I added this before, but it looks like for some reason I did not
handle all the cases.
The patch applies to git head or the 869.2.