Gentoo Archives: gentoo-user

From: Willie Wong <wwong@×××××××××.EDU>
To: gentoo-user@l.g.o
Subject: [gentoo-user] UDEV help
Date: Tue, 16 Dec 2008 02:16:07
Message-Id: 20081216021638.GA15065@princeton.edu
1 Hi list:
2
3 I have had this line in my /etc/udev/rules.d/10-local.rules for a
4 couple years now
5
6 <snip>
7 BUS=="usb", KERNEL=="sd?[0-9]", SYSFS{serial}=="DEF10BDD77EE", NAME="%k", SYMLINK+="BackUpDrive"
8 </snip>
9
10 which matched my external USB harddrive enclosure and name it
11 /dev/BackUpDrive for convenience. I haven't plugged in the drive
12 for a few months now, and udev has been updated from 115-r1 to
13 124-r1 in the meantime, and the rule doesn't work any more.
14
15 I think this may have to do with the fact that udevinfo now gives
16 me
17
18 <snip>
19 looking at device '/bus/usb/devices/1-4:1.0/host24/target24:0:0/24:0:0:0':
20 KERNEL=="24:0:0:0"
21 SUBSYSTEM==""
22 DRIVER=="sd"
23 ATTR{ioerr_cnt}=="0x1"
24 ATTR{iodone_cnt}=="0x1f"
25 ATTR{iorequest_cnt}=="0x1f"
26 ATTR{iocounterbits}=="32"
27 ATTR{timeout}=="60"
28 ATTR{state}=="running"
29 ATTR{rev}=="0000"
30 ATTR{model}=="0A "
31 ATTR{vendor}=="ST332062"
32 ATTR{scsi_level}=="3"
33 ATTR{type}=="0"
34 ATTR{queue_type}=="none"
35 ATTR{queue_depth}=="1"
36 ATTR{device_blocked}=="0"
37 ATTR{max_sectors}=="240"
38
39 looking at parent device '/devices/pci0000:00/0000:00:1d.7/usb1/1-4':
40 KERNELS=="1-4"
41 SUBSYSTEMS==""
42 DRIVERS=="usb"
43 ATTRS{configuration}==""
44 ATTRS{serial}=="DEF10BDD77EE"
45 ATTRS{product}=="USB2.0 Storage Device"
46 ATTRS{manufacturer}=="Cypress Semiconductor"
47 ATTRS{maxchild}=="0"
48 ATTRS{version}==" 2.00"
49 ATTRS{devnum}=="40"
50 ATTRS{speed}=="480"
51 ATTRS{bMaxPacketSize0}=="64"
52 ATTRS{bNumConfigurations}=="1"
53 ATTRS{bDeviceProtocol}=="00"
54 ATTRS{bDeviceSubClass}=="00"
55 ATTRS{bDeviceClass}=="00"
56 ATTRS{bcdDevice}=="0001"
57 ATTRS{idProduct}=="6830"
58 ATTRS{idVendor}=="04b4"
59 ATTRS{bMaxPower}==" 0mA"
60 ATTRS{bmAttributes}=="c0"
61 ATTRS{bConfigurationValue}=="1"
62 ATTRS{bNumInterfaces}==" 1"
63 </snip>
64
65 Here's the thing, I am pretty sure that the serial number entry
66 DEF10BDD77EE refers to the drive, and is/was a much better way of
67 matching the actual drive (it is more unique than any of the other
68 bits of information in the udevinfo listing for the sd device), and
69 I would prefer to still match via the serial number in the udev
70 rules.
71
72 Any suggestions on how I can get my desired behaviour or on how I
73 can debug this?
74
75 Thanks,
76
77 Willie
78 --
79 "`You'd better be prepared for the jump into hyperspace.
80 It's unpleasently like being drunk.'
81 `What's so unpleasent about being drunk?'
82 `You ask a glass of water.'"
83
84 - Arthur getting ready for his first jump into hyperspace.
85 Sortir en Pantoufles: up 739 days, 46 min

Replies

Subject Author
Re: [gentoo-user] UDEV help Willie Wong <wwong@×××××××××.EDU>
Re: [gentoo-user] UDEV help Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] UDEV help "Heinrichs