ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Alexey Shabalin <a.shabalin@gmail.com>
To: ALT Linux Sisyphus discussions <sisyphus@lists.altlinux.org>
Subject: Re: [sisyphus] udev-197
Date: Mon, 28 Jan 2013 14:58:19 +0400
Message-ID: <CAEdvWkTo_GGBRdYjgVpaperz2WnXFR+pb_kF6HJys+suRaowog@mail.gmail.com> (raw)
In-Reply-To: <51065483.5090603@altlinux.ru>

28 января 2013 г., 14:35 пользователь Alexey Gladkov написал:
> 28.01.2013 14:27, Alexey Shabalin wrote:
>> 26 января 2013 г., 21:12 пользователь Sergey Vlasov  написал:
>>>>  >> http://git.altlinux.org/gears/s/systemd.git?p=systemd.git;a=commit;h=48a849ee17fb25e0001bfcc0f28a4aa633d016a1
>>>>
>>>>  > И как предлагается теперь выставлять правильные права на файлы устройств?
>>>>
>>>> Не знаю. Я сделал так:
>>>
>>>> --- /etc/rc.d/init.d/udevd~   2013-01-24 22:16:08.348977338 +0400
>>>> +++ /etc/rc.d/init.d/udevd    2013-01-24 22:21:31.486708131 +0400
>>>> @@ -196,7 +193,7 @@
>>>>               RETVAL=$[$RETVAL+$?]
>>>>               [ "$RETVAL" == "0" ] && echo "" >/proc/sys/kernel/hotplug
>>>>               /sbin/udevadm control --property="STARTUP=1"
>>>> -             /sbin/udevadm trigger
>>>> +             /sbin/udevadm trigger --action=add
>>>>               action "Populating /dev:" /sbin/udevadm settle
>>>>               /sbin/udevadm control --property="STARTUP="
>>>>               RETVAL=$[$RETVAL+$?]
>>>
>>> И, судя по комментариям из вышеупомянутого коммита, добавление
>>> --action=add - это правильное решение.
>>>
>>
>> Я извиняюсь, может чего-то недопонимаю, объясните пожалуйста.
>> Дело в том, что и из systemd-udev-trigger.service я тоже убрал из
>> параметров --action=add при вызове udevadm trigger.
>> Все из-за того, что у нас initrd (сделанный make-initrd) удаляет за
>> собой базу udev, и после смены корневой фс, базу udev надо заново
>> наполнить, иначе возникают различные проблемы (я уже описывал их ранее
>> в рассылке).
>> Т.е. пока make-initrd не будет копировать базу udev, добавлять
>> --action=add мне кажется опасным.
>
> make-initrd как раз и формирует базу с нуля с помощью --action=add.
> Без этого ключа база будет не полной.

Лёшь, посмотри в личной переписке, тема
"start swap on lvm (systemd)"
Я там описывал проблему:

из initrd приезжают диски, информация о которых в udev минимальна. Это
не даёт нормально их подмонтировать средствами systemd+udev.

После загрузки нормальная информация появляется только после
vgchange --refresh

Решением проблемы старта swap на lvm как раз было удалить
"--action=add", что бы база udev заполнялась заново.


Также вот выдержка из  /lib/udev/rules.d/10-dm.rules, где рекомендуют
не удалять udev базу в initrd.

# Normally, we operate on "change" events. But when coldplugging, there's an
# "add" event present. We have to recognize this and do our actions in this
# particular situation, too. Also, we don't want the nodes to be created
# prematurely on "add" events while not coldplugging. We check
# DM_UDEV_PRIMARY_SOURCE_FLAG to see if the device was activated correctly
# before and if not, we ignore the "add" event totally. This way we can support
# udev triggers generating "add" events (e.g. "udevadm trigger --action=add" or
# "echo add > /sys/block/<dm_device>/uevent"). The trigger with "add" event is
# also used at boot to reevaluate udev rules for all existing devices activated
# before (e.g. in initrd). If udev is used in initrd, we require the udev init
# script to not remove the existing udev database so we can reuse the
information
# stored at the time of device activation in the initrd.


--
Alexey Shabalin

  reply	other threads:[~2013-01-28 10:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22 10:10 sbolshakov
2013-01-24 18:33 ` sbolshakov
2013-01-24 18:55   ` Dmitry V. Levin
2013-01-25 10:51     ` Sergey Bolshakov
2013-01-26 17:12       ` Sergey Vlasov
2013-01-28 10:27         ` Alexey Shabalin
2013-01-28 10:35           ` Alexey Gladkov
2013-01-28 10:58             ` Alexey Shabalin [this message]
2013-01-28 12:25               ` Alexey Gladkov
2013-01-28 12:43                 ` Alexey Shabalin
2013-01-28 13:05                   ` Alexey Gladkov
2013-01-28 13:24                 ` Alexey Shabalin
2013-01-28 14:15                   ` Alexey Gladkov
2013-01-28 15:04                     ` Alexey Shabalin
2013-01-28 15:23                       ` Alexey Gladkov
2013-01-28 15:37                         ` Alexey Shabalin
2013-01-28 15:42                           ` Alexey Shabalin
2013-01-28 15:49                             ` Dmitry V. Levin
2013-01-29  9:44                               ` Alexey Shabalin
2013-01-29 11:38                                 ` Alexey Gladkov
2013-01-29 11:54                                   ` Alexey Shabalin
2013-01-29 12:01                                     ` Alexey Gladkov
2013-01-29 12:47                                       ` Alexey Shabalin
2013-01-28 13:29                 ` Sergei Epiphanov
2013-01-28 13:50                   ` Alexey Gladkov
2013-01-28 14:32                     ` Sergei Epiphanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAEdvWkTo_GGBRdYjgVpaperz2WnXFR+pb_kF6HJys+suRaowog@mail.gmail.com \
    --to=a.shabalin@gmail.com \
    --cc=shaba@altlinux.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git