linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Statically nameing a SCSI device
@ 2007-08-11 21:25 gerald.hotplug
  2007-08-12  3:49 ` Greg KH
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gerald.hotplug @ 2007-08-11 21:25 UTC (permalink / raw)
  To: linux-hotplug

I know this was discussed recently here:
<http://sourceforge.net/mailarchive/forum.php?thread_nameÓd656c40708012110o29e111b4w707ee03afb0e71f2%40mail.gmail.com&forum_name=linux-hotplug-devel>

I wasn't on the list at the time so I'm starting a new thread.

I have a rather unique situation.

I have a machine with 20 drive bays. 16 SCSI-SCA and 4 SATA. The
architecture does not know about the SATA controller until the Linux
kernel takes over so they cannot be used as boot devices. They need to
stay at the "end of the device tree".

I would like to give them persistent names of /dev/sdw, /dev/sdx,
/dev/sdy, and /dev/sdz.

But, all of the programs that udev uses to get unique identifying
information about drives to use in naming rules seem to require that you
know the kernel name first. Why does nothing in udev seem to allow one to
use standard SCSI host,channel,device,lun nomenclature to query a device?

The 4 SATA bays will have drives in all of them long before I fill up 16
SCA bays. But, every time I add and SCA drive to the primary controller
all of the SATA drives have their kernel name shifted up one letter so I
can't use the kernel name to query the device for its serial number.

These drives are for data storage only but they will probably be formatted
using LVM so I can create one big mount point without having a symlink
farm growing so I need to keep stable /dev/sd'x' names for LVM to keep
track of them.

Anyone have any idea of what I can use to create a uniquely identifying
rule for each of these drives so that I can assign static /dev/sd'x' NAMES
to them at boot time even when the kernel name has changed?

Or, can anyone point me to documentation of a clear way to do this in
kernel space. Eg., to have the kernel always assign the same kernel name
to a device in a certain range (sdw, sdx, sdy, sdz) based on it's SCSI
loaction ID (4,0,0,0 -- 4,0,1,0 -- etc.)?

Thanks,

Gerald

P.S.

Wait a sec, I'm re-reading my message before posting and getting an idea
but I have too little udev experience to implement it.

Can I write a set of rules in a 20-local.rules file that will run

scsi_id -g -s /block/sd'x'

for every value of 'x' looking for

"SATA     WDC WD2500YS-01     WD-WCANY1955037"

And then assigning NAME="sdw"

??


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-08-15 22:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-11 21:25 Statically nameing a SCSI device gerald.hotplug
2007-08-12  3:49 ` Greg KH
2007-08-12  5:50 ` Andrey Borzenkov
2007-08-12  8:16 ` gerald.hotplug
2007-08-12 12:24 ` Kay Sievers
2007-08-12 12:43 ` Andrey Borzenkov
2007-08-12 13:00 ` Kay Sievers
2007-08-12 15:46 ` Gerald V. Livingston II
2007-08-12 16:29 ` Kay Sievers
2007-08-12 16:58 ` Gerald V. Livingston II
2007-08-15 22:16 ` Gerald V. Livingston II

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).