From: "John Stoffel" Date: Tue, 09 Jun 2009 15:27:15 +0000 Subject: Re: Mapping /dev/*st0* to fixed names using scsi_id Message-Id: <18990.32595.604939.635463@stoffel.org> List-Id: References: <18982.53980.652743.304603@stoffel.org> In-Reply-To: <18982.53980.652743.304603@stoffel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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@vger.kernel.org John> More majordomo info at http://vger.kernel.org/majordomo-info.html