-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlvm2-set-default-global_filter.patch
45 lines (43 loc) · 2.33 KB
/
lvm2-set-default-global_filter.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/conf/example.conf.in b/conf/example.conf.in
index a29caf3..84404df 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -164,7 +164,16 @@ devices {
# The syntax is the same as devices/filter. Devices rejected by
# global_filter are not opened by LVM.
# This configuration option has an automatic default value.
- # global_filter = [ "a|.*|" ]
+ # global_filter = [ "a|^/dev/disk/by-id/dm-uuid-CRYPT-LUKS[12]-|",
+ # "a|^/dev/nvme[0-9]+n[0-9]+(p[0-9]+)?$|",
+ # "a|^/dev/sd[a-z]+[0-9]*$|",
+ # "a|^/dev/md[0-9]+(p[0-9]+)?$|",
+ # "r|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-qubes|",
+ # "r|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-vm|",
+ # "r|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-.*@crypt$|",
+ # "a|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-trusted-crypt-|",
+ # "a|^/dev/loop[0-9]+p[0-9]+$|",
+ # "r|.*|" ]
# Configuration option devices/types.
# List of additional acceptable block device types.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index f280156..90231a3 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -317,7 +317,17 @@ cfg_array(devices_filter_CFG, "filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENT
"filter = [ \"a|^/dev/hda8$|\", \"r|.*|\" ]\n"
"#\n")
-cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#Sa|.*|", vsn(2, 2, 98), NULL, 0, NULL,
+cfg_array(devices_global_filter_CFG, "global_filter", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING,
+ "#Sa|^/dev/disk/by-id/dm-uuid-CRYPT-LUKS[12]-|"
+ "#Sa|^/dev/nvme[0-9]+n[0-9]+(p[0-9]+)?$|"
+ "#Sa|^/dev/sd[a-z]+[0-9]*$|"
+ "#Sa|^/dev/md[0-9]+(p[0-9]+)?$|"
+ "#Sr|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-qubes|"
+ "#Sr|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-vm|"
+ "#Sr|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-.*@crypt$|"
+ "#Sa|^/dev/disk/by-id/dm-uuid-CRYPT-PLAIN-trusted-crypt-|"
+ "#Sa|^/dev/loop[0-9]+p[0-9]+$|"
+ "#Sr|.*|", vsn(2, 2, 98), NULL, 0, NULL,
"Limit the block devices that are used by LVM system components.\n"
"Because devices/filter may be overridden from the command line, it is\n"
"not suitable for system-wide device filtering, e.g. udev.\n"