* Failed to Create Symlinks ...
@ 2009-11-28 22:52 Chris Dellin
2009-11-29 19:04 ` Kay Sievers
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: Chris Dellin @ 2009-11-28 22:52 UTC (permalink / raw)
To: linux-hotplug
Hey all,
I'm having some trouble recently with my installation of udev. I
expect it to create symlinks for a few devices, but no symlinks are
created. For example:
udev should create a symlink, as per the rule below:
$ grep agpgart /etc/udev/rules.d/50-udev.rules
KERNEL="agpgart", NAME="misc/%k", SYMLINK+="%k"
However, on boot, no symlink exists (although the /dev/misc/agpgart
device is properly created).
Once booted, the symlink does exist in the udev database:
# udevadm info --export-db | grep -A 8 'P: /devices/virtual/misc/agpgart'
P: /devices/virtual/misc/agpgart
N: misc/agpgart
S: agpgart
E: UDEV_LOG=3
E: DEVPATH=/devices/virtual/misc/agpgart
E: MAJOR\x10
E: MINOR\x175
E: DEVNAME=/dev/misc/agpgart
E: DEVLINKS=/dev/agpgart
I don't quite know how to interpret the results from udevtest, but the
results are here:
http://dellin.net/static/temp/udevtest_output.txt
A few other notes:
- The system is running a recent copy of Gentoo Linux.
- This started happening when I upgraded my kernel from 2.6.29.5 to 2.6.31.6.
- The /dev/video0 symlink has the same problem; it should be linked
to /dev/v4l/video0, which is created correctly.
Any ideas?
- Chris
Christopher Dellin
cdellin@gmail.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Failed to Create Symlinks ...
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
@ 2009-11-29 19:04 ` Kay Sievers
2009-11-29 19:15 ` Matthias Schwarzott
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2009-11-29 19:04 UTC (permalink / raw)
To: linux-hotplug
On Sat, Nov 28, 2009 at 23:52, Chris Dellin <cdellin@gmail.com> wrote:
> I'm having some trouble recently with my installation of udev. I
> expect it to create symlinks for a few devices, but no symlinks are
> created. For example:
>
> udev should create a symlink, as per the rule below:
> $ grep agpgart /etc/udev/rules.d/50-udev.rules
> KERNEL="agpgart", NAME="misc/%k", SYMLINK+="%k"
>
> However, on boot, no symlink exists (although the /dev/misc/agpgart
> device is properly created).
>
> Once booted, the symlink does exist in the udev database:
> # udevadm info --export-db | grep -A 8 'P: /devices/virtual/misc/agpgart'
> P: /devices/virtual/misc/agpgart
> N: misc/agpgart
> S: agpgart
> E: UDEV_LOG=3
> E: DEVPATH=/devices/virtual/misc/agpgart
> E: MAJOR\x10
> E: MINOR\x175
> E: DEVNAME=/dev/misc/agpgart
> E: DEVLINKS=/dev/agpgart
>
> I don't quite know how to interpret the results from udevtest, but the
> results are here:
> http://dellin.net/static/temp/udevtest_output.txt
>
> A few other notes:
> - The system is running a recent copy of Gentoo Linux.
> - This started happening when I upgraded my kernel from 2.6.29.5 to 2.6.31.6.
> - The /dev/video0 symlink has the same problem; it should be linked
> to /dev/v4l/video0, which is created correctly.
>
> Any ideas?
You should not swap kernel node names with symlink names. The primary
name in /dev should always match the name in /sys. In general, on
recent kernels, almost all rules with NAME= should be removed and the
kernel-provided names not be overwritten by userspace config, and only
symlinks (which do no clash with kernel names) added.
Kay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Failed to Create Symlinks ...
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
2009-11-29 19:04 ` Kay Sievers
@ 2009-11-29 19:15 ` Matthias Schwarzott
2009-11-29 19:20 ` Kay Sievers
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Matthias Schwarzott @ 2009-11-29 19:15 UTC (permalink / raw)
To: linux-hotplug
On Sonntag, 29. November 2009, Kay Sievers wrote:
> On Sat, Nov 28, 2009 at 23:52, Chris Dellin <cdellin@gmail.com> wrote:
> > I'm having some trouble recently with my installation of udev. I
> > expect it to create symlinks for a few devices, but no symlinks are
> > created. For example:
> >
> > udev should create a symlink, as per the rule below:
> > $ grep agpgart /etc/udev/rules.d/50-udev.rules
> > KERNEL="agpgart", NAME="misc/%k", SYMLINK+="%k"
> >
> > However, on boot, no symlink exists (although the /dev/misc/agpgart
> > device is properly created).
> >
> > Once booted, the symlink does exist in the udev database:
> > # udevadm info --export-db | grep -A 8 'P: /devices/virtual/misc/agpgart'
> > P: /devices/virtual/misc/agpgart
> > N: misc/agpgart
> > S: agpgart
> > E: UDEV_LOG=3
> > E: DEVPATH=/devices/virtual/misc/agpgart
> > E: MAJOR\x10
> > E: MINOR\x175
> > E: DEVNAME=/dev/misc/agpgart
> > E: DEVLINKS=/dev/agpgart
> >
> > I don't quite know how to interpret the results from udevtest, but the
> > results are here:
> > http://dellin.net/static/temp/udevtest_output.txt
> >
> > A few other notes:
> > - The system is running a recent copy of Gentoo Linux.
> > - This started happening when I upgraded my kernel from 2.6.29.5 to
> > 2.6.31.6. - The /dev/video0 symlink has the same problem; it should be
> > linked to /dev/v4l/video0, which is created correctly.
> >
> > Any ideas?
>
> You should not swap kernel node names with symlink names. The primary
> name in /dev should always match the name in /sys. In general, on
> recent kernels, almost all rules with NAME= should be removed and the
> kernel-provided names not be overwritten by userspace config, and only
> symlinks (which do no clash with kernel names) added.
>
I have a similar issue.
the lvm2 package on gentoo installs this udev rule:
KERNEL="device-mapper", SYMLINK+="mapper/control"
Now udev-147 cries about not being able to create the symlink as
kernel-provided name is already set to "mapper/control".
So is the only possibility to surpress this warning to adjust the rule to
this?
KERNEL="device-mapper", NAME="mapper/control"
Matthias
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Failed to Create Symlinks ...
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
2009-11-29 19:04 ` Kay Sievers
2009-11-29 19:15 ` Matthias Schwarzott
@ 2009-11-29 19:20 ` Kay Sievers
2009-11-30 12:37 ` Kay Sievers
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2009-11-29 19:20 UTC (permalink / raw)
To: linux-hotplug
On Sun, Nov 29, 2009 at 20:15, Matthias Schwarzott <zzam@gentoo.org> wrote:
> I have a similar issue.
> the lvm2 package on gentoo installs this udev rule:
> KERNEL="device-mapper", SYMLINK+="mapper/control"
>
> Now udev-147 cries about not being able to create the symlink as
> kernel-provided name is already set to "mapper/control".
Yes, this is expected, mapper/control is the primary name, and not a symlink.
> So is the only possibility to surpress this warning to adjust the rule to
> this?
> KERNEL="device-mapper", NAME="mapper/control"
Looks like, yes. Recent kernels/udev though should not have any rule
for this. We removed all such rules from the udev default rule set.
Kay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Failed to Create Symlinks ...
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
` (2 preceding siblings ...)
2009-11-29 19:20 ` Kay Sievers
@ 2009-11-30 12:37 ` Kay Sievers
2009-11-30 14:03 ` Matthias Schwarzott
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2009-11-30 12:37 UTC (permalink / raw)
To: linux-hotplug
On Mon, Nov 30, 2009 at 00:35, Chris Dellin <cdellin@gmail.com> wrote:
> On Sun, Nov 29, 2009 at 14:04, Kay Sievers <kay.sievers@vrfy.org> wrote:
>> You should not swap kernel node names with symlink names. The primary
>> name in /dev should always match the name in /sys. In general, on
>> recent kernels, almost all rules with NAME= should be removed and the
>> kernel-provided names not be overwritten by userspace config, and only
>> symlinks (which do no clash with kernel names) added.
>
> OK; in this case, the path in /sys is
> /sys/devices/virtual/misc/agpgart, while the "kernel name" is
> "agpgart". So the primary /dev device should just be /dev/agpgart
> (and not /dev/misc/agpgart).
Yes, or the kernel would need to provide that name. But I doubt that
/dev/misc/ makes much sense.
> Does this mean that the documentation examples, such as this:
> KERNEL="hdb", NAME="my_spare_disk"
> should be replaced with:
> KERNEL="hdb", SYMLINK+="my_spare_disk" ?
Sure, kernel names should not be changed, it's almost always wrong to do that.
> Does this mean that use of NAME should be discouraged outright? In
> that case, I'll file this as a bug with Gentoo, as these are all
> distribution-default rules.
Yes, NAME= should be a rare exception with a very good reason. Like in
case that the kernel misses the right name, like for older kernels, or
not well-maintained drivers, or in case network interfaces are
renamed.
Thanks,
Kay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Failed to Create Symlinks ...
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
` (3 preceding siblings ...)
2009-11-30 12:37 ` Kay Sievers
@ 2009-11-30 14:03 ` Matthias Schwarzott
2009-11-30 14:08 ` Matthias Schwarzott
2009-11-30 15:39 ` Kay Sievers
6 siblings, 0 replies; 8+ messages in thread
From: Matthias Schwarzott @ 2009-11-30 14:03 UTC (permalink / raw)
To: linux-hotplug
On Sonntag, 29. November 2009, Kay Sievers wrote:
> On Sun, Nov 29, 2009 at 20:15, Matthias Schwarzott <zzam@gentoo.org> wrote:
> > I have a similar issue.
> > the lvm2 package on gentoo installs this udev rule:
> > KERNEL="device-mapper", SYMLINK+="mapper/control"
> >
> > Now udev-147 cries about not being able to create the symlink as
> > kernel-provided name is already set to "mapper/control".
>
> Yes, this is expected, mapper/control is the primary name, and not a
> symlink.
I suggested lvm2 maintainers to change the rule to
KERNEL="device-mapper", NAME="mapper/control"
>
> > So is the only possibility to surpress this warning to adjust the rule to
> > this?
> > KERNEL="device-mapper", NAME="mapper/control"
>
> Looks like, yes. Recent kernels/udev though should not have any rule
> for this. We removed all such rules from the udev default rule set.
>
Sure, but gentoo does aim to support at least not only the newest kernels, but
udev for now still supports 2.6.27 or even older versions with older udev
versions.
Is there a way to conditionalize these rules besides shell tricks at boot
checking kernel versions and discarding some rules/rule files on some
conditions.
Matthias
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Failed to Create Symlinks ...
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
` (4 preceding siblings ...)
2009-11-30 14:03 ` Matthias Schwarzott
@ 2009-11-30 14:08 ` Matthias Schwarzott
2009-11-30 15:39 ` Kay Sievers
6 siblings, 0 replies; 8+ messages in thread
From: Matthias Schwarzott @ 2009-11-30 14:08 UTC (permalink / raw)
To: linux-hotplug
On Samstag, 28. November 2009, Chris Dellin wrote:
> Hey all,
>
> I'm having some trouble recently with my installation of udev. I
> expect it to create symlinks for a few devices, but no symlinks are
> created. For example:
>
> udev should create a symlink, as per the rule below:
> $ grep agpgart /etc/udev/rules.d/50-udev.rules
> KERNEL="agpgart", NAME="misc/%k", SYMLINK+="%k"
>
>
> A few other notes:
> - The system is running a recent copy of Gentoo Linux.
What is the version of udev you are running?
Unstable udev and latest two stable versions do not contain that rule you
mentioned above.
Matthias
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Failed to Create Symlinks ...
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
` (5 preceding siblings ...)
2009-11-30 14:08 ` Matthias Schwarzott
@ 2009-11-30 15:39 ` Kay Sievers
6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2009-11-30 15:39 UTC (permalink / raw)
To: linux-hotplug
On Mon, Nov 30, 2009 at 15:03, Matthias Schwarzott <zzam@gentoo.org> wrote:
> On Sonntag, 29. November 2009, Kay Sievers wrote:
>> On Sun, Nov 29, 2009 at 20:15, Matthias Schwarzott <zzam@gentoo.org> wrote:
>> > I have a similar issue.
>> > the lvm2 package on gentoo installs this udev rule:
>> > KERNEL="device-mapper", SYMLINK+="mapper/control"
>> >
>> > Now udev-147 cries about not being able to create the symlink as
>> > kernel-provided name is already set to "mapper/control".
>>
>> Yes, this is expected, mapper/control is the primary name, and not a
>> symlink.
> I suggested lvm2 maintainers to change the rule to
> KERNEL="device-mapper", NAME="mapper/control"
>
>>
>> > So is the only possibility to surpress this warning to adjust the rule to
>> > this?
>> > KERNEL="device-mapper", NAME="mapper/control"
>>
>> Looks like, yes. Recent kernels/udev though should not have any rule
>> for this. We removed all such rules from the udev default rule set.
>>
> Sure, but gentoo does aim to support at least not only the newest kernels, but
> udev for now still supports 2.6.27 or even older versions with older udev
> versions.
>
> Is there a way to conditionalize these rules besides shell tricks at boot
> checking kernel versions and discarding some rules/rule files on some
> conditions.
Just do not try to swap kernel names with symlink names. There should
be no problem having rules with NAME= as long as they match the
standard kernel name.
Kay
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-11-30 15:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-28 22:52 Failed to Create Symlinks Chris Dellin
2009-11-29 19:04 ` Kay Sievers
2009-11-29 19:15 ` Matthias Schwarzott
2009-11-29 19:20 ` Kay Sievers
2009-11-30 12:37 ` Kay Sievers
2009-11-30 14:03 ` Matthias Schwarzott
2009-11-30 14:08 ` Matthias Schwarzott
2009-11-30 15:39 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).