linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Mansfield <patmans@us.ibm.com>
To: linux-hotplug@vger.kernel.org
Subject: [announce] scsi_id 0.1 - generate unique scsi id
Date: Wed, 22 Oct 2003 00:12:28 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-106678884105673@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 1496 bytes --]

[Augh ... I used the the wrong hotplug devel address again. Already sent
to linux-scsi.]

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.

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

[-- Attachment #2: scsi_id-0.1.tar.gz --]
[-- Type: application/x-gzip, Size: 19559 bytes --]

             reply	other threads:[~2003-10-22  0:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-22  0:12 Patrick Mansfield [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-22 16:15 [announce] scsi_id 0.1 - generate unique scsi id Patrick Mansfield
2003-10-22 16:23 ` Christoph Hellwig
2003-10-23  7:33 ` Jes Sorensen

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=marc-linux-hotplug-106678884105673@msgid-missing \
    --to=patmans@us.ibm.com \
    --cc=linux-hotplug@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).