1 |
On Mon, Dec 15, 2008 at 09:16:38PM -0500, Penguin Lover Willie Wong squawked: |
2 |
> I have had this line in my /etc/udev/rules.d/10-local.rules for a |
3 |
> couple years now |
4 |
> |
5 |
> <snip> |
6 |
> BUS=="usb", KERNEL=="sd?[0-9]", SYSFS{serial}=="DEF10BDD77EE", NAME="%k", SYMLINK+="BackUpDrive" |
7 |
> </snip> |
8 |
> |
9 |
> <snip> |
10 |
> looking at device '/bus/usb/devices/1-4:1.0/host24/target24:0:0/24:0:0:0': |
11 |
> KERNEL=="24:0:0:0" |
12 |
> SUBSYSTEM=="" |
13 |
> DRIVER=="sd" |
14 |
... |
15 |
|
16 |
> looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb1/1-4': |
17 |
> KERNELS=="1-4" |
18 |
> SUBSYSTEMS=="" |
19 |
> DRIVERS=="usb" |
20 |
> ATTRS{configuration}=="" |
21 |
> ATTRS{serial}=="DEF10BDD77EE" |
22 |
> </snip> |
23 |
> |
24 |
|
25 |
Okay, I think I have a bit more idea. It turns out that for some |
26 |
reason the usb device is not listed as a parent device of the block |
27 |
device sda1. This is what happens: |
28 |
|
29 |
|
30 |
<snip> |
31 |
sep 24:0:0:0 # udevinfo -p /sys/bus/usb/devices/1-4\:1.0/host25/target25\:0\:0/2 |
32 |
5\:0\:0\:0/block\:sda/sda1/ -a |
33 |
|
34 |
Udevinfo starts with the device specified by the devpath and then |
35 |
walks up the chain of parent devices. It prints for every device |
36 |
found, all possible attributes in the udev rules key format. |
37 |
A rule to match, can be composed by the attributes of the device |
38 |
and the attributes from one single parent device. |
39 |
|
40 |
looking at device '/bus/usb/devices/1-4:1.0/host25/target25:0:0/25:0:0:0/block:sda/sda1': |
41 |
KERNEL=="sda1" |
42 |
SUBSYSTEM=="" |
43 |
DRIVER=="" |
44 |
ATTR{stat}==" 30973 192214 28182 225432" |
45 |
ATTR{size}=="625137282" |
46 |
ATTR{start}=="63" |
47 |
</snip> |
48 |
|
49 |
That's the end of the output. If I execute udevinfo against |
50 |
...target25:0:0/25:0:0:0 |
51 |
then all the parent devices are printed. Is there any way of making |
52 |
udev recognize that the sda1 device is a child of the actual hardware? |
53 |
|
54 |
Thanks, |
55 |
|
56 |
Willie |
57 |
|
58 |
-- |
59 |
Ferrets live by a code tried and true |
60 |
From which humans can benefit, too. |
61 |
Teach your sons and daughters |
62 |
To do unto otters, |
63 |
As otters would do unto you. |
64 |
Sortir en Pantoufles: up 739 days, 1:16 |