On 02/13/2013 08:38 AM, [email protected] wrote:
> Hello all,
> 
> In order to test a storage device I would like to set ISID in advance
> (e.g same ISID for two different sessions, same ISID after for reconnect
> etc)
> 
> Is it possible to set the ISID values?

No.

> Who actually determines these values?

The iscsi initiator. See open-iscsi/usr/initiator.c:__session_create().

        session->isid[0] = DRIVER_ISID_0;
        session->isid[1] = DRIVER_ISID_1;
        session->isid[2] = DRIVER_ISID_2;
        session->isid[3] = 0;
        session->isid[4] = 0;
        session->isid[5] = 0;

That code inits the first couple bits. Then in session_conn_poll() we
set the last couple bits based on kernels id for the session.

        session->isid[3] = session->id;


> 
> From the source code I understood that the kernel / driver sets the
> session ID. I hope I am wrong and the value is somehow set/calculated by
> user space tools (iscasiadm or iscsid)
> 

If you are ok with reading/changing the code then you can just changed
that last part in session_conn_poll to be what you want until there is a
way to config it. When you look at the code you will see the TODO item
above the code that sets the isid[3] which describes what you wanted in
your mail.

-- 
You received this message because you are subscribed to the Google Groups 
"open-iscsi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/open-iscsi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to