Gentoo Archives: gentoo-user

From: Dale <rdalek1967@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] help with Persistent hard disk device names with udev
Date: Tue, 31 Aug 2010 13:52:55
Message-Id: 4C7D090F.70205@gmail.com
In Reply to: Re: [gentoo-user] help with Persistent hard disk device names with udev by Alex Schuster
1 Alex Schuster wrote:
2 > Pau Peris writes:
3 >
4 >
5 >> Hi, after following your tips the code gets like the following one:
6 >>
7 >> SUBSYSTEM=="block", ATTR{serial}=="VNVB05G2RKTRZH", NAME="hda"
8 >> SUBSYSTEM=="block", ATTR{serial}=="9QK0T4WM", NAME="sda"
9 >> SUBSYSTEM=="block", ATTR{serial}=="3QD0X58D", NAME="sdb"
10 >> SUBSYSTEM=="block", ATTR{serial}=="9QK0RS9G", NAME="sdc"
11 >> SUBSYSTEM=="block", ATTR{serial}="9VP0SBVN", NAME="sdc"
12 >>
13 >> KERNEL=="hd*", SUBSYSTEM=="block", ATTR{serial}=="VNVB05G2RKTRZH",
14 >> NAME="hda%n" KERNEL=="sd*", SUBSYSTEM=="block",
15 >> ATTR{serial}=="9QK0T4WM", NAME="sda%n" KERNEL=="sd*",
16 >> SUBSYSTEM=="block", ATTR{serial}=="3QD0X58D", NAME="sdb%n"
17 >> KERNEL=="sd*", SUBSYSTEM=="block", ATTR{serial}=="9QK0RS9G",
18 >> NAME="sdc%n" KERNEL=="sd*", SUBSYSTEM=="block",
19 >> ATTR{serial}=="9VP0SBVN", NAME="sdc%n" That's not working, when i plug
20 >> more devices they get named without taking care of the rules above. Do
21 >> someone know why? thanks. i would like to be able to name devies using
22 >> its serial number. Thanks in advanced
23 >>
24 > Could it be that the sd* notation is somewhere hardwired in UDEV? I'd try
25 > to give the devices different names, like NAME="myhda", and so on.
26 >
27 > Just guessing,
28 >
29 > Wonko
30 >
31 >
32
33 This is a shot in the dark but just in case. What did you name the
34 rules file? Is it possible that it is reading your file then reading
35 another file udev generated and the last one it reads is the one that
36 sets the names? I would look to see if there is another file in the
37 rules.d directory that sets the naming and then see what udev reads last.
38
39 Again, shot in the dark and this may not apply.
40
41 Dale
42
43 :-) :-)

Replies

Subject Author
Re: [gentoo-user] help with Persistent hard disk device names with udev Pau Peris <sibok1981@×××××.com>