[opensuse] SLES11 / udev rules / tape media changer
Dear all, at our SLES11 server there is an iscsi tape roboter from OVERLAND attached. From this great list we learnt to use udev rules in order to fix the device name for the media changer /dev/sgN where N is altering after each reboot. Here is the udevinfo output of our tape changer: #udevinfo -a -p $(udevinfo -q path -n /dev/sg5) looking at device '/devices/platform/host4/session1/target4:0:0/4:0:0:2/scsi_generic/sg5': KERNEL=="sg5" SUBSYSTEM=="scsi_generic" DRIVER=="" looking at parent device '/devices/platform/host4/session1/target4:0:0/4:0:0:2': KERNELS=="4:0:0:2" SUBSYSTEMS=="scsi" DRIVERS=="" ATTRS{device_blocked}=="0" ATTRS{type}=="8" ATTRS{scsi_level}=="6" ATTRS{vendor}=="OVERLAND" ATTRS{model}=="NEO Series " ATTRS{rev}=="0510" ATTRS{tgps}=="1" ATTRS{state}=="running" ATTRS{timeout}=="0" ATTRS{iocounterbits}=="32" ATTRS{iorequest_cnt}=="0xe" ATTRS{iodone_cnt}=="0xe" ATTRS{ioerr_cnt}=="0x3" ATTRS{modalias}=="scsi:t-0x08" ATTRS{evt_media_change}=="0" ATTRS{queue_depth}=="32" ATTRS{queue_type}=="none" Therefore we built a new rule called 100-local.rules in /etc/udev/rules.d with this line: KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{rev}=="0510", SYMLINK+="loader0" After running /etc/init.d/boot.udev restart we would expect to see /dev/loader0. But it does'nt exist, why? THX for any hint advice, Rainer This email (including any attachments) may contain confidential and/or privileged information or information otherwise protected from disclosure. If you are not the intended recipient, please notify the sender immediately, do not copy this message or any attachments and do not use it for any purpose or disclose its content to any person, but delete this message and any attachments from your system. Astrium disclaims any and all liability if this email transmission was virus corrupted, altered or falsified. --------------------------------------------------------- Astrium GmbH Vorsitzender des Aufsichtsrates: Thomas Mueller - Geschaeftsfuehrung: Evert Dudok (Vorsitzender), Dr. Reinhold Lutz, Guenter Stamerjohanns, Josef Stukenborg Sitz der Gesellschaft: Muenchen - Registergericht: Amtsgericht Muenchen, HRB Nr. 107 647 Weitere Informationen ueber EADS Astrium @ http://www.astrium.eads.net/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi Rainer, On Thu, 01 Oct 2009, 12:22:44 +0200, Rainer Blaes wrote:
Dear all, at our SLES11 server there is an iscsi tape roboter from OVERLAND attached. From this great list we learnt to use udev rules in order to fix the device name for the media changer /dev/sgN where N is altering after each reboot. Here is the udevinfo output of our tape changer:
#udevinfo -a -p $(udevinfo -q path -n /dev/sg5)
looking at device '/devices/platform/host4/session1/target4:0:0/4:0:0:2/scsi_generic/sg5': KERNEL=="sg5" SUBSYSTEM=="scsi_generic" DRIVER==""
looking at parent device '/devices/platform/host4/session1/target4:0:0/4:0:0:2': KERNELS=="4:0:0:2" SUBSYSTEMS=="scsi" DRIVERS=="" ATTRS{device_blocked}=="0" ATTRS{type}=="8" ATTRS{scsi_level}=="6" ATTRS{vendor}=="OVERLAND" ATTRS{model}=="NEO Series " ATTRS{rev}=="0510" ATTRS{tgps}=="1" ATTRS{state}=="running" ATTRS{timeout}=="0" ATTRS{iocounterbits}=="32" ATTRS{iorequest_cnt}=="0xe" ATTRS{iodone_cnt}=="0xe" ATTRS{ioerr_cnt}=="0x3" ATTRS{modalias}=="scsi:t-0x08" ATTRS{evt_media_change}=="0" ATTRS{queue_depth}=="32" ATTRS{queue_type}=="none"
Therefore we built a new rule called 100-local.rules in /etc/udev/rules.d with this line:
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{rev}=="0510", SYMLINK+="loader0"
After running /etc/init.d/boot.udev restart we would expect to see /dev/loader0. But it does'nt exist, why?
Because no new events have been generated which would result in the execution of your rule. In order to get what you want you should run "/etc/init.d/boot.udev force-reload", which includes the step to trigger all events for the devices found in your system.
THX for any hint advice, Rainer
HTH, cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Once again Hi Rainer, On Thu, 01 Oct 2009, 12:41:00 +0200, Manfred Hollstein wrote:
[...] On Thu, 01 Oct 2009, 12:22:44 +0200, Rainer Blaes wrote:
Dear all, at our SLES11 server there is an iscsi tape roboter from OVERLAND attached. From this great list we learnt to use udev rules in order to fix the device name for the media changer /dev/sgN where N is altering after each reboot. Here is the udevinfo output of our tape changer:
#udevinfo -a -p $(udevinfo -q path -n /dev/sg5)
looking at device '/devices/platform/host4/session1/target4:0:0/4:0:0:2/scsi_generic/sg5': KERNEL=="sg5" SUBSYSTEM=="scsi_generic" DRIVER==""
looking at parent device '/devices/platform/host4/session1/target4:0:0/4:0:0:2': KERNELS=="4:0:0:2" SUBSYSTEMS=="scsi" DRIVERS=="" ATTRS{device_blocked}=="0" ATTRS{type}=="8" ATTRS{scsi_level}=="6" ATTRS{vendor}=="OVERLAND" ATTRS{model}=="NEO Series " ATTRS{rev}=="0510" ATTRS{tgps}=="1" ATTRS{state}=="running" ATTRS{timeout}=="0" ATTRS{iocounterbits}=="32" ATTRS{iorequest_cnt}=="0xe" ATTRS{iodone_cnt}=="0xe" ATTRS{ioerr_cnt}=="0x3" ATTRS{modalias}=="scsi:t-0x08" ATTRS{evt_media_change}=="0" ATTRS{queue_depth}=="32" ATTRS{queue_type}=="none"
Therefore we built a new rule called 100-local.rules in /etc/udev/rules.d with this line:
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{rev}=="0510", SYMLINK+="loader0"
After running /etc/init.d/boot.udev restart we would expect to see /dev/loader0. But it does'nt exist, why?
Because no new events have been generated which would result in the execution of your rule. In order to get what you want you should run "/etc/init.d/boot.udev force-reload", which includes the step to trigger all events for the devices found in your system.
Also, your rule should look like this: KERNEL=="sg*", SUBSYSTEM=="scsi_generic", ATTRS{../rev}=="0510", SYMLINK+="loader0" HTH, cheers. l8er manfred -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Rainer Blaes (Rainer.Blaes@astrium.eads.net) [20091001 12:24]:
at our SLES11 server there is an iscsi tape roboter from OVERLAND attached. From this great list we learnt to use udev rules in order to fix the device name for the media changer /dev/sgN where N is altering after each reboot.
And I already told you to use the /dev/stN devices to send commands to the loader as they will accept them as well as the sgN ones. These stN device names are already made persistent via udev rules so you don't need to create your own. cheers Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Manfred Hollstein
-
Philipp Thomas
-
Rainer Blaes