* [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
* Re: [linux-lvm] Changing owner of lv device with udev
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
0 siblings, 1 reply; 4+ messages in thread
From: Alasdair G Kergon @ 2012-12-20 10:14 UTC (permalink / raw)
To: Nikolaus Rath; +Cc: linux-lvm
On Wed, Dec 19, 2012 at 02:41:54PM -0800, Nikolaus Rath wrote:
> 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:
Tell people which distribution you're using and which version, and which
udev rule file you're editing.
Alasdair
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Changing owner of lv device with udev
2012-12-20 10:14 ` Alasdair G Kergon
@ 2012-12-20 16:36 ` Nikolaus Rath
2012-12-28 6:13 ` Nikolaus Rath
0 siblings, 1 reply; 4+ messages in thread
From: Nikolaus Rath @ 2012-12-20 16:36 UTC (permalink / raw)
To: linux-lvm
On 12/20/2012 02:14 AM, Alasdair G Kergon wrote:
> On Wed, Dec 19, 2012 at 02:41:54PM -0800, Nikolaus Rath wrote:
>> 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:
> Tell people which distribution you're using and which version, and which
> udev rule file you're editing.
I'm using Debian wheezy and added the rule to
/etc/udev/rules.d/99-udev-custom.rules.
I made sure this is copied into the initrd by adding a hook in
/etc/initramfs/hooks/.
Sorry for the omission. I thought it wouldn't matter because the rule
seemed to be parsed and used by udev perfectly both in the initrd and
after system boot.
Best,
Niko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-lvm] Changing owner of lv device with udev
2012-12-20 16:36 ` Nikolaus Rath
@ 2012-12-28 6:13 ` Nikolaus Rath
0 siblings, 0 replies; 4+ messages in thread
From: Nikolaus Rath @ 2012-12-28 6:13 UTC (permalink / raw)
To: linux-lvm
Nikolaus Rath <Nikolaus@rath.org> writes:
> On 12/20/2012 02:14 AM, Alasdair G Kergon wrote:
>> On Wed, Dec 19, 2012 at 02:41:54PM -0800, Nikolaus Rath wrote:
>>> 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:
>> Tell people which distribution you're using and which version, and which
>> udev rule file you're editing.
> I'm using Debian wheezy and added the rule to
> /etc/udev/rules.d/99-udev-custom.rules.
> I made sure this is copied into the initrd by adding a hook in
> /etc/initramfs/hooks/.
>
> Sorry for the omission. I thought it wouldn't matter because the rule
> seemed to be parsed and used by udev perfectly both in the initrd and
> after system boot.
No one any idea?
Best,
-Nikolaus
--
»Time flies like an arrow, fruit flies like a Banana.«
PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C
^ 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).