From: Patrick Mansfield <patmans@us.ibm.com>
To: "Surekha.PC" <surekhap@cisco.com>,
'SCSI Mailing List' <linux-scsi@vger.kernel.org>,
linux-hotplug-devel@lists.sourceforge.net
Subject: udev naming of st devices [was Re: iSCSI device naming issues]
Date: Thu, 1 Jul 2004 10:29:00 -0700 [thread overview]
Message-ID: <20040701172900.GA21262@beaverton.ibm.com> (raw)
In-Reply-To: <20040701155714.GA7172@us.ibm.com>
[adding linux-hotplug-devel]
On Thu, Jul 01, 2004 at 08:57:14AM -0700, Mike Anderson wrote:
> Surekha.PC [surekhap@cisco.com] wrote:
> > 3) Make use of scsi_id.
> > scsi_id can be used to get unique name instead of parsing sysfs
> > path for device name creation. However scsi_id is helpful only
> > for block devices, and there is no way to handle unique naming
> > for tape devices. So this will not make a complete solution.
>
> Well you can still setup a udev rule to use scsi_id for you block
> devices and then use location naming for the tapes ( some newer
> generation tape drives also support serial numbers).
Yes, I had no problems running scsi_id on some older DLT drives (DLT
4000?).
There is a naming issue with st, in that unique tape names need to put an
identifier in the middle of the different names, or at least parse out a
middle portion of the kernel name.
That is, tape names are of the form:
st13
st13a
st13l
st13m
nst13
nst13a
nst13l
nst13m
So if you want a unique name in the above, you would generally want to
substitute the 13 with a value.
You can't do this with a one line udev rule, using scsi_id with an eight
line rule (each one containing the same scsi_id value to match) is ugly,
and I'm not sure if it would work (udev wildcard pattern matching for
things like st[0-9]*l).
A script could be written to handle this, it would be passed a kernel
name, a scsi_id value to match and a name string. It would call scsi_id,
and if it matches the passed in value, return the name string for the
device wrapped with pre and post fixes.
Or maybe udev can be changed to better handle this, but I don't have
suggestions or patches.
Changing st default kernel names would simplify the problem, but is not
allowed.
-- Patrick Mansfield
next prev parent reply other threads:[~2004-07-01 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-01 13:58 iSCSI device naming issues Surekha.PC
2004-07-01 15:57 ` Mike Anderson
2004-07-01 17:29 ` Patrick Mansfield [this message]
2004-07-04 19:57 ` Arjan van de Ven
2004-07-07 9:05 ` Surekha.PC
2004-07-04 20:11 ` Christoph Hellwig
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=20040701172900.GA21262@beaverton.ibm.com \
--to=patmans@us.ibm.com \
--cc=linux-hotplug-devel@lists.sourceforge.net \
--cc=linux-scsi@vger.kernel.org \
--cc=surekhap@cisco.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