LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2008, 08:20 PM   #1
next2thebay
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
RHEL 5 udev devices tape configuration problems


I am having a difficult time trying to configure persistent binding on fibre channel attached tape devices.

Whenever the server is rebooted the device paths change.

For example:

/dev/nst0 would be bound to a specific FC Tape device with a unique WWN identifier.

however on the next reboot, /dev/nst0 would be bound to a different device. This causes havoc on backup software. Any ideas?

Trying to find any information on udev configuration is very hard. Please help.

Thanks
 
Old 08-11-2008, 06:48 PM   #2
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
what's the output of udevinfo ?

ideally you want something in the first 20 lines (under the device itself rather than a parent), i don't have a tape drive, but i'm playing with a HDD:

Code:
[root@fact dev]# udevinfo -a -p /block/sde
Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/block/sde':
    KERNEL=="sde"
    SUBSYSTEM=="block"
    SYSFS{stat}=="      47       53      800      338        0        0        0        0        0      302      338"
    SYSFS{size}=="104857600"
    SYSFS{removable}=="0"
    SYSFS{range}=="16"
    SYSFS{dev}=="8:64"

  looking at parent device '/devices/pci0000:00/0000:00:04.0/0000:0c:00.0/host5/rport-5:0-0/target5:0:0/5:0:0:2':
    ID=="5:0:0:2"
    BUS=="scsi"
    DRIVER=="sd"
    SYSFS{ioerr_cnt}=="0x1"
    SYSFS{iodone_cnt}=="0x61e"
    SYSFS{iorequest_cnt}=="0x61e"
    SYSFS{iocounterbits}=="32"
    SYSFS{timeout}=="60"
    SYSFS{state}=="running"
    SYSFS{rev}=="5009"
    SYSFS{model}=="OPEN-V          "
    SYSFS{vendor}=="HITACHI "
    SYSFS{scsi_level}=="4"
    SYSFS{type}=="0"
    SYSFS{queue_type}=="none"
    SYSFS{queue_depth}=="8"
    SYSFS{device_blocked}=="0"

  looking at parent device '/devices/pci0000:00/0000:00:04.0/0000:0c:00.0/host5/rport-5:0-0/target5:0:0':
    ID=="target5:0:0"
    BUS==""
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:04.0/0000:0c:00.0/host5/rport-5:0-0':
    ID=="rport-5:0-0"
    BUS==""
    DRIVER==""

  looking at parent device '/devices/pci0000:00/0000:00:04.0/0000:0c:00.0/host5':
    ID=="host5"
    BUS==""
    DRIVER==""
    SYSFS{sfp}==""
    SYSFS{optrom}==""
    SYSFS{fw_dump}==""

  looking at parent device '/devices/pci0000:00/0000:00:04.0/0000:0c:00.0':
    ID=="0000:0c:00.0"
    BUS=="pci"
    DRIVER=="qla2xxx"
    SYSFS{broken_parity_status}=="0"
    SYSFS{enable}=="1"
    SYSFS{modalias}=="pci:v00001077d00002432sv00001077sd00000138bc0Csc04i00"
    SYSFS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f"
    SYSFS{irq}=="98"
    SYSFS{class}=="0x0c0400"
    SYSFS{subsystem_device}=="0x0138"
    SYSFS{subsystem_vendor}=="0x1077"
    SYSFS{device}=="0x2432"
    SYSFS{vendor}=="0x1077"

  looking at parent device '/devices/pci0000:00/0000:00:04.0':
    ID=="0000:00:04.0"
    BUS=="pci"
    DRIVER=="pcieport-driver"
    SYSFS{broken_parity_status}=="0"
    SYSFS{enable}=="1"
    SYSFS{modalias}=="pci:v00008086d000025F8sv00000000sd00000000bc06sc04i00"
    SYSFS{local_cpus}=="00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000f"
    SYSFS{irq}=="201"
    SYSFS{class}=="0x060400"
    SYSFS{subsystem_device}=="0x0000"
    SYSFS{subsystem_vendor}=="0x0000"
    SYSFS{device}=="0x25f8"
    SYSFS{vendor}=="0x8086"

  looking at parent device '/devices/pci0000:00':
    ID=="pci0000:00"
    BUS==""
    DRIVER==""
which isn't helping me so far, but this has some potential:

Code:
[root@fact dev]# udevinfo -q all -n /dev/sde
P: /block/sde
N: sde
S: disk/by-id/scsi-360060e80045a000000005a000000040b
S: disk/by-path/pci-0000:0c:00.0-fc-0x50060e80045a0001:0x0002000000000000
E: ID_VENDOR=HITACHI
E: ID_MODEL=OPEN-V
E: ID_REVISION=5009
E: ID_SERIAL=360060e80045a000000005a000000040b
E: ID_TYPE=disk
E: ID_BUS=scsi
E: ID_PATH=pci-0000:0c:00.0-fc-0x50060e80045a0001:0x0002000000000000
Alas i've not yet decided i know how to put the ID_SERIAL (which is the WWN) to good use. Maybe this sparks something for you seeing as you've not had a reply for a while

chakkerz
 
Old 08-11-2008, 06:56 PM   #3
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: RedHat (RHEL, FC, CentOS), openSuSE, Mac OS X
Posts: 653

Rep: Reputation: 32
there you go:
http://tolecnal.net/2007/04/writing-udev-rules
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing devices from udev Jzarecta Linux - Hardware 4 07-11-2007 08:25 PM
SAN Tape Robot/Library Configuration for RHEL AS 3.0 MensaWater Linux - Hardware 1 06-07-2005 08:34 PM
SAN Tape Robot/Library Configuration for RHEL AS 3.0 MensaWater Linux - Enterprise 0 06-02-2005 10:45 AM
UDEV and Raw devices swissworks Slackware 6 09-14-2004 02:08 PM
udev and 51 sound devices! tamills Linux - Hardware 0 05-15-2004 06:43 PM


All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration