linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Soltys <soltys@ziu.info>
To: linux-hotplug@vger.kernel.org
Subject: Re: udev lvm permisions
Date: Mon, 15 Dec 2008 11:35:00 +0000	[thread overview]
Message-ID: <494640E4.6000005@ziu.info> (raw)
In-Reply-To: <1229336451.19633.4.camel@linux-pqqd.site>

Geert Geurts wrote:
> Hello,
> the permissions to the HomeVolume are not set correctly by Suse, so the
> volume cannot be decrypted and cannot be mounted.
> How can I create a udev rule that applies only to one LVM volume?
> 

You could match by NAME, for example something similar to:

KERNEL="dm*", ACTION="add|change", SUBSYSTEM="block", NAME="<name 
assigned earlier>", OWNER="<something>", GROUP="<something>", 
MODE=<something>

But for that to work, you need some earlier udev rule setting actual 
name - stock udev rules have no device-mapper rules. So it's up to your 
distro's rules or your own. Alternatively, you could just match by uuid:

ACTION!="add|change", GOTO="dm_end"
KERNEL!="dm*", GOTO="dm_end"

PROGRAM="/sbin/dmsetup info -c --noheadings -o uuid -j%M -m%m", 
ENV{DM_UUID}="%c"

ENV{DM_UUID}="<uuid of needed lvm volume>", OWNER=<something>, 
GROUP=<something>, MODE=<something>

LABEL="dm_end"

Then put it into some late-parsed udev rule. Note that uuid reported by 
dmsetup, will look like LVM-<vg uuid><lv uuid> without any dashes.

  reply	other threads:[~2008-12-15 11:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-15 10:20 udev lvm permisions Geert Geurts
2008-12-15 11:35 ` Michal Soltys [this message]
2008-12-15 14:23 ` Michal Soltys
2008-12-15 14:59 ` Kay Sievers
2008-12-15 15:24 ` Geert Geurts
2008-12-15 15:47 ` Kay Sievers
2008-12-15 15:55 ` Scott James Remnant
2008-12-15 16:13 ` Michal Soltys
2008-12-15 17:02 ` David Zeuthen
2008-12-15 17:06 ` Scott James Remnant
2008-12-15 17:12 ` David Zeuthen
2008-12-15 17:14 ` Kay Sievers
2008-12-15 17:18 ` Scott James Remnant
2008-12-15 17:19 ` Kay Sievers
2008-12-15 17:21 ` Geert Geurts
2008-12-15 17:37 ` Kay Sievers
2008-12-15 17:59 ` Scott James Remnant
2008-12-15 18:19 ` Kay Sievers
2008-12-15 18:21 ` Scott James Remnant
2008-12-15 18:38 ` Kay Sievers
2008-12-15 19:37 ` Alasdair G Kergon
2008-12-15 19:51 ` [lvm-devel] " Alasdair G Kergon
2008-12-15 20:14 ` David Zeuthen
2008-12-15 20:29 ` Alasdair G Kergon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=494640E4.6000005@ziu.info \
    --to=soltys@ziu.info \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).