Unix Technical Forum

udev - missing scsi tape device - the sledgehammer is next

This is a discussion on udev - missing scsi tape device - the sledgehammer is next within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> [Slackware 10.0.0, kernel 2.6.14.5] The SCSI Generic driver is loaded, the system sees the tape drive AND the robotic ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 02:12 PM
rtcg
 
Posts: n/a
Default udev - missing scsi tape device - the sledgehammer is next

[Slackware 10.0.0, kernel 2.6.14.5]

The SCSI Generic driver is loaded, the system sees the tape drive AND
the robotic arm (lun 1), and the tape drive is right there under
/dev/sg10 with the changer being /dev/sg11. The problem is that those
device numbers won't always be the same depending on how many of the
hot pull SCSI drives are in the bays when the system powers up. With
UDEV creating these devices on the fly, I need a way to have a stable
/dev/$name created so that I don't have to hit a moving target.

While putting together documentation and proof of how all of my
searches for help failed, I found
http://www.reactivated.net/writing_udev_rules.html . I can't say
enough good things about this documentation! The guy uses EXAMPLES!!!
I am ALMOST in heaven --- almost because I still seem to be stuck.

To identify my devices, I started in /var/log/messages with this...

---
Jan 19 12:27:36 backupsvr kernel: [ 330.856476] scsi4 : Adaptec
AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
Jan 19 12:27:51 backupsvr udev[4135]: removing device node
'/dev/target4:0:0'
Jan 19 12:27:52 backupsvr kernel: [ 347.526389] Vendor: ARCHIVE
Model: Python 06241-XXX Rev: 9100
Jan 19 12:27:52 backupsvr kernel: [ 347.526401] Type:
Sequential-Access ANSI SCSI revision:03
Jan 19 12:27:52 backupsvr kernel: [ 347.526427] target4:0:6:
Beginning Domain Validation
Jan 19 12:27:52 backupsvr kernel: [ 347.532654] target4:0:6: wide
asynchronous.
Jan 19 12:27:52 backupsvr kernel: [ 347.554691] target4:0:6: Domain
Validation skipping write tests
Jan 19 12:27:52 backupsvr kernel: [ 347.555884] target4:0:6: FAST-20
WIDE SCSI 40.0 MB/s ST (50 ns, offset 32)
Jan 19 12:27:52 backupsvr scsi.agent[4220]: how to add device type= at
/devices/pci0000:00/0000:00:0e.0/host4/target4:0:6/4:0:6:0 ??
Jan 19 12:27:52 backupsvr kernel: [ 347.560632] target4:0:6: Ending
Domain Validation
Jan 19 12:27:52 backupsvr kernel: [ 347.595306] Attached scsi generic
sg10 at scsi4, channel 0, id 6, lun 0, type 1
Jan 19 12:27:52 backupsvr udev[4240]: creating device node '/dev/sg10'
Jan 19 12:27:52 backupsvr scsi.agent[4250]: how to add device type= at
/devices/pci0000:00/0000:00:0e.0/host4/target4:0:6/4:0:6:1 ??
Jan 19 12:27:52 backupsvr kernel: [ 347.614455] Vendor: ARCHIVE
Model: Python 06241-XXX Rev: 9100
Jan 19 12:27:52 backupsvr kernel: [ 347.614466] Type: Medium
Changer ANSI SCSI revision:03
Jan 19 12:27:52 backupsvr kernel: [ 347.614479] target4:0:6: FAST-20
WIDE SCSI 40.0 MB/s ST (50 ns, offset 32)
Jan 19 12:27:52 backupsvr kernel: [ 347.649329] Attached scsi generic
sg11 at scsi4, channel 0, id 6, lun 1, type 8
Jan 19 12:27:53 backupsvr udev[4270]: creating device node '/dev/sg11'
----

using devices/pci0000:00/0000:00:0e.0/host4/target4:0:6/4:0:6:0 and
devices/pci0000:00/0000:00:0e.0/host4/target4:0:6/4:0:6:1 as a starting
point, I run udevinfo and get...

[udevinfo results]
# udevinfo -a -p
/sys/devices/pci0000:00/0000:00:0e.0/host4/target4:0:6/4:0:6:0

looking at class device
'/sys/devices/pci0000:00/0000:00:0e.0/host4/target4:0:6/4:0:6:0':
SUBSYSTEM=="unknown"
SYSFS{device_blocked}=="0"
SYSFS{iocounterbits}=="32"
SYSFS{iodone_cnt}=="0x11"
SYSFS{ioerr_cnt}=="0x5"
SYSFS{iorequest_cnt}=="0x11"
SYSFS{model}=="Python 06241-XXX"
SYSFS{queue_depth}=="2"
SYSFS{queue_type}=="none"
SYSFS{rev}=="9100"
SYSFS{scsi_level}=="4"
SYSFS{state}=="running"
SYSFS{timeout}=="0"
SYSFS{type}=="1"
SYSFS{vendor}=="ARCHIVE "
[/ results]

I think I was able to properly identify both devices this way and I
wound up creating two rules to handle the drive. I changed the "type"
where appropriate. They didn't seem to work though.

[udev.rules insert]
BUS="scsi", KERNEL="sg[0-9]*",SYSFS{model}="Python 06241-XXX",
SYSFS{type}="1", NAME="%k", SYMLINK="tapedrive"

BUS="scsi", KERNEL="sg[0-9]*",SYSFS{model}="Python 06241-XXX",
SYSFS{type}="8", NAME="%k", SYMLINK="tapearm"
[/insert]

When I try to diagnose my udev rule, I try to query the device by the
name assigned to it, /dev/sg10 but I get....

[query device]
# udevinfo -q all -n /dev/sg10
device not found in database
#
[/query]

Original udev package - udev-026

I tried grabbing the latest udev souce and SlackBuild'ing my own
package (using ver 081 plus the config files from both .026 and .062).
I had no luck PLUS somehow I killed my LVM support to the point where
my LVM volumes were unavailable.....

Finally I updated to udev-062 from slackware-current which got my LVM
working but still nojoy on the tape device.

So..now I don't know where I need to go next. I've hit the perverbial
brick wall due to my inability to interpret/understand what udev is
doing and why it's missing my scsi device. Any insights??

Final note: I just did a 'modprobe st' and udev did create /dev/..st0,
st0a, st0l and st0m So I'm thinking that I'm heading in the right
direction, but udevinfo returns a "device not found in database" when I
run udevinfo -q all -n /dev/st0$whatever'

What do I need to google now?

--
rtcg

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 02:12 PM
rtcg
 
Posts: n/a
Default Re: udev - missing scsi tape device - the sledgehammer is next

You're almost there, rtcg. You loaded the scsi-tape driver, why don't
you go load the scsi-changer module. You did compile those, right?

Try uncommenting /sbin/moprobe st in /etc/rc.d/rc.modules and add in
'/sbin/modprobe ch' and see if that doesn't get you further along.

--
rtcg

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:58 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com