Hi,

I'm having the same problem that other thread in november 2008:
http://sourceforge.net/mailarchive/message.php?msg_id=BBDDF0B7CFFFCE4FB5110F0A37CE60030942EE%40q.leblancnet.us

But I can't find a solution ...

I have a autochanger rule in udev that points /dev/autochanger1 to /dev/sgX

My problem is that this autochanger has 4 drives, and I cannot get
serial number or other attributes which change, and when I reboot I
will have to change bacula config every time.

My lsscsi output (There is a autochanger and a NSR, 2 fc drives and 2
scsi drives):

# lsscsi
[0:0:0:0]    mediumx HP       MSL6000 Series   0520  /dev/sch0
[0:0:0:1]    tape    HP       Ultrium 3-SCSI   G63W  /dev/st2
[0:0:0:2]    tape    HP       Ultrium 3-SCSI   G63W  /dev/st3
[0:0:0:3]    storage HP       NS E1200-320     593d  -
[0:0:1:0]    storage HP       HSV200           5110  -
[0:0:2:0]    storage HP       HSV200           5110  -
[1:0:0:0]    cd/dvd  TEAC     CD-224E          9.9A  /dev/sr0
[3:0:3:0]    tape    HP       Ultrium 3-SCSI   G63W  /dev/st0
[3:0:4:0]    tape    HP       Ultrium 3-SCSI   G54W  /dev/st1

I can't use /dev/tape/by-path, because these devices could change,
this is the ls output:

# ls /dev/tape/by-path/ -l
total 0
lrwxrwxrwx 1 root root  9 oct 26 16:18
pci-0000:03:01.0-fc-0x100000e002239fa8:0x0001000000000000 -> ../../st2
lrwxrwxrwx 1 root root 10 oct 26 16:18
pci-0000:03:01.0-fc-0x100000e002239fa8:0x0001000000000000-nst ->
../../nst2
lrwxrwxrwx 1 root root  9 oct 26 16:18
pci-0000:03:01.0-fc-0x100000e002239fa8:0x0002000000000000 -> ../../st3
lrwxrwxrwx 1 root root 10 oct 26 16:18
pci-0000:03:01.0-fc-0x100000e002239fa8:0x0002000000000000-nst ->
../../nst3
lrwxrwxrwx 1 root root  9 oct 26 16:17 pci-0000:06:01.0-scsi-0:0:3:0
-> ../../st0
lrwxrwxrwx 1 root root 10 oct 26 16:17
pci-0000:06:01.0-scsi-0:0:3:0-nst -> ../../nst0
lrwxrwxrwx 1 root root  9 oct 26 16:18 pci-0000:06:01.0-scsi-0:0:4:0
-> ../../st1
lrwxrwxrwx 1 root root 10 oct 26 16:18
pci-0000:06:01.0-scsi-0:0:4:0-nst -> ../../nst1

03:01 will change (I guess) like 06.01 ..

I don't know how can I generate /dev/tape/by-id, currently (debian
squeeze) only see one device which is the autochanger:
# ls -l /dev/tape/by-id/
total 0
lrwxrwxrwx 1 root root 9 oct 26 16:18 scsi-200900de6064f0000 -> ../../sg3

When I try to guess any difference from st2 and st3 , I don't find
which attribute could I use to generate udev rules:

Here is the diff output from udevadm info --attribute-walk
--path=/sys/class/scsi_tape/st?)

# diff <(udevadm info --attribute-walk
--path=/sys/class/scsi_tape/st2) <(udevadm info --attribute-walk
--path=/sys/class/scsi_tape/st3)
8,9c8,9
<   looking at device
'/devices/pci0000:03/0000:03:01.0/host0/rport-0:0-2/target0:0:0/0:0:0:1/scsi_tape/st2':
<     KERNEL=="st2"
---
>   looking at device 
> '/devices/pci0000:03/0000:03:01.0/host0/rport-0:0-2/target0:0:0/0:0:0:2/scsi_tape/st3':
>     KERNEL=="st3"
18,19c18,19
<   looking at parent device
'/devices/pci0000:03/0000:03:01.0/host0/rport-0:0-2/target0:0:0/0:0:0:1':
<     KERNELS=="0:0:0:1"
---
>   looking at parent device 
> '/devices/pci0000:03/0000:03:01.0/host0/rport-0:0-2/target0:0:0/0:0:0:2':
>     KERNELS=="0:0:0:2"
31,33c31,33
<     ATTRS{iorequest_cnt}=="0xd6beb"
<     ATTRS{iodone_cnt}=="0xd6beb"
<     ATTRS{ioerr_cnt}=="0x3b"
---
>     ATTRS{iorequest_cnt}=="0x1e"
>     ATTRS{iodone_cnt}=="0x1e"
>     ATTRS{ioerr_cnt}=="0x13"

I guess I can't use KERNEL nor KERNELS variables and neither counters.

So, are there something that I can do to get my devices with a
permanents names ?

Thank you very much!

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to