* udev and existing /dev (devtmpfs)
@ 2012-01-17 19:25 Piotr Karbowski
2012-01-21 22:44 ` William Hubbs
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Piotr Karbowski @ 2012-01-17 19:25 UTC (permalink / raw)
To: linux-hotplug
Hi,
After starting udev on the /dev which is devtmpfs the udev does not
'take over' already created nodes unless I add in the udev's init script
'udevadm trigger --typeÞvices --action=change'
right after
'udevadm trigger --typeÞvices --actiond'
If there is no action=change, the /dev device mapper nodes looks like
(all are nodes, different permissions):
brw-rw---- 1 root disk 253, 0 Jan 17 19:51 /dev/dm-0
brw-rw---- 1 root disk 253, 1 Jan 17 19:51 /dev/dm-1
brw-rw---- 1 root disk 253, 2 Jan 17 19:51 /dev/dm-2
brw-rw---- 1 root disk 253, 3 Jan 17 19:51 /dev/dm-3
brw-rw---- 1 root disk 253, 4 Jan 17 19:51 /dev/dm-4
brw-rw---- 1 root disk 253, 5 Jan 17 19:51 /dev/dm-5
crw------- 1 root root 10, 236 Jan 17 19:51 /dev/mapper/control
brw------- 1 root root 253, 0 Jan 17 19:51 /dev/mapper/enc_root
brw------- 1 root root 253, 5 Jan 17 19:51 /dev/mapper/vg-dropzone
brw------- 1 root root 253, 4 Jan 17 19:51 /dev/mapper/vg-home
brw------- 1 root root 253, 3 Jan 17 19:51 /dev/mapper/vg-rootfs
brw------- 1 root root 253, 1 Jan 17 19:51 /dev/mapper/vg-swap
brw------- 1 root root 253, 2 Jan 17 19:51 /dev/mapper/vg-tmp
but after action=change it does look like:
brw-rw---- 1 root disk 253, 0 Jan 17 19:50 /dev/dm-0
brw-rw---- 1 root disk 253, 1 Jan 17 19:50 /dev/dm-1
brw-rw---- 1 root disk 253, 2 Jan 17 19:50 /dev/dm-2
brw-rw---- 1 root disk 253, 3 Jan 17 19:50 /dev/dm-3
brw-rw---- 1 root disk 253, 4 Jan 17 19:50 /dev/dm-4
brw-rw---- 1 root disk 253, 5 Jan 17 19:50 /dev/dm-5
crw------- 1 root root 10, 236 Jan 17 19:50 /dev/mapper/control
lrwxrwxrwx 1 root root 7 Jan 17 19:50 /dev/mapper/enc_root -> ../dm-0
lrwxrwxrwx 1 root root 7 Jan 17 19:50 /dev/mapper/vg-dropzone ->
../dm-5
lrwxrwxrwx 1 root root 7 Jan 17 19:50 /dev/mapper/vg-home -> ../dm-4
lrwxrwxrwx 1 root root 7 Jan 17 19:50 /dev/mapper/vg-rootfs ->
../dm-3
lrwxrwxrwx 1 root root 7 Jan 17 19:50 /dev/mapper/vg-swap -> ../dm-1
lrwxrwxrwx 1 root root 7 Jan 17 19:50 /dev/mapper/vg-tmp -> ../dm-2
The /dev/mapper/* become symlinks to /dev/dm-* (following udev rules).
The question is: in such scenario, where udev use already-created /dev
(whatever it is devtmpfs or maybe mdev-created), should we add the
action=change to the init script? If no, then what should we do to
udevize /dev?
Distro gentoo, udev-171, I have such issue on every box I use.
-- Piotr.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: udev and existing /dev (devtmpfs)
2012-01-17 19:25 udev and existing /dev (devtmpfs) Piotr Karbowski
@ 2012-01-21 22:44 ` William Hubbs
2012-01-22 20:42 ` Kay Sievers
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2012-01-21 22:44 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 757 bytes --]
On Tue, Jan 17, 2012 at 08:25:07PM +0100, Piotr Karbowski wrote:
> Hi,
>
> After starting udev on the /dev which is devtmpfs the udev does not
> 'take over' already created nodes unless I add in the udev's init script
>
> 'udevadm trigger --type=devices --action=change'
>
> right after
>
> 'udevadm trigger --type=devices --action=add'
I had asked about this myself here (this is actually a gentoo bug report
and Piotr has now brought it to this list). I also researched the
systemd services and found that our inig script is using the correct
startup sequence to bring up udev. In other words, Piotr is using a
workaround which isn't the correct fix.
Can anyone point the right direction for getting this fixed?
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: udev and existing /dev (devtmpfs)
2012-01-17 19:25 udev and existing /dev (devtmpfs) Piotr Karbowski
2012-01-21 22:44 ` William Hubbs
@ 2012-01-22 20:42 ` Kay Sievers
2012-01-23 16:41 ` Gabor Z. Papp
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2012-01-22 20:42 UTC (permalink / raw)
To: linux-hotplug
On Sat, Jan 21, 2012 at 23:44, William Hubbs <w.d.hubbs@gmail.com> wrote:
> On Tue, Jan 17, 2012 at 08:25:07PM +0100, Piotr Karbowski wrote:
>> After starting udev on the /dev which is devtmpfs the udev does not
>> 'take over' already created nodes unless I add in the udev's init script
>>
>> 'udevadm trigger --typefivices --action=change'
>>
>>     right after
>>
>> 'udevadm trigger --typefivices --action≠d'
>
> I had asked about this myself here (this is actually a gentoo bug report
> and Piotr has now brought it to this list). I also researched the
> systemd services and found that our inig script is using the correct
> startup sequence to bring up udev. In other words, Piotr is using a
> workaround which isn't the correct fix.
>
> Can anyone point the right direction for getting this fixed?
I guess it's some Gentoo-specific bug. Almost everybody just does:
'udevadm trigger --typefivices --action≠d'
once at bootup and nothing else.
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: udev and existing /dev (devtmpfs)
2012-01-17 19:25 udev and existing /dev (devtmpfs) Piotr Karbowski
2012-01-21 22:44 ` William Hubbs
2012-01-22 20:42 ` Kay Sievers
@ 2012-01-23 16:41 ` Gabor Z. Papp
2012-01-23 17:00 ` Kay Sievers
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Gabor Z. Papp @ 2012-01-23 16:41 UTC (permalink / raw)
To: linux-hotplug
* Kay Sievers <kay.sievers@vrfy.org>:
| I guess it's some Gentoo-specific bug. Almost everybody just does:
| 'udevadm trigger --typefivices --action≠d'
| once at bootup and nothing else.
udevadm trigger && udevadm settle
isn't anymore the suggested command after udevd --daemon?
As I see from the man page, trigger's default action is change, not add.
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: udev and existing /dev (devtmpfs)
2012-01-17 19:25 udev and existing /dev (devtmpfs) Piotr Karbowski
` (2 preceding siblings ...)
2012-01-23 16:41 ` Gabor Z. Papp
@ 2012-01-23 17:00 ` Kay Sievers
2012-03-02 0:46 ` Piotr Karbowski
2012-03-02 2:38 ` Kay Sievers
5 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2012-01-23 17:00 UTC (permalink / raw)
To: linux-hotplug
On Mon, Jan 23, 2012 at 17:41, Gabor Z. Papp <gzp@papp.hu> wrote:
> * Kay Sievers <kay.sievers@vrfy.org>:
>
> | I guess it's some Gentoo-specific bug. Almost everybody just does:
> | Â Â 'udevadm trigger --typeÞvices --actiond'
> | once at bootup and nothing else.
>
> udevadm trigger && udevadm settle
> isn't anymore the suggested command after udevd --daemon?
It was always 'add' which was suggested. It was the default action,
but it was changed to 'change' because 'add' must not be used anywhere
else than once after bootup.
Triggering 'change' has some valid use cases, not many though, and
most of them are workarounds for broken things.
Settle is only needed to block until broken subsystems catch up with
reality during bootup, and with reality how hotplug systems work
today. It is not pulled-in for systems which do not run broken or
legacy tools.
> As I see from the man page, trigger's default action is change, not add.
Yes, that changed May 2010 with udev 154.
Kay
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: udev and existing /dev (devtmpfs)
2012-01-17 19:25 udev and existing /dev (devtmpfs) Piotr Karbowski
` (3 preceding siblings ...)
2012-01-23 17:00 ` Kay Sievers
@ 2012-03-02 0:46 ` Piotr Karbowski
2012-03-02 2:38 ` Kay Sievers
5 siblings, 0 replies; 7+ messages in thread
From: Piotr Karbowski @ 2012-03-02 0:46 UTC (permalink / raw)
To: linux-hotplug
On 01/23/2012 06:00 PM, Kay Sievers wrote:
> On Mon, Jan 23, 2012 at 17:41, Gabor Z. Papp<gzp@papp.hu> wrote:
>
> It was always 'add' which was suggested. It was the default action,
> but it was changed to 'change' because 'add' must not be used anywhere
> else than once after bootup.
>
> Triggering 'change' has some valid use cases, not many though, and
> most of them are workarounds for broken things.
>
> Settle is only needed to block until broken subsystems catch up with
> reality during bootup, and with reality how hotplug systems work
> today. It is not pulled-in for systems which do not run broken or
> legacy tools.
> o
>
> Yes, that changed May 2010 with udev 154.
I just upgraded to udev-181 and the issue still is there. I believe the
/dev/mapper/ nodes are created by kernel's devtmpfs but the /dev/dm-*
are created by cryptsetup and lvm running in initramfs where is no udev
running. Even if I umount devtmpfs on initramfs level and let udev mount
it again, the changes will be still there. (I do mount --move to
/newroot/dev). Maybe the 'actiond' should care about already-created
nodes as well?
-- Piotr.
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: udev and existing /dev (devtmpfs)
2012-01-17 19:25 udev and existing /dev (devtmpfs) Piotr Karbowski
` (4 preceding siblings ...)
2012-03-02 0:46 ` Piotr Karbowski
@ 2012-03-02 2:38 ` Kay Sievers
5 siblings, 0 replies; 7+ messages in thread
From: Kay Sievers @ 2012-03-02 2:38 UTC (permalink / raw)
To: linux-hotplug
On Fri, Mar 2, 2012 at 01:46, Piotr Karbowski <piotr.karbowski@gmail.com> wrote:
> On 01/23/2012 06:00 PM, Kay Sievers wrote:
>>
>> On Mon, Jan 23, 2012 at 17:41, Gabor Z. Papp<gzp@papp.hu> Â wrote:
>>
>> It was always 'add' which was suggested. It was the default action,
>> but it was changed to 'change' because 'add' must not be used anywhere
>> else than once after bootup.
>>
>> Triggering 'change' has some valid use cases, not many though, and
>> most of them are workarounds for broken things.
>>
>> Settle is only needed to block until broken subsystems catch up with
>> reality during bootup, and with reality how hotplug systems work
>> today. It is not pulled-in for systems which do not run broken or
>> legacy tools.
>> o
>>
>> Yes, that changed May 2010 with udev 154.
>
>
> I just upgraded to udev-181 and the issue still is there. I believe the
> /dev/mapper/ nodes are created by kernel's devtmpfs but the /dev/dm-* are
> created by cryptsetup and lvm running in initramfs where is no udev running.
> Even if I umount devtmpfs on initramfs level and let udev mount it again,
> the changes will be still there. (I do mount --move to /newroot/dev). Maybe
> the 'actiond' should care about already-created nodes as well?
/dev/mapper/* is never created by the kernel.
/dev/dm-* is always created by the kernel.
You can mount and unmount devtmpfs as many times as you want, it will
always have the same content. If some tool, or you, change the
content, it will stay at the state it was changed to, regardless how
and when you mount it.
Kay
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-03-02 2:38 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-17 19:25 udev and existing /dev (devtmpfs) Piotr Karbowski
2012-01-21 22:44 ` William Hubbs
2012-01-22 20:42 ` Kay Sievers
2012-01-23 16:41 ` Gabor Z. Papp
2012-01-23 17:00 ` Kay Sievers
2012-03-02 0:46 ` Piotr Karbowski
2012-03-02 2:38 ` 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).