Geert Geurts wrote:
I've created this rule but it applies to the kernel device... /dev/dm-*.
What I need is a rule that changes the ownership
of /dev/mapper/HomeVolume.
Thats where I stand now,
so any suggestions are welcome!
As I corrected myself earlier - if you really need udev to do so, you
need rules file that will create the names as lvm would do.
Or you can extend a bit the above rules and make udev create that
particular device with the name you want, e.g.
ENV{DM_UUID}=="<uuid>", NAME:="<something>" GROUP="users", MODE="0660"
This guarantees that no rule later will alter the name. It also assumes
you're using udev>=131 and nothing earlier did NAME:= (with 130 and
earlier, any earlier NAME= or NAME:= assignment was final).
Then - just use /dev/<something> to access your volume however you need.
Or ... you can just add simple chown / chmod somewhere after lvm is
activated (not very flexible, but definitely simple).
Anyway - I needed similar thing at one of my machines, where squid cache
uses coss storage. Squid runs unprivileged, but had to access coss
device directly. I use rules mimicking lvm/dmsetup behaviour though, so
simple NAME== test was enough in my case. If you're curious -
http://marc.info/?l=linux-hotplug&m=122165542423023&q=p3
With that, I have
ACTION=="add|change", SUBSYSTEM=="block", NAME=="mapper/vg0-coss", \
OWNER="squid", GROUP="squid"
Good luck
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html