[systemd-devel] udev device mapper rules for early boot?
Nikolaus Rath
Nikolaus at rath.org
Tue Dec 11 08:31:46 PST 2012
On 12/11/2012 03:00 AM, Colin Guthrie wrote:
> 'Twas brillig, and Nikolaus Rath at 10/12/12 19:03 did gyre and gimble:
>> Hello,
>>
>> I have created a udev rule to set the owner of a specific block device:
>>
>> SUBSYSTEM=="block",
>> ENV{DM_UUID}=="LVM-yYuoI8k05GWxZnz9BeEIwPUGGeojzF3dZZmXTYRqC051Tllj76OHdDlzYhKZUu7u",
>> OWNER="1000"
>>
>> If I disable and re-enable this logical volume with lvchange, it gets
>> created with the correct owner.
>>
>> However, when I boot the computer, the device is always owned by
>> root:disk instead.
>>
>> I checked my initrd, and the rule is present in lib/udev/rules.d as
>> 99-udev-custom.rules.
>>
>> Does anyone have a suggestion of how I could debug this further? Why is
>> my rule ignored when the volume comes up the first time?
> Random guess: does that user exist in the context of the initrd?
No. But that shouldn't be a problem. The other rules in the initrd also
refer to non-existing users (e.g. disk). I guess udev just waits until
passwd becomes available. Also, I tried specifying the UID instead of
the name, but that didn't help either.
Best,
Niko
More information about the systemd-devel
mailing list