* [PATCH] Create persistent names for tape devices and medium changers
@ 2007-02-05 23:18 Jamie Wellnitz
0 siblings, 0 replies; only message in thread
From: Jamie Wellnitz @ 2007-02-05 23:18 UTC (permalink / raw)
To: linux-hotplug
This adds rules to redhat/50-udev.rules to call scsi_id for a
persistent names (symlinks) for tapes and medium changers (tape
robots). The symlinks live under /dev/tapes/by-id.
Signed-off-by: Jamie Wellnitz <Jamie.Wellnitz@emulex.com>
---
etc/udev/redhat/50-udev.rules | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/etc/udev/redhat/50-udev.rules b/etc/udev/redhat/50-udev.rules
index d72cb83..ed6c661 100644
--- a/etc/udev/redhat/50-udev.rules
+++ b/etc/udev/redhat/50-udev.rules
@@ -109,6 +109,17 @@ KERNEL="nst*", GROUP="disk", MODE="0660"
KERNEL="osst*", GROUP="disk", MODE="0660"
KERNEL="nosst*", GROUP="disk", MODE="0660"
+ACTION!="add", GOTO="persistent_tape_end"
+
+KERNEL="nst[0-9]*", BUS="scsi", ENV{ID_SERIAL}="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
+KERNEL="nst[0-9]*", BUS="scsi", ENV{ID_SERIAL}="?*", SYMLINK+="tapes/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
+# type 8 devices are "Medium Changers"
+KERNEL="sg*", BUS="scsi", SYSFS{type}="8", ENV{ID_SERIAL}="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
+KERNEL="sg*", BUS="scsi", SYSFS{type}="8", ENV{ID_SERIAL}="?*", SYMLINK+="tapes/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
+
+LABEL="persistent_tape_end"
+
# diskonkey devices
KERNEL="diskonkey*", GROUP="disk", MODE="0640"
--
1.5.0.rc3.39.gec804
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x120709&bid&3057&dat\x121642
_______________________________________________
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 related [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-05 23:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-05 23:18 [PATCH] Create persistent names for tape devices and medium changers Jamie Wellnitz
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).