public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Philip R. Auld" <pauld@egenera.com>
To: Steven Dake <sdake@mvista.com>
Cc: Patrick Mansfield <patmans@us.ibm.com>,
	linux-hotplug-devel@lists.sourceforge,
	linux-scsi@vger.kernel.org
Subject: Re: [announce] scsi_id 0.1 - generate unique scsi id
Date: Mon, 27 Oct 2003 09:16:55 -0500	[thread overview]
Message-ID: <20031027091655.B4263@vienna.EGENERA.COM> (raw)
In-Reply-To: <1067031185.4772.48.camel@persist.az.mvista.com>; from sdake@mvista.com on Fri, Oct 24, 2003 at 02:33:05PM -0700

Hi,

Rumor has it that on Fri, Oct 24, 2003 at 02:33:05PM -0700 Steven Dake said:
> 
> On Tue, 2003-10-21 at 16:58, Patrick Mansfield wrote:
> > Attached is version 0.1 of scsi_id, a program to generate a SCSI unique
> > identifier for a given SCSI device.
> > 
> > It is primarily for use with udev callout config entries. It could also be
> > used for automatic multi-path configuration.
> > 
> Patrick,
> Here is a quick hack I wrote to do automatic multipath configuration
> some time ago.  It works with devfs only but could be modified by
> someone interested to work with other device names.
> 
> It also uses the extended inquiry page 83 to retrieve a IEEE id.
> 

In my experience code page 0x83 by itself is not always enough. There 
are high-end devices that don't return the results correctly. This leads 
to false negatives (which are safer than false positives, of course, but 
make multipath useless). I think in all of these auto-mp detection schemes 
there needs to be some mechanism for dealing with the quirks of different 
machine types. In userspace it should not be hard to have a table of some 
kind to tell such programs how to compare the results. This can also depend 
on how the system is configured as well so that adds another level of 
complexity.

Code page 0x80 does work for this array, modulo the FA port number which 
can be exposed as part of the serial number, making them look "too" unique.

I haven't gotten to try either of these programs. (Our systems have neither
devfs nor kernel 2.6). However, I've had to develop a home-grown automatic 
multipath driver and have had to deal with all of these issues. I'd very 
much like to be able to use the native Linux multipathing in the future.
So, to that end I thought I'd jump in here and offer my 2 cents.

Cheers,

Phil


> Cheers
> -steve
> 
> > It generates and uses a temporary dev entry based on the values found in
> > sysfs dev attributes. This means it does not support SCSI drivers that do
> > are not currently creating dev entries (st or sg). In addition, for this
> > to function with st (assuming you have a tape drive that supports page 0x80
> > or page 0x83) st would have to support SG_IO.
> > 
> > It uses the SG_IO ioctl to send SCSI INQUIRY page 0x80 or page 0x83
> > commands to the SCSI device.
> > 
> > Requires:
> > 
> > - Linux kernel 2.6
> > 
> > - libsysfs 
> > 
> > No man page yet.
> > 
> > libsysfs 0_2_0 was not installing libsysfs.h or dlist.h, manually copy
> > those files to /usr/include/sys before compiling.
> > 
> > Build via make and make install.
> > 
> > To use with udev, in short:
> > 
> > Run scsi_id to dump a value, for example, for sda, run:
> > 
> > 	scsi_id  -s /block/sda
> > 
> > Take the resulting value (including white space) and use it as the ID in a
> > udev CALLOUT entry, an exmample /etc/udev/namedev.config entry for one of
> > my disk drives:
> > 
> > CALLOUT, PROGRAM="/sbin/scsi_id" BUS="scsi", ID="SIBM OEM DCHS09X 68078621" NAME="disk-1"
> > 
> > I have not tried using scsi_id (or udev) via initramfs or initrd.
> > 
> > Please send me any questions, comments or patches.
> > 
> > Thanks!
> > 
> > -- Patrick Mansfield



-- 
Philip R. Auld, Ph.D.                  Technical Staff 
Egenera Corp.                        pauld@egenera.com
165 Forest St., Marlboro, MA 01752       (508)858-2600

  reply	other threads:[~2003-10-27 14:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-21 23:58 [announce] scsi_id 0.1 - generate unique scsi id Patrick Mansfield
2003-10-22 14:31 ` Christoph Hellwig
2003-10-22  7:42   ` Daniel Stekloff
2003-10-22 14:46     ` Christoph Hellwig
2003-10-22  8:05       ` Daniel Stekloff
2003-10-22 15:52         ` Matthew Wilcox
2003-10-22 16:15           ` Patrick Mansfield
2003-10-22 16:23             ` Christoph Hellwig
2003-10-23  7:33             ` Jes Sorensen
2003-10-24 21:33 ` Steven Dake
2003-10-27 14:16   ` Philip R. Auld [this message]
2003-10-27 15:27     ` Patrick Mansfield
2003-10-27 17:06       ` Philip R. Auld
2003-10-27 17:31         ` Patrick Mansfield
2003-10-28 14:19           ` Philip R. Auld
2003-10-28 15:06             ` Patrick Mansfield
2003-10-28 15:40               ` Philip R. Auld
2003-10-28 16:29                 ` Patrick Mansfield

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=20031027091655.B4263@vienna.EGENERA.COM \
    --to=pauld@egenera.com \
    --cc=linux-hotplug-devel@lists.sourceforge \
    --cc=linux-scsi@vger.kernel.org \
    --cc=patmans@us.ibm.com \
    --cc=sdake@mvista.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