Bug#606124: lvm2: Should have an easy way to persistently set device owner/group/permissions

Maik Zumstrull maik.zumstrull at rz.uni-karlsruhe.de
Mon Dec 6 16:11:35 UTC 2010


Alasdair G Kergon wrote:

> On Mon, Dec 06, 2010 at 04:29:57PM +0100, Maik Zumstrull wrote:
> > As far as I can see, all lvm2 block devices are owned by root:disk
> > and 0660 and there is no easy way to change it. chown/chmod is lost
> > on reboot when udev recreates the node. Writing your own udev rules
> > is very iffy, as you would need a thorough understanding of how
> > Debian orders the rules and includes them in initramfs.
>  
> Upstream provides straightforward udev rule templates with examples
> showing how to do this.

Yeah, it's not that straightforward. I did fiddle with udev rules, and
got it to the point that it works when manually
re-triggering /dev/dm-*, but not on reboot. It has to have to do with
the way initramfs-tools (which is a Debian thing) includes rules in the
initrd image. I could probably get it to work if I spent more time on
it, but even with what I already tried, it's way to complicated for a
requirement as basic as access permissions. There needs to be an
actually straightforward way to do this.

> > I think lvcreate should have simple options for owner, group and
> > permissions, with the current situation as the default when not
> > specified, and the necessary udev magic to make the settings stick
> > across reboots.
>  
> There are no plans to do this upstream.

Well, I'm suggesting you make some. That's what wishlist bugs are for,
I believe. It doesn't have to be done this exact way, of course, and I
don't insist on an upstream solution. A Debian-way that is convenient
and reliable would be fine.





More information about the pkg-lvm-maintainers mailing list