[systemd-devel] udev device mapper rules for early boot?

Nikolaus Rath Nikolaus at rath.org
Fri Dec 14 08:44:43 PST 2012


On 12/13/2012 06:58 PM, Andrey Borzenkov wrote:
> В Thu, 13 Dec 2012 15:35:11 -0800
> Nikolaus Rath <Nikolaus at rath.org> пишет:
>
>> On 12/13/2012 08:35 AM, Andrey Borzenkov wrote:
>>
>> Now, I could add the missing rule and program to the initrd, but I feel
>> this is really opening a can of worms, since I don't really *need* to
>> change the device ownership that early.
>>
>> Is there some way to have udev re-run this rule once it has been started
>> properly by the real init? I guess turning the lv off and on again in
>> some init script would do the trick, but that doesn't seem much cleaner
>> either...
>>
> This would be just another can of worms, really. Cannot you delay
> starting your volume until normal system boot phase? The only devices
> that are really required to be present in initrd are those for root
> (and may be for /usr if it is separate). Everything else can be started
> later.
Looking at the relevant scripts, there doesn't seem to be any way to do
that either. I can only enable or disable lvm in initrd globally, but I
need to keep it enabled to mount the root fs.

However, I just looked at the devices from an initrd shell and found
something peculiar: all the /dev/dm-* devices are owed by uid 0, gid 0,
only the device I'm interested in is owned by 1000:0.

So apparently my udev rule actually works just fine in the initrd, but
something later on changes the permissions again, setting all the
devices to root:disk instead.

Any suggestions how to find out what's responsible for that?  Note that
when the system is running and I re-enable the volume, it is created
with the correct permissions (1000:disk).


Thanks,
Nikolaus


More information about the systemd-devel mailing list