Skip to contentSkip to conversation

rule for scsi tape changers? [u]

DISCUSSION Andreas Jellinghaus [c] 3 participants 3 messages Aug 28, 2007

lore
Share & tools
lore
#0 lore raw

before re-inventing the wheel: does anyone have a rule for scsi device changers? the typical name would be /dev/changer and the devices are usualy sg* devices. kernel dmesg tells me:
TID 513 Vendor: HP M Device: MSL6000 Seri Rev: 0507
Vendor: HP Model: MSL6000 Series Rev: 0507
Type: Medium Changer ANSI SCSI revision: 02
0:0:0:0: Attached scsi generic sg0 type 8

udevinfo:

    BUS="scsi"
    ID="0:0:0:0"
    DRIVER="unknown"
    SYSFS{device_blocked}="0"
    SYSFS{iocounterbits}="32"
    SYSFS{iodone_cnt}="0x9f9"
    SYSFS{ioerr_cnt}="0xd"
    SYSFS{iorequest_cnt}="0x9f9"
    SYSFS{model}="MSL6000 Series  "
    SYSFS{queue_depth}="1"
    SYSFS{queue_type}="none"
    SYSFS{rev}="0507"
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="0"
    SYSFS{type}="8"
    SYSFS{vendor}="HP      "

I see the rules on my ubuntu systems use ENV{ID_CDROM} and friends for cdrom devices. what creates these? is there a simialr ID_CHANGER information?

Thanks, Andreas

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw

Hi Andreas,

Quoted 27 lines · Andreas Jellinghaus [c]

before re-inventing the wheel: does anyone have a rule for scsi device changers? the typical name would be /dev/changer and the devices are usualy sg* devices. kernel dmesg tells me:
TID 513 Vendor: HP M Device: MSL6000 Seri Rev: 0507
Vendor: HP Model: MSL6000 Series Rev: 0507
Type: Medium Changer ANSI SCSI revision: 02
0:0:0:0: Attached scsi generic sg0 type 8

udevinfo:

    BUS="scsi"
    ID="0:0:0:0"
    DRIVER="unknown"
    SYSFS{device_blocked}="0"
    SYSFS{iocounterbits}="32"
    SYSFS{iodone_cnt}="0x9f9"
    SYSFS{ioerr_cnt}="0xd"
    SYSFS{iorequest_cnt}="0x9f9"
    SYSFS{model}="MSL6000 Series  "
    SYSFS{queue_depth}="1"
    SYSFS{queue_type}="none"
    SYSFS{rev}="0507"
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="0"
    SYSFS{type}="8"
    SYSFS{vendor}="HP      "
Quoted 2 lines

I see the rules on my ubuntu systems use ENV{ID_CDROM} and friends for cdrom devices. what creates these? is there a simialr ID_CHANGER information?

This rule, from the current udev git tree (it's been there for a while, though):

# type 8 devices are "Medium Changers"
KERNEL="sg*", SUBSYSTEMS="scsi", ATTRS{type}="8", IMPORT{program}="scsi_id --export --whitelisted --fallback-to-sysfs -s %p -d $tempnode", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"

is intended to create a symlink in /dev/tape/by-id for changer devices. It's in etc/udev/rules.d/60-persistent-storage.rules

Quoted 2 lines

Thanks, Andreas

Thanks,
Jamie

Quoted 11 lines

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Andreas Jellinghaus [c]
Quoted 27 lines · Andreas Jellinghaus [c]

before re-inventing the wheel: does anyone have a rule for scsi device changers? the typical name would be /dev/changer and the devices are usualy sg* devices. kernel dmesg tells me:
TID 513 Vendor: HP M Device: MSL6000 Seri Rev: 0507
Vendor: HP Model: MSL6000 Series Rev: 0507
Type: Medium Changer ANSI SCSI revision: 02
0:0:0:0: Attached scsi generic sg0 type 8

udevinfo:

    BUS="scsi"
    ID="0:0:0:0"
    DRIVER="unknown"
    SYSFS{device_blocked}="0"
    SYSFS{iocounterbits}="32"
    SYSFS{iodone_cnt}="0x9f9"
    SYSFS{ioerr_cnt}="0xd"
    SYSFS{iorequest_cnt}="0x9f9"
    SYSFS{model}="MSL6000 Series  "
    SYSFS{queue_depth}="1"
    SYSFS{queue_type}="none"
    SYSFS{rev}="0507"
    SYSFS{scsi_level}="3"
    SYSFS{state}="running"
    SYSFS{timeout}="0"
    SYSFS{type}="8"
    SYSFS{vendor}="HP      "
Quoted 2 lines

I see the rules on my ubuntu systems use ENV{ID_CDROM} and friends for cdrom devices. what creates these? is there a simialr ID_CHANGER information?

This identifies a SCSI "changer":
ATTRS{type}="8"
according to scsi.h:
#define TYPE_MEDIUM_CHANGER 0x08

Do you need more than this?

Kay

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel