public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: ltuikov@yahoo.com
Cc: Swen Schillig <swen@vnet.ibm.com>, Hannes Reinecke <hare@suse.de>,
	James Bottomley <James.Bottomley@steeleye.com>,
	Mike Anderson <andmike@us.ibm.com>,
	Christof Schmitt <christof.schmitt@de.ibm.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH] zfcp: Report FCP LUN to SCSI midlayer
Date: Sun, 01 Jul 2007 13:07:18 +0200	[thread overview]
Message-ID: <46878AE6.7040303@s5r6.in-berlin.de> (raw)
In-Reply-To: <725061.42209.qm@web31801.mail.mud.yahoo.com>

Luben Tuikov wrote:
> --- Stefan Richter <stefanr@s5r6.in-berlin.de> wrote:
>> Among else:  It should provide a framework which enables userspace to
>> find the unique object identifiers (that are required to uniquely and
>> persistently identify logical units) always in the same place.  (That's
>> just my opinion.  Current userspace tools like e.g. udev scripts are
>> adapted to hunt those identifiers down in various places, and this works
>> too.)
> 
> This information can be had by using default SPC commands, issued by
> specialized userspace tools.  For example the SG tools maintained by Doug.

I did a quick test with twelve SBP-2 devices.  Only four of them
implement the mandatory VPD pages.  But they show only vendor specific
identifiers which are incidentally world wide unique, but are not
guaranteed to be.  The results in detail:

1.) an MMC device: does not support INQUIRY with EVPD=1  (sg_inq says:
invalid VPD response; probably a STANDARD INQUIRY response)

2.) an SBC device which I suspect is rather an RBC device: does not
support EVPD=1 either (returns: Invalid Request)

3.) another SBC device from a different vendor and with a different
controller, which I too suspect is really an RBC device:  Returns
corrupt INQUIRY data which look as if (only) VPD page 0x1f was
implemented; but it isn't. (if any non-zero VPD page code is specified,
sg_inq says: invalid VPD response; probably a STANDARD INQUIRY response)

4.) an RBC device from the same vendor as device 2 and with a newer
revision of controller and firmware of that of device 2:  behaves like
device 3, even though hardware and firmware are very different from device 3

5.-7.) three RBC devices from the same vendor but with different
controllers  and quite different years of production:   They all
implement VPD pages 0x80 = Unit Serial Number and 0x83 = Device
Identification, which fulfills the minimal requirement according to RBC.
 Alas the Device Identification page merely contains a Vendor Specific
Identifier which SPC says is not guaranteed to be globally unique.  In
these two cases it happens to be the same as the upper 64 bits of the
SBP-3 Target port identifier, the EUI-64.

8.) an MMC device from the same vendor as devices 5-7 bit with yet
another different controller:  does not support EVPD=1  (returns:
Invalid Request)

9.) yet one more RBC device, a Mac in target disk mode:  does not
support INQUIRY with EVPD=1  (returns: Invalid Request)

10.) an RBC device with the same bridge as one of the devices 5-7 but
from a different vendor:  Behaves like devices 5-7

11.) an MMC device with possibly same controller as device 1 but from a
different vendor:  behaves like device 1

12.) a dual LU device with a controller like device 3.  I plugged a HDD
and a DVD-ROM into it so that LU 00 00 is a SBC device (perhaps more
like an RBC device) and LU 00 01 is an MMC device.  LU 00 00 behaves
like device 3.  LU 00 01 behaves like device 1.

For the heck of it I also tried REPORT LUNS on device 12:
# sg_luns /dev/sdd
Report Luns command not supported (support mandatory in SPC-3)
# sg_luns /dev/sr0
REPORT LUNS command error: SCSI status: Check Condition
 Fixed format, current;  Sense key: Not Ready
 Additional sense: Medium not present

 Raw sense data (in hex):
        70 00 02 00 00 00 00 0a  00 00 00 00 3a 00 00 00
        00 00
plus...: Driver_status=0x08 [DRIVER_SENSE, SUGGEST_OK]

-- 
Stefan Richter
-=====-=-=== -=== ----=
http://arcgraph.de/sr/

  reply	other threads:[~2007-07-01 11:07 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-19  8:25 [PATCH] zfcp: Report FCP LUN to SCSI midlayer Swen Schillig
2007-06-19  8:28 ` Hannes Reinecke
2007-06-19 12:19 ` Stefan Richter
2007-06-19 17:12 ` Christoph Hellwig
2007-06-20  2:46   ` James Bottomley
2007-06-21 15:03     ` Christof Schmitt
2007-06-21 16:46       ` Stefan Richter
2007-06-21 16:54         ` Stefan Richter
2007-06-22  1:41         ` James Bottomley
2007-06-22 19:01           ` Stefan Richter
2007-06-21 20:58       ` James Bottomley
2007-06-22  4:40         ` Mike Anderson
2007-06-22 11:34           ` Christof Schmitt
2007-06-22 14:11           ` James Bottomley
2007-06-22 16:16             ` Doug Maxey
2007-06-25 20:43               ` Luben Tuikov
2007-06-25 22:53                 ` Stefan Richter
2007-06-25 10:39             ` Swen Schillig
2007-06-25 14:03               ` Hannes Reinecke
2007-06-25 18:57                 ` Stefan Richter
2007-06-25 21:27                   ` Luben Tuikov
2007-06-25 21:55                     ` Stefan Richter
2007-06-26  0:35                       ` Luben Tuikov
2007-06-26 21:29                     ` Matthew Wilcox
2007-06-25 21:48                   ` James Bottomley
2007-06-25 22:27                     ` Stefan Richter
2007-06-26  1:04                       ` Luben Tuikov
2007-06-26 10:44                         ` Stefan Richter
2007-06-26 14:20                           ` James Bottomley
2007-06-26 15:47                             ` Stefan Richter
2007-06-26 17:01                               ` James Bottomley
2007-06-27  0:27                                 ` Stefan Richter
2007-06-27  0:45                                 ` [PATCH] SCSI: delete outdated comment in API reference Stefan Richter
2007-06-26  0:49                     ` [PATCH] zfcp: Report FCP LUN to SCSI midlayer Luben Tuikov
2007-06-26  9:38                       ` Stefan Richter
2007-06-27 10:27                 ` Swen Schillig
2007-06-28  4:21                   ` Luben Tuikov
2007-06-28 15:40                     ` Stefan Richter
2007-06-30 19:07                       ` Luben Tuikov
2007-06-30 21:26                         ` Stefan Richter
2007-07-01  6:27                           ` Luben Tuikov
2007-07-01 11:07                             ` Stefan Richter [this message]
2007-06-25 20:32             ` Luben Tuikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46878AE6.7040303@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=James.Bottomley@steeleye.com \
    --cc=andmike@us.ibm.com \
    --cc=christof.schmitt@de.ibm.com \
    --cc=hare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ltuikov@yahoo.com \
    --cc=swen@vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox