Skip to contentSkip to conversation

Create persistent names for tape devices and medium changers

PATCH New Jamie Wellnitz 1 participant 1 message Feb 5, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Create persistent names for tape devices and medium changers

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.

---
 etc/udev/redhat/50-udev.rules |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
etc/udev/redhat/50-udev.rules +11 -0
index d72cb83..ed6c661 100644
@@ -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"
 
Signature · 11 lines
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&kid0709&bid&3057&dat1642
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel