All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem recreating 70-persistent-net.rules with udev 0.125-7 on
@ 2009-03-10 16:48 Nilshar
  2009-03-10 17:33 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Nilshar @ 2009-03-10 16:48 UTC (permalink / raw)
  To: linux-hotplug

Hello list,

first sorry if this question already been asked, I searched but not
really found archives for this ML.

My problem is on a debian 5.0 (Lenny) with udev version 0.125-7.
on previous versions of debian, I often deleted the file
/etc/udev/rules.d/z25-persistent-net.rules, and this file was
recreated after a reboot.
I tried to do same thing with Lenny.
First, I saw that name of this file changed to
/etc/udev/rules.d/70-persistent-net.rules, si I deleted that file, but
after a reboot, it was not created.
After several hours searching the internet, I found nothing solving
this problem.
And after more tries, I noticed this only appear on a vmware system.
Recreating the file /etc/udev/rules.d/70-persistent-net.rules on a
"normal" Dell server is working just fine.
But not on a vmware (vmware server 1.0.6).

I tried this command, with debug logs activated :

# echo add > /sys/class/net/eth0/uevent

logs says :

Mar 10 17:28:52 hostname udevd[5990]: get_ctrl_msg: udevd message
(SET_LOG_PRIORITY) received, udev_log_priority=7
Mar 10 17:28:59 hostname udevd[5990]: msg_queue_insert: seq 2995
queued, 'add' 'net'
Mar 10 17:28:59 hostname udevd-event[7135]: match_rule: set ENV
'MATCHADDR\0:0c:29:0a:f8:96'
Mar 10 17:28:59 hostname udevd-event[7135]: match_rule: set ENV 'MATCHIFTYPE=1'
Mar 10 17:28:59 hostname udevd-event[7135]: match_rule: unset ENV 'MATCHADDR'
Mar 10 17:28:59 hostname udevd-event[7135]: udev_rules_get_name: no
node name set, will use kernel name 'eth0'
Mar 10 17:28:59 hostname udevd-event[7135]: run_program: 'net.agent'
Mar 10 17:28:59 hostname udevd[5990]: udev_event_run: seq 2995 forked,
pid [7135], 'add' 'net', 0 seconds old
Mar 10 17:28:59 hostname udevd-event[7135]: run_program:
'/lib/udev/net.agent' returned with status 0
Mar 10 17:28:59 hostname udevd-event[7135]: pass_env_to_socket: passed
-1 bytes to socket '@/org/kernel/udev/monitor',
Mar 10 17:28:59 hostname udevd-event[7135]: udev_event_run: seq 2995
finished with 0
Mar 10 17:28:59 hostname udevd[5990]: udev_done: seq 2995, pid [7135]
exit with 0, 0 seconds old


I do not know what more to try, so any advice would be welcome :)
I'm not suscribed to the ML, so please CC me :)

Nilshar

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
@ 2009-03-10 17:33 ` Marco d'Itri
  2009-03-10 17:34 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Kay Sievers
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Marco d'Itri @ 2009-03-10 17:33 UTC (permalink / raw)
  To: linux-hotplug

On Mar 10, Nilshar <nilshar@gmail.com> wrote:

> And after more tries, I noticed this only appear on a vmware system.
Indeed, these rules are not automatically created on vmware systems
since this is generally undesirable.
If you need rules to rename network interfaces, write your owns.

-- 
ciao,
Marco

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7 on
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
  2009-03-10 17:33 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
@ 2009-03-10 17:34 ` Kay Sievers
  2009-03-10 17:48 ` Nilshar
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Kay Sievers @ 2009-03-10 17:34 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Mar 10, 2009 at 17:48, Nilshar <nilshar@gmail.com> wrote:
> My problem is on a debian 5.0 (Lenny) with udev version 0.125-7.
> on previous versions of debian, I often deleted the file
> /etc/udev/rules.d/z25-persistent-net.rules, and this file was
> recreated after a reboot.
> I tried to do same thing with Lenny.
> First, I saw that name of this file changed to
> /etc/udev/rules.d/70-persistent-net.rules, si I deleted that file, but
> after a reboot, it was not created.
> After several hours searching the internet, I found nothing solving
> this problem.
> And after more tries, I noticed this only appear on a vmware system.
> Recreating the file /etc/udev/rules.d/70-persistent-net.rules on a
> "normal" Dell server is working just fine.

It might be, that the vmware interface does not trigger the creation
of a persistent rule. Network interfaces need to be created by a
"driver", be backed by a "bus".

Look a the devpath of the device and it will tell you the parent devices:
  /sys/class/net/eth0 -> ../../devices/pci0000:00/[...]/net/eth0
which means, that it's backed by a PCI device, and therefore a rule
will be created. Maybe the vmware interface is a virtual one.

Kay

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7 on
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
  2009-03-10 17:33 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
  2009-03-10 17:34 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Kay Sievers
@ 2009-03-10 17:48 ` Nilshar
  2009-03-10 17:55 ` Nilshar
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Nilshar @ 2009-03-10 17:48 UTC (permalink / raw)
  To: linux-hotplug

Thanks for your answer Kay,

on my vmware system I got :

lrwxrwxrwx 1 root root 0 Mar 10 17:04 /sys/class/net/eth0/device ->
../../../devices/pci0000:00/0000:00:11.0
lrwxrwxrwx 1 root root 0 Mar 10 17:04
/sys/devices/pci0000:00/0000:00:11.0/driver ->
../../../bus/pci/drivers/pcnet32
lrwxrwxrwx 1 root root 0 Mar 10 17:13
/sys/devices/pci0000:00/0000:00:11.0/net:eth0 ->
../../../class/net/eth0

so it seems ok...


2009/3/10 Kay Sievers <kay.sievers@vrfy.org>:
> On Tue, Mar 10, 2009 at 17:48, Nilshar <nilshar@gmail.com> wrote:
>> My problem is on a debian 5.0 (Lenny) with udev version 0.125-7.
>> on previous versions of debian, I often deleted the file
>> /etc/udev/rules.d/z25-persistent-net.rules, and this file was
>> recreated after a reboot.
>> I tried to do same thing with Lenny.
>> First, I saw that name of this file changed to
>> /etc/udev/rules.d/70-persistent-net.rules, si I deleted that file, but
>> after a reboot, it was not created.
>> After several hours searching the internet, I found nothing solving
>> this problem.
>> And after more tries, I noticed this only appear on a vmware system.
>> Recreating the file /etc/udev/rules.d/70-persistent-net.rules on a
>> "normal" Dell server is working just fine.
>
> It might be, that the vmware interface does not trigger the creation
> of a persistent rule. Network interfaces need to be created by a
> "driver", be backed by a "bus".
>
> Look a the devpath of the device and it will tell you the parent devices:
>  /sys/class/net/eth0 -> ../../devices/pci0000:00/[...]/net/eth0
> which means, that it's backed by a PCI device, and therefore a rule
> will be created. Maybe the vmware interface is a virtual one.
>
> Kay
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7 on
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (2 preceding siblings ...)
  2009-03-10 17:48 ` Nilshar
@ 2009-03-10 17:55 ` Nilshar
  2009-03-10 17:59 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Nilshar @ 2009-03-10 17:55 UTC (permalink / raw)
  To: linux-hotplug

Oh, ok, so it is a normal behavior ?

I do not want to rename network interfaces, I just need the file to be
recreated when it got deleted.
For example, if I need to restore a sytem into a vmware, this file
needs to be changed. on a normal box, udev will add the new interfaces
as eth2 etc.. so I'll have to delete the file so it will be recreated
with eth0. How can I do that on a vmware ?

Additional question, on my vmware, when I upgraded from Etch to Lenny
(so from z25 to 70 -persistent-net.rules), when udev has been upgraded
it did recreate the file successfully, maybe I can force it again ?
but I don't know how.

Thanks for your help.

Nilshar.

2009/3/10 Marco d'Itri <md@linux.it>:
> On Mar 10, Nilshar <nilshar@gmail.com> wrote:
>
>> And after more tries, I noticed this only appear on a vmware system.
> Indeed, these rules are not automatically created on vmware systems
> since this is generally undesirable.
> If you need rules to rename network interfaces, write your owns.
>
> --
> ciao,
> Marco
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (3 preceding siblings ...)
  2009-03-10 17:55 ` Nilshar
@ 2009-03-10 17:59 ` Marco d'Itri
  2009-03-10 18:05 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Marco d'Itri @ 2009-03-10 17:59 UTC (permalink / raw)
  To: linux-hotplug

On Mar 10, Nilshar <nilshar@gmail.com> wrote:

> For example, if I need to restore a sytem into a vmware, this file
> needs to be changed. on a normal box, udev will add the new interfaces
Every time you change the hardware for a system, even if it is virtual
hardware, you need to delete the file.

> as eth2 etc.. so I'll have to delete the file so it will be recreated
> with eth0. How can I do that on a vmware ?
udev will do it if needed, but it's not mandatory to have one (e.g. if
all or your interfaces are handled by the same driver then their names
will usually never change).

BTW, we are talking about paravirtualized network interfaces. If vmware
is emulating a real interface then there is some other issues.

-- 
ciao,
Marco

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7 on
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (4 preceding siblings ...)
  2009-03-10 17:59 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
@ 2009-03-10 18:05 ` Nilshar
  2009-03-10 18:06 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Nilshar @ 2009-03-10 18:05 UTC (permalink / raw)
  To: linux-hotplug

2009/3/10 Marco d'Itri <md@linux.it>:
> On Mar 10, Nilshar <nilshar@gmail.com> wrote:
>
>> For example, if I need to restore a sytem into a vmware, this file
>> needs to be changed. on a normal box, udev will add the new interfaces
> Every time you change the hardware for a system, even if it is virtual
> hardware, you need to delete the file.

ok, so deleting it is the good thing to do. it always worked for me
with earlier version of udev, good to have a confirmation of that,
thanks.

>
>> as eth2 etc.. so I'll have to delete the file so it will be recreated
>> with eth0. How can I do that on a vmware ?
> udev will do it if needed, but it's not mandatory to have one (e.g. if
> all or your interfaces are handled by the same driver then their names
> will usually never change).

so, if I got 3 interfaces with the same driver (pcnet32), udev will
think it's not needed and will not recreate the file ?
Is there a way to force udev to create it ?

>
> BTW, we are talking about paravirtualized network interfaces. If vmware
> is emulating a real interface then there is some other issues.

I'm using 3 interface on my vmware, it's emulation of pcnet32 card.
see the output from lspci :
00:11.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970
[PCnet32 LANCE] (rev 10)
00:12.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970
[PCnet32 LANCE] (rev 10)
00:13.0 Ethernet controller: Advanced Micro Devices [AMD] 79c970
[PCnet32 LANCE] (rev 10)


>
> --
> ciao,
> Marco
>

Thank you Marco.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (5 preceding siblings ...)
  2009-03-10 18:05 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
@ 2009-03-10 18:06 ` Marco d'Itri
  2009-03-11 10:21 ` Scott James Remnant
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Marco d'Itri @ 2009-03-10 18:06 UTC (permalink / raw)
  To: linux-hotplug

On Mar 10, Nilshar <nilshar@gmail.com> wrote:

> so, if I got 3 interfaces with the same driver (pcnet32), udev will
> think it's not needed and will not recreate the file ?
No, there is some other reason which prevents its creation.

> Is there a way to force udev to create it ?
No.

-- 
ciao,
Marco

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (6 preceding siblings ...)
  2009-03-10 18:06 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
@ 2009-03-11 10:21 ` Scott James Remnant
  2009-03-12 10:35 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Scott James Remnant @ 2009-03-11 10:21 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 458 bytes --]

On Tue, 2009-03-10 at 18:33 +0100, Marco d'Itri wrote:

> On Mar 10, Nilshar <nilshar@gmail.com> wrote:
> 
> > And after more tries, I noticed this only appear on a vmware system.
> Indeed, these rules are not automatically created on vmware systems
> since this is generally undesirable.
> If you need rules to rename network interfaces, write your owns.
> 
Do you have a patch for that? :)

Scott
-- 
Scott James Remnant
scott@canonical.com

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7 on
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (7 preceding siblings ...)
  2009-03-11 10:21 ` Scott James Remnant
@ 2009-03-12 10:35 ` Nilshar
  2009-03-12 12:31 ` Sujit Karataparambil
  2009-03-17 10:13 ` Nilshar
  10 siblings, 0 replies; 12+ messages in thread
From: Nilshar @ 2009-03-12 10:35 UTC (permalink / raw)
  To: linux-hotplug

So any idea why the file is not recreated ?
Any more info I can provide ?

2009/3/10 Marco d'Itri <md@linux.it>:
> On Mar 10, Nilshar <nilshar@gmail.com> wrote:
>
>> so, if I got 3 interfaces with the same driver (pcnet32), udev will
>> think it's not needed and will not recreate the file ?
> No, there is some other reason which prevents its creation.
>
>> Is there a way to force udev to create it ?
> No.
>
> --
> ciao,
> Marco
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7 on
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (8 preceding siblings ...)
  2009-03-12 10:35 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
@ 2009-03-12 12:31 ` Sujit Karataparambil
  2009-03-17 10:13 ` Nilshar
  10 siblings, 0 replies; 12+ messages in thread
From: Sujit Karataparambil @ 2009-03-12 12:31 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Mar 12, 2009 at 4:05 PM, Nilshar <nilshar@gmail.com> wrote:
> So any idea why the file is not recreated ?
> Any more info I can provide ?
>
Files getting Recreated? Should be something that need a long way to go.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Problem recreating 70-persistent-net.rules with udev 0.125-7 on
  2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
                   ` (9 preceding siblings ...)
  2009-03-12 12:31 ` Sujit Karataparambil
@ 2009-03-17 10:13 ` Nilshar
  10 siblings, 0 replies; 12+ messages in thread
From: Nilshar @ 2009-03-17 10:13 UTC (permalink / raw)
  To: linux-hotplug

Ok I found my solution.
in 75-persistent-net-generator.rules file, there is a line that ignore
all vmware mac address range :
ENV{MATCHADDR}="00:0c:29:*|00:50:56:*", ENV{MATCHADDR}=""

I commented that line and now the 70-persistent-net.rules is recreated
on reboot.


2009/3/12 Nilshar <nilshar@gmail.com>:
> So any idea why the file is not recreated ?
> Any more info I can provide ?
>
> 2009/3/10 Marco d'Itri <md@linux.it>:
>> On Mar 10, Nilshar <nilshar@gmail.com> wrote:
>>
>>> so, if I got 3 interfaces with the same driver (pcnet32), udev will
>>> think it's not needed and will not recreate the file ?
>> No, there is some other reason which prevents its creation.
>>
>>> Is there a way to force udev to create it ?
>> No.
>>
>> --
>> ciao,
>> Marco
>>
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-03-17 10:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-10 16:48 Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
2009-03-10 17:33 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
2009-03-10 17:34 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Kay Sievers
2009-03-10 17:48 ` Nilshar
2009-03-10 17:55 ` Nilshar
2009-03-10 17:59 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
2009-03-10 18:05 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
2009-03-10 18:06 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 Marco d'Itri
2009-03-11 10:21 ` Scott James Remnant
2009-03-12 10:35 ` Problem recreating 70-persistent-net.rules with udev 0.125-7 on Nilshar
2009-03-12 12:31 ` Sujit Karataparambil
2009-03-17 10:13 ` Nilshar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.