On Sat, May 28, 2011 at 6:32 PM, Marc Smith <marc.smith@mcc.edu> wrote:
So, the way I understand this is the EUI is generated from the first 8
characters of t10_dev_id?

I was also getting all duplicated EUIs; I used scstadmin to configure
SCST and used volume names like this:

tangerine_ssd_1
tangerine_ssd_2
tangerine_ssd_3

When it generated t10_dev_id, it was using these:
t10_dev_id "tangerine_ssd_1 90cc7637"
t10_dev_id "tangerine_ssd_2 c048d915"
t10_dev_id "tangerine_ssd_3 d7e6d5db"

So, based on the names I chose, the first 8 characters were all the
same. I changed them to look like this:

t10_dev_id "90cc7637 tangerine_ssd_1"
t10_dev_id "c048d915 tangerine_ssd_2"
t10_dev_id "d7e6d5db tangerine_ssd_3"

And now all of EUIs work like they should (same unique EUI per volume
regardless of path).

Maybe this is something that could be changed in scstadmin (I assume
that is where t10_dev_id is generated) so that the usn value is put
before the volume name?

Hello Marc,

If no t10_dev_id has been specified in /etc/scst.conf, an ID is generated based on the device name. For identical device names identical IDs are generated. Different device names (should) result in different IDs. The algorithm for generating that ID resides in kernel module scst_vdisk and can be found in the source file scst/src/dev_handlers/scst_vdisk.c. It is correct that many initiators only consider the first eight characters of the t10_dev_id. So recently the algorithm for generating the t10_dev_id has been modified such that the hex digits come first instead of last. That change is present on the trunk and the 2.1 branch but not on the 2.0 branch.

Bart.