linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] Changing owner of lv device with udev
@ 2012-12-19 22:41 Nikolaus Rath
  2012-12-20 10:14 ` Alasdair G Kergon
  0 siblings, 1 reply; 4+ messages in thread
From: Nikolaus Rath @ 2012-12-19 22:41 UTC (permalink / raw)
  To: linux-lvm

Hello,

I'm having some trouble changing the owner of a logical device. I added
the following udev rule to both my initramfs and the real root:

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 always ends up being owned
by root:disk instead.

On the other hand, if I look at the permissions right before initramfs
executes the real init, the permissions are actually correct.

So, at some point between execution of the real init and completed
startup, something overwrites the owner of by device, but both before
and afterward the rule gets applied correctly.

I first blamed this on udev
(http://article.gmane.org/gmane.comp.sysutils.systemd.devel/7605), but I
was told that the problem might be with the special way that LVM uses
udev rules.

Does anyone have an idea what's happening here? How can I get this to work?

Thanks,
-Nikolaus

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

end of thread, other threads:[~2012-12-28  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-19 22:41 [linux-lvm] Changing owner of lv device with udev Nikolaus Rath
2012-12-20 10:14 ` Alasdair G Kergon
2012-12-20 16:36   ` Nikolaus Rath
2012-12-28  6:13     ` Nikolaus Rath

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).