summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/lvm2/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/lvm2/files')
-rw-r--r--meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch182
-rw-r--r--meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch79
-rw-r--r--meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch30
-rw-r--r--meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch30
-rw-r--r--meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch38
-rw-r--r--meta-oe/recipes-support/lvm2/files/lvm.conf326
6 files changed, 685 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch b/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch
new file mode 100644
index 000000000..e86ab25e6
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/0001-Avoid-bashisms-in-init-scripts.patch
@@ -0,0 +1,182 @@
1From 916ea0c70fd063ab7b81f16fd917a75dc02edf4f Mon Sep 17 00:00:00 2001
2From: Peter Kjellerstedt <pkj@axis.com>
3Date: Fri, 17 Mar 2017 03:18:28 +0100
4Subject: [PATCH] Avoid bashisms in init scripts
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
9---
10 scripts/blk_availability_init_red_hat.in | 4 ++--
11 scripts/clvmd_init_red_hat.in | 6 +++---
12 scripts/cmirrord_init_red_hat.in | 4 ++--
13 scripts/lvm2_cluster_activation_red_hat.sh.in | 4 ++--
14 scripts/lvm2_lvmetad_init_red_hat.in | 4 ++--
15 scripts/lvm2_lvmpolld_init_red_hat.in | 4 ++--
16 scripts/lvm2_monitoring_init_red_hat.in | 4 ++--
17 scripts/lvm2_monitoring_init_rhel4 | 4 ++--
18 8 files changed, 17 insertions(+), 17 deletions(-)
19
20diff --git a/scripts/blk_availability_init_red_hat.in b/scripts/blk_availability_init_red_hat.in
21index a84ffe7..6b855b7 100644
22--- a/scripts/blk_availability_init_red_hat.in
23+++ b/scripts/blk_availability_init_red_hat.in
24@@ -1,4 +1,4 @@
25-#!/bin/bash
26+#!/bin/sh
27 #
28 # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
29 #
30@@ -53,6 +53,6 @@ case "$1" in
31 status)
32 ;;
33 *)
34- echo $"Usage: $0 {start|stop|status}"
35+ echo "Usage: $0 {start|stop|status}"
36 ;;
37 esac
38diff --git a/scripts/clvmd_init_red_hat.in b/scripts/clvmd_init_red_hat.in
39index d7f3392..abc8011 100644
40--- a/scripts/clvmd_init_red_hat.in
41+++ b/scripts/clvmd_init_red_hat.in
42@@ -1,4 +1,4 @@
43-#!/bin/bash
44+#!/bin/sh
45 #
46 # clvmd - Clustered LVM Daemon init script
47 #
48@@ -161,7 +161,7 @@ restart() {
49 fi
50 }
51
52-[ "$EUID" != "0" ] && {
53+[ "$(id -u)" != "0" ] && {
54 echo "clvmd init script can only be executed as root user"
55 exit 4
56 }
57@@ -206,7 +206,7 @@ case "$1" in
58 ;;
59
60 *)
61- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
62+ echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
63 rtrn=2
64 ;;
65 esac
66diff --git a/scripts/cmirrord_init_red_hat.in b/scripts/cmirrord_init_red_hat.in
67index d4b7e37..d442cbc 100755
68--- a/scripts/cmirrord_init_red_hat.in
69+++ b/scripts/cmirrord_init_red_hat.in
70@@ -1,4 +1,4 @@
71-#!/bin/bash
72+#!/bin/sh
73 #
74 # chkconfig: - 22 78
75 # description: Starts and stops cmirrord
76@@ -101,7 +101,7 @@ case "$1" in
77 ;;
78
79 *)
80- echo $"Usage: $0 {start|stop|restart|status}"
81+ echo "Usage: $0 {start|stop|restart|status}"
82 ;;
83 esac
84
85diff --git a/scripts/lvm2_cluster_activation_red_hat.sh.in b/scripts/lvm2_cluster_activation_red_hat.sh.in
86index abea026..d8cba2e 100644
87--- a/scripts/lvm2_cluster_activation_red_hat.sh.in
88+++ b/scripts/lvm2_cluster_activation_red_hat.sh.in
89@@ -1,4 +1,4 @@
90-#!/bin/bash
91+#!/bin/sh
92
93 sbindir=@sbindir@
94
95@@ -54,7 +54,7 @@ case "$1" in
96 rtrn=$?
97 ;;
98 *)
99- echo $"Usage: $0 {activate|deactivate}"
100+ echo "Usage: $0 {activate|deactivate}"
101 rtrn=3
102 ;;
103 esac
104diff --git a/scripts/lvm2_lvmetad_init_red_hat.in b/scripts/lvm2_lvmetad_init_red_hat.in
105index b2f5d50..96269a9 100644
106--- a/scripts/lvm2_lvmetad_init_red_hat.in
107+++ b/scripts/lvm2_lvmetad_init_red_hat.in
108@@ -1,4 +1,4 @@
109-#!/bin/bash
110+#!/bin/sh
111 #
112 # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
113 #
114@@ -105,7 +105,7 @@ case "$1" in
115 ;;
116
117 *)
118- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
119+ echo "Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
120 ;;
121 esac
122
123diff --git a/scripts/lvm2_lvmpolld_init_red_hat.in b/scripts/lvm2_lvmpolld_init_red_hat.in
124index c521955..cdbaece 100644
125--- a/scripts/lvm2_lvmpolld_init_red_hat.in
126+++ b/scripts/lvm2_lvmpolld_init_red_hat.in
127@@ -1,4 +1,4 @@
128-#!/bin/bash
129+#!/bin/sh
130 #
131 # Copyright (C) 2015 Red Hat, Inc. All rights reserved.
132 #
133@@ -107,7 +107,7 @@ case "$1" in
134 ;;
135
136 *)
137- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
138+ echo "Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
139 ;;
140 esac
141
142diff --git a/scripts/lvm2_monitoring_init_red_hat.in b/scripts/lvm2_monitoring_init_red_hat.in
143index de7ff0d..9ff6bb7 100644
144--- a/scripts/lvm2_monitoring_init_red_hat.in
145+++ b/scripts/lvm2_monitoring_init_red_hat.in
146@@ -1,4 +1,4 @@
147-#!/bin/bash
148+#!/bin/sh
149 #
150 # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
151 #
152@@ -128,7 +128,7 @@ case "$1" in
153 ;;
154
155 *)
156- echo $"Usage: $0 {start|stop|restart|status|force-stop}"
157+ echo "Usage: $0 {start|stop|restart|status|force-stop}"
158 ;;
159 esac
160
161diff --git a/scripts/lvm2_monitoring_init_rhel4 b/scripts/lvm2_monitoring_init_rhel4
162index 8eb06c5..2e8d0f7 100644
163--- a/scripts/lvm2_monitoring_init_rhel4
164+++ b/scripts/lvm2_monitoring_init_rhel4
165@@ -1,4 +1,4 @@
166-#!/bin/bash
167+#!/bin/sh
168 #
169 # Copyright (C) 2007 Red Hat, Inc. All rights reserved.
170 #
171@@ -93,7 +93,7 @@ case "$1" in
172 ;;
173
174 *)
175- echo $"Usage: $0 {start|stop|restart|status|force-stop}"
176+ echo "Usage: $0 {start|stop|restart|status|force-stop}"
177 ;;
178 esac
179
180--
1812.12.0
182
diff --git a/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch b/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch
new file mode 100644
index 000000000..5d72402bd
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/0001-implement-libc-specific-reopen_stream.patch
@@ -0,0 +1,79 @@
1From e3103459416616d3b8508e7176e897b0ae6c90f2 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 25 Oct 2016 11:49:40 +0000
4Subject: [PATCH] implement libc specific reopen_stream
5
6musl defines stdin/stdio/stderr as constant types which means
7we can not assign to them as we are doing here but works ok with glibc
8therefore abstract out the _reopen_stream definition depending upon if
9we are using glibc or otherwise
10
11Origin:
12http://git.alpinelinux.org/cgit/aports/tree/main/lvm2/fix-stdio-usage.patch
13
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15Signed-off-by: Dengke Du <dengke.du@windriver.com>
16
17---
18 lib/log/log.c | 6 ++++++
19 tools/lvmcmdline.c | 6 +++---
20 2 files changed, 9 insertions(+), 3 deletions(-)
21
22diff --git a/lib/log/log.c b/lib/log/log.c
23index c933154..3581084 100644
24--- a/lib/log/log.c
25+++ b/lib/log/log.c
26@@ -161,6 +161,7 @@ static void _check_and_replace_standard_log_streams(FILE *old_stream, FILE *new_
27 * Close and reopen standard stream on file descriptor fd.
28 */
29 int reopen_standard_stream(FILE **stream, const char *mode)
30+#ifdef __GLIBC__
31 {
32 int fd, fd_copy, new_fd;
33 const char *name;
34@@ -207,6 +208,11 @@ int reopen_standard_stream(FILE **stream, const char *mode)
35 *stream = new_stream;
36 return 1;
37 }
38+#else
39+{
40+ return (freopen(NULL, mode, *stream) != NULL);
41+}
42+#endif
43
44 void init_log_fn(lvm2_log_fn_t log_fn)
45 {
46diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c
47index 9a4deb7..f1f18e6 100644
48--- a/tools/lvmcmdline.c
49+++ b/tools/lvmcmdline.c
50@@ -1818,7 +1818,7 @@ static int _check_standard_fds(void)
51 int err = is_valid_fd(STDERR_FILENO);
52
53 if (!is_valid_fd(STDIN_FILENO) &&
54- !(stdin = fopen(_PATH_DEVNULL, "r"))) {
55+ !freopen(_PATH_DEVNULL, "r", stdin)) {
56 if (err)
57 perror("stdin stream open");
58 else
59@@ -1828,7 +1828,7 @@ static int _check_standard_fds(void)
60 }
61
62 if (!is_valid_fd(STDOUT_FILENO) &&
63- !(stdout = fopen(_PATH_DEVNULL, "w"))) {
64+ !freopen(_PATH_DEVNULL, "w", stdout)) {
65 if (err)
66 perror("stdout stream open");
67 /* else no stdout */
68@@ -1836,7 +1836,7 @@ static int _check_standard_fds(void)
69 }
70
71 if (!is_valid_fd(STDERR_FILENO) &&
72- !(stderr = fopen(_PATH_DEVNULL, "w"))) {
73+ !freopen(_PATH_DEVNULL, "w", stderr)) {
74 printf("stderr stream open: %s\n",
75 strerror(errno));
76 return 0;
77--
782.12.0
79
diff --git a/meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch b/meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
new file mode 100644
index 000000000..95dcede33
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/0002-Guard-use-of-mallinfo-with-__GLIBC__.patch
@@ -0,0 +1,30 @@
1From 3ae9c0b607ec33fb07f32a41e9d28cc9068dd39a Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 25 Oct 2016 11:52:44 +0000
4Subject: [PATCH] Guard use of mallinfo() with __GLIBC__
5
6This API is glibc-only
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Signed-off-by: Dengke Du <dengke.du@windriver.com>
10
11---
12 lib/mm/memlock.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
16index da90144..f34f890 100644
17--- a/lib/mm/memlock.c
18+++ b/lib/mm/memlock.c
19@@ -150,7 +150,7 @@ static void _touch_memory(void *mem, size_t size)
20
21 static void _allocate_memory(void)
22 {
23-#ifndef VALGRIND_POOL
24+#if !defined(VALGRIND_POOL) && defined(__GLIBC__)
25 void *stack_mem;
26 struct rlimit limit;
27 int i, area = 0, missing = _size_malloc_tmp, max_areas = 32, hblks;
28--
292.12.0
30
diff --git a/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch b/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch
new file mode 100644
index 000000000..9ab1c06d2
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/0003-include-fcntl.h-for-O_-defines-and-fcntl-signature.patch
@@ -0,0 +1,30 @@
1From b1ad91a059d99afd1ce25823b7c0a8d3ac63d2fd Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 25 Oct 2016 11:55:49 +0000
4Subject: [PATCH 3/4] include fcntl.h for O_* defines and fcntl() signature
5
6On glibc _somehow_ this header gets pulled in indirectly
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9Signed-off-by: Dengke Du <dengke.du@windriver.com>
10---
11Upstream-Status: Pending
12---
13 libdaemon/server/daemon-server.c | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
17index 6af6de9..a9590e7 100644
18--- a/libdaemon/server/daemon-server.c
19+++ b/libdaemon/server/daemon-server.c
20@@ -18,6 +18,7 @@
21 #include "daemon-server.h"
22 #include "daemon-log.h"
23
24+#include <fcntl.h>
25 #include <dlfcn.h>
26 #include <errno.h>
27 #include <pthread.h>
28--
292.9.3
30
diff --git a/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch b/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch
new file mode 100644
index 000000000..aaeaa725d
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/0004-tweak-MODPROBE_CMD-for-cross-compile.patch
@@ -0,0 +1,38 @@
1From 0012ea63f6070a5d41fa380970f9c30b953237d2 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 25 Oct 2016 11:59:40 +0000
4Subject: [PATCH 4/4] tweak MODPROBE_CMD for cross compile
5
6Lvm uses variable MODPROBE_CMD at runtime, so build time detection of modprobe
7is incorrect.
8------
9|lvm lvcreate --thinpool wrl/pool00 --size 5556m --config devices
10{ preferred_names=["^/dev/mapper/", "^/dev/md/", "^/dev/sd"]
11filter=["r|/loop1$|","r|/loop2$|","r|/loop3$|","r|/loop4$|","r|/loop5$|","r|/loop6$|","r|/loop7$|"] }
12|tmp/sysroots/x86_64-linux/usr/bin/modprobe: execvp failed: No such file or directory
13|tmp/sysroots/x86_64-linux/usr/bin/modprobe failed: 2
14------
15
16Upstream-Status: Inappropriate [oe specific]
17
18Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19Signed-off-by: Dengke Du <dengke.du@windriver.com>
20---
21 configure.in | 1 -
22 1 file changed, 1 deletion(-)
23
24diff --git a/configure.in b/configure.in
25index cc77aab..a3579f2 100644
26--- a/configure.in
27+++ b/configure.in
28@@ -1853,7 +1853,6 @@ if test "$UDEV_SYNC" = yes; then
29 fi
30
31 ################################################################################
32-AC_PATH_TOOL(MODPROBE_CMD, modprobe)
33
34 if test -n "$MODPROBE_CMD"; then
35 AC_DEFINE_UNQUOTED([MODPROBE_CMD], ["$MODPROBE_CMD"], [The path to 'modprobe', if available.])
36--
372.9.3
38
diff --git a/meta-oe/recipes-support/lvm2/files/lvm.conf b/meta-oe/recipes-support/lvm2/files/lvm.conf
new file mode 100644
index 000000000..9e3b5fe29
--- /dev/null
+++ b/meta-oe/recipes-support/lvm2/files/lvm.conf
@@ -0,0 +1,326 @@
1# This is an example configuration file for the LVM2 system.
2# It contains the default settings that would be used if there was no
3# /etc/lvm/lvm.conf file.
4#
5# Refer to 'man lvm.conf' for further information including the file layout.
6#
7# To put this file in a different directory and override /etc/lvm set
8# the environment variable LVM_SYSTEM_DIR before running the tools.
9
10
11# This section allows you to configure which block devices should
12# be used by the LVM system.
13devices {
14
15 # Where do you want your volume groups to appear ?
16 dir = "/dev"
17
18 # An array of directories that contain the device nodes you wish
19 # to use with LVM2.
20 scan = [ "/dev" ]
21
22 # A filter that tells LVM2 to only use a restricted set of devices.
23 # The filter consists of an array of regular expressions. These
24 # expressions can be delimited by a character of your choice, and
25 # prefixed with either an 'a' (for accept) or 'r' (for reject).
26 # The first expression found to match a device name determines if
27 # the device will be accepted or rejected (ignored). Devices that
28 # don't match any patterns are accepted.
29
30 # Be careful if there there are symbolic links or multiple filesystem
31 # entries for the same device as each name is checked separately against
32 # the list of patterns. The effect is that if any name matches any 'a'
33 # pattern, the device is accepted; otherwise if any name matches any 'r'
34 # pattern it is rejected; otherwise it is accepted.
35
36 # Don't have more than one filter line active at once: only one gets used.
37
38 # Run vgscan after you change this parameter to ensure that
39 # the cache file gets regenerated (see below).
40 # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
41
42
43 # By default we accept every block device:
44 filter = [ "a/.*/" ]
45
46 # Exclude the cdrom drive
47 # filter = [ "r|/dev/cdrom|" ]
48
49 # When testing I like to work with just loopback devices:
50 # filter = [ "a/loop/", "r/.*/" ]
51
52 # Or maybe all loops and ide drives except hdc:
53 # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
54
55 # Use anchors if you want to be really specific
56 # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
57
58 # The results of the filtering are cached on disk to avoid
59 # rescanning dud devices (which can take a very long time). By
60 # default this cache file is hidden in the /etc/lvm directory.
61 # It is safe to delete this file: the tools regenerate it.
62 cache = "/etc/lvm/.cache"
63
64 # You can turn off writing this cache file by setting this to 0.
65 write_cache_state = 1
66
67 # Advanced settings.
68
69 # List of pairs of additional acceptable block device types found
70 # in /proc/devices with maximum (non-zero) number of partitions.
71 # types = [ "fd", 16 ]
72
73 # If sysfs is mounted (2.6 kernels) restrict device scanning to
74 # the block devices it believes are valid.
75 # 1 enables; 0 disables.
76 sysfs_scan = 1
77
78 # By default, LVM2 will ignore devices used as components of
79 # software RAID (md) devices by looking for md superblocks.
80 # 1 enables; 0 disables.
81 md_component_detection = 1
82}
83
84# This section that allows you to configure the nature of the
85# information that LVM2 reports.
86log {
87
88 # Controls the messages sent to stdout or stderr.
89 # There are three levels of verbosity, 3 being the most verbose.
90 verbose = 0
91
92 # Should we send log messages through syslog?
93 # 1 is yes; 0 is no.
94 syslog = 1
95
96 # Should we log error and debug messages to a file?
97 # By default there is no log file.
98 #file = "/var/log/lvm2.log"
99
100 # Should we overwrite the log file each time the program is run?
101 # By default we append.
102 overwrite = 0
103
104 # What level of log messages should we send to the log file and/or syslog?
105 # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
106 # 7 is the most verbose (LOG_DEBUG).
107 level = 0
108
109 # Format of output messages
110 # Whether or not (1 or 0) to indent messages according to their severity
111 indent = 1
112
113 # Whether or not (1 or 0) to display the command name on each line output
114 command_names = 0
115
116 # A prefix to use before the message text (but after the command name,
117 # if selected). Default is two spaces, so you can see/grep the severity
118 # of each message.
119 prefix = " "
120
121 # To make the messages look similar to the original LVM tools use:
122 # indent = 0
123 # command_names = 1
124 # prefix = " -- "
125
126 # Set this if you want log messages during activation.
127 # Don't use this in low memory situations (can deadlock).
128 # activation = 0
129}
130
131# Configuration of metadata backups and archiving. In LVM2 when we
132# talk about a 'backup' we mean making a copy of the metadata for the
133# *current* system. The 'archive' contains old metadata configurations.
134# Backups are stored in a human readeable text format.
135backup {
136
137 # Should we maintain a backup of the current metadata configuration ?
138 # Use 1 for Yes; 0 for No.
139 # Think very hard before turning this off!
140 backup = 1
141
142 # Where shall we keep it ?
143 # Remember to back up this directory regularly!
144 backup_dir = "/etc/lvm/backup"
145
146 # Should we maintain an archive of old metadata configurations.
147 # Use 1 for Yes; 0 for No.
148 # On by default. Think very hard before turning this off.
149 archive = 1
150
151 # Where should archived files go ?
152 # Remember to back up this directory regularly!
153 archive_dir = "/etc/lvm/archive"
154
155 # What is the minimum number of archive files you wish to keep ?
156 retain_min = 10
157
158 # What is the minimum time you wish to keep an archive file for ?
159 retain_days = 30
160}
161
162# Settings for the running LVM2 in shell (readline) mode.
163shell {
164
165 # Number of lines of history to store in ~/.lvm_history
166 history_size = 100
167}
168
169
170# Miscellaneous global LVM2 settings
171global {
172
173 # The file creation mask for any files and directories created.
174 # Interpreted as octal if the first digit is zero.
175 umask = 077
176
177 # Allow other users to read the files
178 #umask = 022
179
180 # Enabling test mode means that no changes to the on disk metadata
181 # will be made. Equivalent to having the -t option on every
182 # command. Defaults to off.
183 test = 0
184
185 # Whether or not to communicate with the kernel device-mapper.
186 # Set to 0 if you want to use the tools to manipulate LVM metadata
187 # without activating any logical volumes.
188 # If the device-mapper kernel driver is not present in your kernel
189 # setting this to 0 should suppress the error messages.
190 activation = 1
191
192 # If we can't communicate with device-mapper, should we try running
193 # the LVM1 tools?
194 # This option only applies to 2.4 kernels and is provided to help you
195 # switch between device-mapper kernels and LVM1 kernels.
196 # The LVM1 tools need to be installed with .lvm1 suffices
197 # e.g. vgscan.lvm1 and they will stop working after you start using
198 # the new lvm2 on-disk metadata format.
199 # The default value is set when the tools are built.
200 # fallback_to_lvm1 = 0
201
202 # The default metadata format that commands should use - "lvm1" or "lvm2".
203 # The command line override is -M1 or -M2.
204 # Defaults to "lvm1" if compiled in, else "lvm2".
205 # format = "lvm1"
206
207 # Location of proc filesystem
208 proc = "/proc"
209
210 # Type of locking to use. Defaults to file-based locking (1).
211 # Turn locking off by setting to 0 (dangerous: risks metadata corruption
212 # if LVM2 commands get run concurrently).
213 locking_type = 1
214
215 # Local non-LV directory that holds file-based locks while commands are
216 # in progress. A directory like /tmp that may get wiped on reboot is OK.
217 locking_dir = "/var/lock/lvm"
218
219 # Other entries can go here to allow you to load shared libraries
220 # e.g. if support for LVM1 metadata was compiled as a shared library use
221 # format_libraries = "liblvm2format1.so"
222 # Full pathnames can be given.
223
224 # Search this directory first for shared libraries.
225 # library_dir = "/lib"
226}
227
228activation {
229 # Device used in place of missing stripes if activating incomplete volume.
230 # For now, you need to set this up yourself first (e.g. with 'dmsetup')
231 # For example, you could make it return I/O errors using the 'error'
232 # target or make it return zeros.
233 missing_stripe_filler = "/dev/ioerror"
234
235 # Size (in KB) of each copy operation when mirroring
236 mirror_region_size = 512
237
238 # How much stack (in KB) to reserve for use while devices suspended
239 reserved_stack = 256
240
241 # How much memory (in KB) to reserve for use while devices suspended
242 reserved_memory = 8192
243
244 # Nice value used while devices suspended
245 process_priority = -18
246
247 # If volume_list is defined, each LV is only activated if there is a
248 # match against the list.
249 # "vgname" and "vgname/lvname" are matched exactly.
250 # "@tag" matches any tag set in the LV or VG.
251 # "@*" matches if any tag defined on the host is also set in the LV or VG
252 #
253 # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
254}
255
256
257####################
258# Advanced section #
259####################
260
261# Metadata settings
262#
263# metadata {
264 # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
265 # You might want to override it from the command line with 0
266 # when running pvcreate on new PVs which are to be added to large VGs.
267
268 # pvmetadatacopies = 1
269
270 # Approximate default size of on-disk metadata areas in sectors.
271 # You should increase this if you have large volume groups or
272 # you want to retain a large on-disk history of your metadata changes.
273
274 # pvmetadatasize = 255
275
276 # List of directories holding live copies of text format metadata.
277 # These directories must not be on logical volumes!
278 # It's possible to use LVM2 with a couple of directories here,
279 # preferably on different (non-LV) filesystems, and with no other
280 # on-disk metadata (pvmetadatacopies = 0). Or this can be in
281 # addition to on-disk metadata areas.
282 # The feature was originally added to simplify testing and is not
283 # supported under low memory situations - the machine could lock up.
284 #
285 # Never edit any files in these directories by hand unless you
286 # you are absolutely sure you know what you are doing! Use
287 # the supplied toolset to make changes (e.g. vgcfgrestore).
288
289 # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
290#}
291
292# Event daemon
293#
294dmeventd {
295 # mirror_library is the library used when monitoring a mirror device.
296 #
297 # "libdevmapper-event-lvm2mirror.so" attempts to recover from
298 # failures. It removes failed devices from a volume group and
299 # reconfigures a mirror as necessary. If no mirror library is
300 # provided, mirrors are not monitored through dmeventd.
301
302 mirror_library = "@libdir@/device-mapper/libdevmapper-event-lvm2mirror.so"
303
304 # snapshot_library is the library used when monitoring a snapshot device.
305 #
306 # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
307 # snapshots and emits a warning through syslog when the use of
308 # the snapshot exceeds 80%. The warning is repeated when 85%, 90% and
309 # 95% of the snapshot is filled.
310
311 snapshot_library = "@libdir@/device-mapper/libdevmapper-event-lvm2snapshot.so"
312
313 # thin_library is the library used when monitoring a thin device.
314 #
315 # "libdevmapper-event-lvm2thin.so" monitors the filling of
316 # pool and emits a warning through syslog when the use of
317 # the pool exceeds 80%. The warning is repeated when 85%, 90% and
318 # 95% of the pool is filled.
319
320 thin_library = "@libdir@/device-mapper/libdevmapper-event-lvm2thin.so"
321
322 # Full path of the dmeventd binary.
323 #
324 # executable = "@DMEVENTD_PATH@"
325}
326