summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2009-09-23 12:52:52 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2009-09-23 12:52:52 +0000
commit6c7bde0bba30de88774757615de3482f71e066b1 (patch)
tree67b8ef7d714c67002dfefa588817b87c73ce16e1
parent3c74075fb13ed8adb06ced45a707be3f24ea958f (diff)
downloadlvm2-6c7bde0bba30de88774757615de3482f71e066b1.tar.gz
lvm2-6c7bde0bba30de88774757615de3482f71e066b1.tar.xz
lvm2-6c7bde0bba30de88774757615de3482f71e066b1.zip
Add more hints in 12-dm-permissions.rules. Add 'dmsetup splitname' and 'y|--yes' to dmsetup manpage.
-rw-r--r--man/dmsetup.8.in13
-rw-r--r--udev/12-dm-permissions.rules53
2 files changed, 64 insertions, 2 deletions
diff --git a/man/dmsetup.8.in b/man/dmsetup.8.in
index b7eba639..934372e5 100644
--- a/man/dmsetup.8.in
+++ b/man/dmsetup.8.in
@@ -78,6 +78,10 @@ dmsetup \- low level logical volume management
.B dmsetup setgeometry
.I device_name cyl head sect start
.br
+.B dmsetup splitname
+.I device_name
+.I [subsystem]
+.br
.B devmap_name
.I major minor
@@ -138,6 +142,9 @@ Specify a one-line table directly on the command line.
.IP \fB-u|--uuid
.br
Specify the uuid.
+.IP \fB-y|--yes
+.br
+Answer yes to all prompts automatically.
.IP \fB-v|--verbose\ [-v|--verbose]
.br
Produce additional output.
@@ -260,6 +267,12 @@ Postponed I/O then gets re-queued for processing.
.I device_name cyl head sect start
.br
Sets the device geometry to C/H/S.
+.IP \fBsplitname
+.I device_name
+.I [subsystem]
+.br
+Splits given device name into subsystem constituents.
+Default subsystem is LVM.
.IP \fBstatus
.I [--target target_type]
.I [device_name]
diff --git a/udev/12-dm-permissions.rules b/udev/12-dm-permissions.rules
index de568b63..cc3e4cfd 100644
--- a/udev/12-dm-permissions.rules
+++ b/udev/12-dm-permissions.rules
@@ -20,7 +20,56 @@ KERNEL!="dm-[0-9]*", GOTO="dm_end"
ACTION!="change", GOTO="dm_end"
ENV{DM_UDEV_RULES_VSN}!="?*", GOTO="dm_end"
-# Just an example...
-# ENV{DM_NAME}=="my_device", OWNER:="peter", GROUP:="peter", MODE:="644"
+# A few demonstrational examples...
+
+
+# PLAIN DM DEVICES
+#
+# Set permissions for a DM device named 'my_device' exactly
+# ENV{DM_NAME}=="my_device", OWNER:="root", GROUP:="root", MODE:="660"
+
+# Set permissions for all DM devices having 'MY_UUID-' UUID prefix
+# ENV{DM_UUID}=="MY_UUID-?*", OWNER:="root", GROUP:="root", MODE:="660"
+
+
+# LVM DEVICES
+#
+# Set permissions for all LVM devices
+# ENV{DM_UUID}=="LVM-?*", OWNER:="root", GROUP:="root", MODE:="660"
+
+# Set permissions for all devices that belong to one LVM VG
+# ENV{DM_VG_NAME}=="VolGroup00", OWNER:="root", GROUP:="root", MODE:="660"
+
+# Set permissions for an LVM device with VG named VolGroup00 and LV named LogVol00 exactly
+# ENV{DM_VG_NAME}=="VolGroup00", ENV{DM_LV_NAME}=="LogVol00", OWNER:="root", GROUP:="root", MODE:="660"
+
+# Set permissions for all LVM devices that does not belong to a VG named VolGroup00
+# ENV{DM_VG_NAME}!="VolGroup00", OWNER:="root", GROUP:="root", MODE:="660"
+
+
+# ENCRYPTED DEVICES (using cryptsetup >= 1.1)
+#
+# Set permissions for all encrypted devices created by cryptsetup (plain devices)
+# ENV{DM_UUID}=="CRYPT-PLAIN-?*", OWNER:="root", GROUP:="root", MODE:="660"
+
+# Set permissions for all encrypted devices created by cryptsetup (LUKS extension)
+# ENV{DM_UUID}=="CRYPT-LUKS1-?*", OWNER:="root", GROUP:="root", MODE:="660"
+
+# Set permissions for an encrypted device created by cryptsetup and having an exact luks UUID
+# ENV{DM_UUID}=="CRYPT-LUKS1-22fce5c8313c43c68d84b50a3b0fee78-?*", OWNER:="root", GROUP:="root", MODE:="660"
+
+
+# MULTIPATH DEVICES
+#
+# Set permissions for all multipath devices
+# ENV{DM_UUID}=="mpath-?*", OWNER:="root", GROUP:="root", MODE:="660"
+
+# Set permissions for first two partitions created on a multipath device (and detected by kpartx)
+# ENV{DM_UUID}=="part[1-2]-mpath-?*", OWNER:="root", GROUP:="root", MODE:="660"
+
+
+# ...you can use any combination of the comparisons with the environment variables
+# listed at the beginning of this file (udev provides simple pattern matching by
+# using *, ? and [] that you can use, see 'man udev' for more information).
LABEL="dm_end"