Re: Mapping /dev/*st0* to fixed names using scsi_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



John> I had similar issues with my collection of scsi tape drives, not
John> all of which may be powered up.  the --page=0x80 does the trick.

Interesting.  I'll try this out today if I get a chance.  

John> my kernel is compiled with the SG version4 block device option enabled.

I think mine is too. 

John> this is my 60-persistent-storage-tape.rules, hope it helps


John> ACTION!="add|change", GOTO="persistent_storage_tape_end"

John> # type 8 devices are "Medium Changers"
John> KERNEL=="sg[0-9]*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", 
John> IMPORT{program}="scsi_id --sg-version=3 --page=0x80 --export 
John> --whitelisted -d $tempnode", 
John> SYMLINK+="tape/by-id/$env{ID_VENDOR}-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}"

John> SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end"

John> KERNEL=="st*[0-9]|nst*[0-9]", ATTRS{ieee1394_id}=="?*", 
John> ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
John> KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", 
John> IMPORT{program}="usb_id --export %p"

John> KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", 
John> KERNELS=="[0-9]*:*[0-9]", ENV{BSG_DEV}="$root/bsg/$id"
John> KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", 
John> WAIT_FOR="$env{BSG_DEV}", IMPORT="scsi_id --page=0x80 --whitelisted 
John> --export --device=$env{BSG_DEV}", ENV{ID_BUS}="scsi"

John> KERNEL=="st*[0-9]",  ENV{ID_SERIAL}=="?*", 
John> SYMLINK+="tape/by-id/$env{ID_VENDOR}-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}"
John> KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", 
John> SYMLINK+="tape/by-id/$env{ID_VENDOR}-$env{ID_MODEL}-$env{ID_SERIAL_SHORT}-nst"

John> # by-path (shortest physical path)
John> KERNEL=="st*[0-9]", IMPORT{program}="path_id %p"
John> KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", 
John> SYMLINK+="tape/by-path/$env{ID_PATH}"

John> LABEL="persistent_storage_tape_end"

John> --
John> To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
John> the body of a message to majordomo@xxxxxxxxxxxxxxx
John> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux