Re: Udev rule for external hard-drive
On Mon, 09 Aug 2010 22:45:32 -0700, Brian Troutwine wrote:
> I'm attempting a rule for my new external hard-drive, but it doesn't
> seem to be taking. For reference, I am using Debian 5.0.5 am following
> the wiki's instructions[1] and am using the kernel developers' guide as
> a reference[2]. My udevinfo output:
>
>> $ udevinfo -a -p /sys/block/sdb/sdb1/ | grep serial
>> ATTRS{serial}=="57442D575839314133303236343538"
>> ATTRS{serial}=="0000:00:1a.7"
Put the full output of the command:
***
udevinfo -a -p /sys/block/sdb/sdb1/
***
And upload the result to pastebin (or any other online service) to avoid
flood the list with tons of data :-)
http://www.pastebin.com
> And the custom rule file 10-local.rules:
>
>> SUBSYSTEM=="block", SUBSYSTEMS=="scsi",
>> ATTRS{serial}=="57442D575839314133303236343538", SYMLINK+="external%n"
Care about this (comes from your [2] link):
"...while it is legal to combine the attributes from the device in
question and a single parent device, you cannot mix-and-match attributes
from multiple parent devices - your rule will not work"
So, SUBSYSTEMS=="scsi" and ATTRS{serial}
=="57442D575839314133303236343538" have to be in the same "parent device"
block.
> After restarting Udev I'm greeted with the following dmesg output:
(...)
>> [138070.338045] sdb: sdb1
>> [138070.376812] sd 10:0:0:0: [sdb] Attached SCSI disk
>
> Clearly I'm doing something wrong. Can someone point me in the right
> direction?
What is your main goal? Just giving the volume an static name? :-?
Greetings,
--
Camaleón
Reply to: