Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295186 - sys-fs/lvm2-2.02.56-r1: udev is printing warnings about /dev/mapper/control rule
Summary: sys-fs/lvm2-2.02.56-r1: udev is printing warnings about /dev/mapper/control rule
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-30 13:59 UTC by Matthias Schwarzott
Modified: 2011-05-28 18:22 UTC (History)
12 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Schwarzott gentoo-dev 2009-11-30 13:59:58 UTC
as newer kernels instruct udev to set the name of /dev/mapper/control device itself, udev auto-assigns NAME="mapper/control", so this rule  from /etc/udev/rules.d/64-device-mapper.rules adds a symlink that would overwrite the device:
KERNEL=="device-mapper", SYMLINK+="mapper/control"

So udev prints a warning like this at boot:
link_update: creating link '/dev/mapper/control' to '/dev/mapper/control'
node_symlink: found existing node instead of symlink '/dev/mapper/control'
node_symlink: device node '/dev/mapper/control' already exists, link to '/dev/mapper/control' will not overwrite
 it

Easiest solution is to do the same as kernel developers did in kernel-space :change the rule to
KERNEL=="device-mapper", NAME="mapper/control"

Other versions are to strip of this rule here and add it to udev-provided compat-rules (same effect but different file the rule is in).
But that creates new dependencies (and I like to avoid it).

If lvm2 does require new enough udev (did not check) the file can also be moved to /lib/udev/rules.d, so we can some time in the future remove the CONFIG_PROTECT_MASK for /etc/udev/rules.d and open the dir up for just local admin usage.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-12-01 00:27:35 UTC
agk:
Can I get opinion on changing your upstream udev rules as needed per this bug?
Comment 2 Peter Rajnoha 2009-12-01 08:55:37 UTC
(In reply to comment #1)
> Can I get opinion on changing your upstream udev rules as needed per this bug?

Well, we have KERNEL=="device-mapper", NAME="mapper/control" in the upstream...
Comment 3 Torsten Kurbad 2009-12-04 14:56:12 UTC
For me, setting NAME="mapper/control" fixed the issue...
Comment 4 Dan Coats 2010-01-05 02:36:48 UTC
anyone going to jump out there and fix this?
Comment 5 Matthias Schwarzott gentoo-dev 2010-01-05 14:30:52 UTC
Commited.
Long term we can have a look at the rules upstream provides.
Comment 6 Toralf Förster gentoo-dev 2010-02-23 17:01:26 UTC
(In reply to comment #5)
> Commited.
May I ask you which udev version contained your commitment ? I updated the udev package some days ago to sys-fs/udev-149 and now I'm facing this message.

Comment 7 Peter Wood 2010-02-23 17:36:26 UTC
I can confirm this. After updating to version 149 I received the warning. Fixing the udev rules as indicated above fixed the problem. The question remains, why would a version be unmasked with an issue that has allegedly been dealt with.
Comment 8 Matthias Schwarzott gentoo-dev 2010-02-23 19:18:18 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Commited.
> May I ask you which udev version contained your commitment ?
As you may guess from the subject line of this bug: The lvm-related udev-rules are contained in lvm2, and the bug is in sys-fs/lvm2-2.02.56-r1 and -r2 and is fixed in lvm2-2.02.56-r3:

*lvm2-2.02.56-r3 (05 Jan 2010)

  05 Jan 2010; Matthias Schwarzott <zzam@gentoo.org>
  +files/64-device-mapper.rules-2.02.56-r3, +lvm2-2.02.56-r3.ebuild:
  Fix udev rule for mapper/control device, Bug #295186.

So I suggest lvm2-2.02.56-r1 could be stabled.
Nevertheless this is just a warning, nothing critical, just poluting boot console with text.
Comment 9 tanstaafl@libertytrek.org 2010-04-18 13:10:54 UTC
(In reply to comment #8)
> (In reply to comment #6)
>> (In reply to comment #5)
>>> Commited.
>> May I ask you which udev version contained your commitment ?
> As you may guess from the subject line of this bug: The lvm-related udev-rules
> are contained in lvm2, and the bug is in sys-fs/lvm2-2.02.56-r1 and -r2 and is
> fixed in lvm2-2.02.56-r3:
> 
> *lvm2-2.02.56-r3 (05 Jan 2010)
> 
>   05 Jan 2010; Matthias Schwarzott <zzam@gentoo.org>
>   +files/64-device-mapper.rules-2.02.56-r3, +lvm2-2.02.56-r3.ebuild:
>   Fix udev rule for mapper/control device, Bug #295186.
> 
> So I suggest lvm2-2.02.56-r1 could be stabled.

I assume you mean -r3 could be stabilized?

I just ran into this, now 2 *months* later...

> Nevertheless this is just a warning, nothing critical, just poluting boot
> console with text.

Hopefully you are right. I really dislike unmasking additional critical system packages to unstable just to fix stupid bugs that are already fixed, and I don't understand the recommended fixes above enough to do them manually.
Comment 10 John Blbec 2011-05-28 14:15:57 UTC
hello,

unfortunately, i do not agree status = resolved fixed :-(

i have faced the issue longer then 1 year (have a look at my post http://forums.gentoo.org/viewtopic-t-842415-highlight-.html) and i am really quite nerves because the warning during boot are still here and there is the right (fixed) rule in /etc/udev/rules.d/64-device-mapper.rules:

KERNEL=="device-mapper", NAME="mapper/control"

i am using stable udev-151-r4 and lvm2-2.02.73-r1 on 2.6.38-gentoo-r6 #1 SMP Sat May 28 11:33:22 CEST 2011 x86_64 Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz GenuineIntel GNU/Linux platform.

today i have created a new lv using lvcreate -L8G -nusrsrc raid5 and following warnings appeared in my /var/log/messages:

May 28 11:23:34 rpc-linux udevd-work[6414]: device node
'/dev/mapper/raid5-usrsrc' already exists, link to '/dev/mapper/raid5-usrsrc'
will not overwrite it
May 28 11:13:37 rpc-linux udevd-work[6414]: device node
'/dev/mapper/raid5-usrsrc' already exists, link to '/dev/mapper/raid5-usrsrc'
will not overwrite it

i am pretty sure device node did not exist!

next, these warnings appeared twice (issue begins using kernel 2.6.37 and newer) during boot: the first lvm2 checks and the seconds local file system checks and appeared for every lvm partition - in my case:

 # lvs
  LV        VG    Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  ccache    raid5 -wi-ao   4.00g                                      
  distfiles raid5 -wi-ao   6.00g                                      
  home      raid5 -wi-ao 100.00g                                      
  media     raid5 -wi-ao   1.98t                                      
  opt       raid5 -wi-ao   4.00g                                      
  portage   raid5 -wi-ao   1.00g                                      
  swap      raid5 -wi-ao   8.00g                                      
  tmp       raid5 -wi-ao   4.00g                                      
  usr       raid5 -wi-ao  10.00g                                      
  usrsrc    raid5 -wi-ao   8.00g                                      
  var       raid5 -wi-ao   4.00g                                      
  vartmp    raid5 -wi-ao   8.00g 

please, advice me a workaround or a fix. it is not problem to give us more info, it is enough to ask what do you need and i will cooperate with pleasure...

thanks

--JB
Comment 11 John Blbec 2011-05-28 18:19:30 UTC
hello,

unfortunately, i do not agree status = resolved fixed :-(

i have faced the issue longer then 1 year (have a look at my post http://forums.gentoo.org/viewtopic-t-842415-highlight-.html) and i am really quite nerves because the warning during boot are still here and there is the right (fixed) rule in /etc/udev/rules.d/64-device-mapper.rules:

KERNEL=="device-mapper", NAME="mapper/control"

i am using stable udev-151-r4 and lvm2-2.02.73-r1 on 2.6.38-gentoo-r6 #1 SMP Sat May 28 11:33:22 CEST 2011 x86_64 Intel(R) Core(TM)2 Quad CPU Q9450 @ 2.66GHz GenuineIntel GNU/Linux platform.

today i have created a new lv using lvcreate -L8G -nusrsrc raid5 and following warnings appeared in my /var/log/messages:

May 28 11:23:34 rpc-linux udevd-work[6414]: device node
'/dev/mapper/raid5-usrsrc' already exists, link to '/dev/mapper/raid5-usrsrc'
will not overwrite it
May 28 11:13:37 rpc-linux udevd-work[6414]: device node
'/dev/mapper/raid5-usrsrc' already exists, link to '/dev/mapper/raid5-usrsrc'
will not overwrite it

i am pretty sure device node did not exist!

next, these warnings appeared twice (issue begins using kernel 2.6.37 and newer) during boot: the first lvm2 checks and the seconds local file system checks and appeared for every lvm partition - in my case:

 # lvs
  LV        VG    Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  ccache    raid5 -wi-ao   4.00g                                      
  distfiles raid5 -wi-ao   6.00g                                      
  home      raid5 -wi-ao 100.00g                                      
  media     raid5 -wi-ao   1.98t                                      
  opt       raid5 -wi-ao   4.00g                                      
  portage   raid5 -wi-ao   1.00g                                      
  swap      raid5 -wi-ao   8.00g                                      
  tmp       raid5 -wi-ao   4.00g                                      
  usr       raid5 -wi-ao  10.00g                                      
  usrsrc    raid5 -wi-ao   8.00g                                      
  var       raid5 -wi-ao   4.00g                                      
  vartmp    raid5 -wi-ao   8.00g 

please, advice me a workaround or a fix. it is not problem to give us more info, it is enough to ask what do you need and i will cooperate with pleasure...

thanks

--JB
Comment 12 John Blbec 2011-05-28 18:22:42 UTC
(In reply to comment #11)

please remove this one and #11, thanks