main - man: Fix wording in lvmthin(7)
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3bea8937334ab9a7852...
Commit: 3bea8937334ab9a7852947a30862d6e457f093b6
Parent: f5fbb1b76fc39fe968d847247b9040ff2acbadcc
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri Mar 5 12:49:54 2021 +0100
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri Mar 5 12:49:54 2021 +0100
man: Fix wording in lvmthin(7)
---
man/lvmthin.7_main | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/lvmthin.7_main b/man/lvmthin.7_main
index 3ce34a5ee..9568eca41 100644
--- a/man/lvmthin.7_main
+++ b/man/lvmthin.7_main
@@ -443,12 +443,12 @@ If the repair works, the thin pool LV and its thin LVs can be activated.
User should manually check if repaired thin pool kernel metadata
has all data for all lvm2 known LVs by individual activation of
every thin LV. When all works, user should continue with fsck of
-all filesystems present these such volumes.
+all filesystems present on these volumes.
Once the thin pool is considered fully functional user may remove ThinPoolLV_metaN
(the LV containing the damaged thin pool metadata) for possible
space reuse.
For a better performance it may be useful to pvmove the new repaired metadata LV
-(written to previous pmspare volume) to a better PV (i.e. SSD)
+(written to previous pmspare volume) to a faster PV, e.g. SSD.
If the repair operation fails, the thin pool LV and its thin LVs
are not accessible and it may be necessary to restore their content
3 years, 1 month
main - lvmlockctl: replace popen and system
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f5fbb1b76fc39fe968d...
Commit: f5fbb1b76fc39fe968d847247b9040ff2acbadcc
Parent: 89a3440fc0179318954855aa251b0aae4f5c1a63
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Mar 3 17:36:42 2021 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Mar 3 17:43:29 2021 -0600
lvmlockctl: replace popen and system
with fork and exec to avoid use of shell.
largely copied from lib/misc/lvm-exec.c
require lvmlockctl_kill_command to be full path
use lvm config instead of lvmconfig to avoid need for LVM_DIR
---
configure | 3 -
configure.ac | 2 -
daemons/lvmlockd/lvmlockctl.c | 241 +++++++++++++++++++++++++++++++++++++++---
include/configure.h.in | 3 -
4 files changed, 228 insertions(+), 21 deletions(-)
diff --git a/configure b/configure
index b84a20144..4c38cbebb 100755
--- a/configure
+++ b/configure
@@ -693,7 +693,6 @@ MANGLING
LVM_RELEASE_DATE
LVM_RELEASE
LVM_PATH
-LVM_DIR
LVM_PATCHLEVEL
LVM_MINOR
LVM_MAJOR
@@ -13767,11 +13766,9 @@ SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
SBINDIR="$(eval echo $(eval echo $sbindir))"
LVM_PATH="$SBINDIR/lvm"
-LVM_DIR="$SBINDIR/"
cat >>confdefs.h <<_ACEOF
#define LVM_PATH "$LVM_PATH"
-#define LVM_DIR "$LVM_DIR"
_ACEOF
diff --git a/configure.ac b/configure.ac
index 93f91384d..ee21b879d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1607,9 +1607,7 @@ SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
SBINDIR="$(eval echo $(eval echo $sbindir))"
LVM_PATH="$SBINDIR/lvm"
-LVM_DIR="$SBINDIR/"
AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.])
-AC_DEFINE_UNQUOTED(LVM_DIR, ["$LVM_DIR"], [Path to lvm binary dir.])
LVMCONFIG_PATH="$SBINDIR/lvmconfig"
AC_DEFINE_UNQUOTED(LVMCONFIG_PATH, ["$LVMCONFIG_PATH"], [Path to lvmconfig binary.])
diff --git a/daemons/lvmlockd/lvmlockctl.c b/daemons/lvmlockd/lvmlockctl.c
index 34ae081ad..350e78e9a 100644
--- a/daemons/lvmlockd/lvmlockctl.c
+++ b/daemons/lvmlockd/lvmlockctl.c
@@ -18,8 +18,11 @@
#include <errno.h>
#include <fcntl.h>
#include <syslog.h>
+#include <ctype.h>
#include <sys/socket.h>
#include <sys/un.h>
+#include <unistd.h>
+#include <sys/wait.h>
static int quit = 0;
static int info = 0;
@@ -519,24 +522,224 @@ static int do_stop_lockspaces(void)
return rv;
}
+static int _reopen_fd_to_null(int fd)
+{
+ int null_fd;
+ int r = 0;
+
+ if ((null_fd = open("/dev/null", O_RDWR)) == -1) {
+ log_error("open error /dev/null %d", errno);
+ return 0;
+ }
+
+ if (close(fd)) {
+ log_error("close error fd %d %d", fd, errno);
+ goto out;
+ }
+
+ if (dup2(null_fd, fd) == -1) {
+ log_error("dup2 error %d", errno);
+ goto out;
+ }
+
+ r = 1;
+out:
+ if (close(null_fd)) {
+ log_error("close error fd %d %d", null_fd, errno);
+ return 0;
+ }
+
+ return r;
+}
+
+#define MAX_AV_COUNT 32
+#define ONE_ARG_LEN 1024
+
+static void _run_command_pipe(const char *cmd_str, pid_t *pid_out, FILE **fp_out)
+{
+ char arg[ONE_ARG_LEN];
+ char *av[MAX_AV_COUNT + 1]; /* +1 for NULL */
+ char *arg_dup;
+ int av_count = 0;
+ int cmd_len;
+ int arg_len;
+ pid_t pid = 0;
+ FILE *fp = NULL;
+ int pipefd[2];
+ int i;
+
+ for (i = 0; i < MAX_AV_COUNT + 1; i++)
+ av[i] = NULL;
+
+ cmd_len = strlen(cmd_str);
+
+ memset(&arg, 0, sizeof(arg));
+ arg_len = 0;
+
+ for (i = 0; i < cmd_len; i++) {
+ if (!cmd_str[i])
+ break;
+
+ if (av_count == MAX_AV_COUNT)
+ goto out;
+
+ if (cmd_str[i] == '\\') {
+ if (i == (cmd_len - 1))
+ break;
+ i++;
+
+ if (cmd_str[i] == '\\') {
+ arg[arg_len++] = cmd_str[i];
+ continue;
+ }
+ if (isspace(cmd_str[i])) {
+ arg[arg_len++] = cmd_str[i];
+ continue;
+ } else {
+ break;
+ }
+ }
+
+ if (isalnum(cmd_str[i]) || ispunct(cmd_str[i])) {
+ arg[arg_len++] = cmd_str[i];
+ } else if (isspace(cmd_str[i])) {
+ if (arg_len) {
+ if (!(arg_dup = strdup(arg)))
+ goto out;
+ av[av_count++] = arg_dup;
+ }
+
+ memset(arg, 0, sizeof(arg));
+ arg_len = 0;
+ } else {
+ break;
+ }
+ }
+
+ if (arg_len) {
+ if (av_count >= MAX_AV_COUNT)
+ goto out;
+ if (!(arg_dup = strdup(arg)))
+ goto out;
+ av[av_count++] = arg_dup;
+ }
+
+ if (pipe(pipefd)) {
+ log_error("pipe error %d", errno);
+ goto out;
+ }
+
+ pid = fork();
+
+ if (pid < 0) {
+ log_error("fork error %d", errno);
+ pid = 0;
+ goto out;
+ }
+
+ if (pid == 0) {
+ /* Child -> writer, convert pipe[0] to STDOUT */
+ if (!_reopen_fd_to_null(STDIN_FILENO))
+ log_error("reopen STDIN error");
+ else if (close(pipefd[0 /*read*/]))
+ log_error("close error pipe[0] %d", errno);
+ else if (close(STDOUT_FILENO))
+ log_error("close error STDOUT %d", errno);
+ else if (dup2(pipefd[1 /*write*/], STDOUT_FILENO) == -1)
+ log_error("dup2 error STDOUT %d", errno);
+ else if (close(pipefd[1]))
+ log_error("close error pipe[1] %d", errno);
+ else {
+ execvp(av[0], av);
+ log_error("execvp error %d", errno);
+ }
+ _exit(errno);
+ }
+
+ /* Parent -> reader */
+ if (close(pipefd[1 /*write*/]))
+ log_error("close error STDOUT %d", errno);
+
+ if (!(fp = fdopen(pipefd[0 /*read*/], "r"))) {
+ log_error("fdopen STDIN error %d", errno);
+ if (close(pipefd[0]))
+ log_error("close error STDIN %d", errno);
+ }
+
+ out:
+ for (i = 0; i < MAX_AV_COUNT + 1; i++)
+ free(av[i]);
+
+ *pid_out = pid;
+ *fp_out = fp;
+}
+
+/* Returns -1 on error, 0 on success. */
+
+static int _close_command_pipe(pid_t pid, FILE *fp)
+{
+ int status, estatus;
+ int ret = -1;
+
+ if (waitpid(pid, &status, 0) != pid) {
+ log_error("waitpid error pid %d %d", pid, errno);
+ goto out;
+ }
+
+ if (WIFEXITED(status)) {
+ /* pid exited with an exit code */
+ estatus = WEXITSTATUS(status);
+
+ /* exit status 0: child success */
+ if (!estatus) {
+ ret = 0;
+ goto out;
+ }
+
+ /* exit status not zero: child error */
+ log_error("child exit error %d", estatus);
+ goto out;
+ }
+
+ if (WIFSIGNALED(status)) {
+ /* pid terminated due to a signal */
+ log_error("child exit from signal");
+ goto out;
+ }
+
+ log_error("child exit problem");
+
+out:
+ if (fp && fclose(fp))
+ log_error("fclose error STDIN %d", errno);
+ return ret;
+}
+
/* Returns -1 on error, 0 on success. */
static int _get_kill_command(char *kill_cmd)
{
- char config_cmd[PATH_MAX] = { 0 };
+ char config_cmd[PATH_MAX + 128] = { 0 };
char config_val[1024] = { 0 };
char line[PATH_MAX] = { 0 };
- char type[4] = { 0 };
- FILE *fp;
+ pid_t pid = 0;
+ FILE *fp = NULL;
- snprintf(config_cmd, PATH_MAX, "%s/lvmconfig --typeconfig full global/lvmlockctl_kill_command", LVM_DIR);
- type[0] = 'r';
+ snprintf(config_cmd, PATH_MAX, "%s config --typeconfig full global/lvmlockctl_kill_command", LVM_PATH);
- if (!(fp = popen(config_cmd, type))) {
+ _run_command_pipe(config_cmd, &pid, &fp);
+
+ if (!pid) {
log_error("failed to run %s", config_cmd);
return -1;
}
+ if (!fp) {
+ log_error("failed to get output %s", config_cmd);
+ _close_command_pipe(pid, fp);
+ return -1;
+ }
+
if (!fgets(line, sizeof(line), fp)) {
log_error("no output from %s", config_cmd);
goto bad;
@@ -552,14 +755,20 @@ static int _get_kill_command(char *kill_cmd)
goto bad;
}
+ if (config_val[0] != '/') {
+ log_error("lvmlockctl_kill_command must be full path");
+ goto bad;
+ }
+
printf("Found lvmlockctl_kill_command: %s\n", config_val);
snprintf(kill_cmd, PATH_MAX, "%s %s", config_val, arg_vg_name);
+ kill_cmd[PATH_MAX-1] = '\0';
- pclose(fp);
+ _close_command_pipe(pid, fp);
return 0;
bad:
- pclose(fp);
+ _close_command_pipe(pid, fp);
return -1;
}
@@ -567,14 +776,20 @@ bad:
static int _run_kill_command(char *kill_cmd)
{
- int status;
+ pid_t pid = 0;
+ FILE *fp = NULL;
+ int rv;
- status = system(kill_cmd);
+ _run_command_pipe(kill_cmd, &pid, &fp);
+ rv = _close_command_pipe(pid, fp);
- if (!WEXITSTATUS(status))
- return 0;
+ if (!pid)
+ return -1;
- return -1;
+ if (rv < 0)
+ return -1;
+
+ return 0;
}
static int do_drop(void)
diff --git a/include/configure.h.in b/include/configure.h.in
index 2597651e3..59b4da86f 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -586,9 +586,6 @@
/* Path to lvm binary. */
#undef LVM_PATH
-/* Path to lvm binary dir. */
-#undef LVM_DIR
-
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
*/
#undef MAJOR_IN_MKDEV
3 years, 1 month
main - lvmlockctl: use lvm.conf lvmlockctl_kill_command
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=89a3440fc0179318954...
Commit: 89a3440fc0179318954855aa251b0aae4f5c1a63
Parent: e9d10f371199055e9ed0c2715b5353491cb759b0
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Mon Mar 1 15:22:54 2021 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Mar 3 13:57:15 2021 -0600
lvmlockctl: use lvm.conf lvmlockctl_kill_command
which specifies a command to run by lvmlockctl --kill.
---
configure | 3 +
configure.ac | 2 +
daemons/lvmlockd/lvmlockctl.c | 197 +++++++++++++++++++++++++++++++++---------
include/configure.h.in | 3 +
lib/config/config_settings.h | 9 ++
man/lvmlockctl.8_main | 14 +--
6 files changed, 180 insertions(+), 48 deletions(-)
diff --git a/configure b/configure
index 4c38cbebb..b84a20144 100755
--- a/configure
+++ b/configure
@@ -693,6 +693,7 @@ MANGLING
LVM_RELEASE_DATE
LVM_RELEASE
LVM_PATH
+LVM_DIR
LVM_PATCHLEVEL
LVM_MINOR
LVM_MAJOR
@@ -13766,9 +13767,11 @@ SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
SBINDIR="$(eval echo $(eval echo $sbindir))"
LVM_PATH="$SBINDIR/lvm"
+LVM_DIR="$SBINDIR/"
cat >>confdefs.h <<_ACEOF
#define LVM_PATH "$LVM_PATH"
+#define LVM_DIR "$LVM_DIR"
_ACEOF
diff --git a/configure.ac b/configure.ac
index ee21b879d..93f91384d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1607,7 +1607,9 @@ SYSCONFDIR="$(eval echo $(eval echo $sysconfdir))"
SBINDIR="$(eval echo $(eval echo $sbindir))"
LVM_PATH="$SBINDIR/lvm"
+LVM_DIR="$SBINDIR/"
AC_DEFINE_UNQUOTED(LVM_PATH, ["$LVM_PATH"], [Path to lvm binary.])
+AC_DEFINE_UNQUOTED(LVM_DIR, ["$LVM_DIR"], [Path to lvm binary dir.])
LVMCONFIG_PATH="$SBINDIR/lvmconfig"
AC_DEFINE_UNQUOTED(LVMCONFIG_PATH, ["$LVMCONFIG_PATH"], [Path to lvmconfig binary.])
diff --git a/daemons/lvmlockd/lvmlockctl.c b/daemons/lvmlockd/lvmlockctl.c
index c2a998c8c..34ae081ad 100644
--- a/daemons/lvmlockd/lvmlockctl.c
+++ b/daemons/lvmlockd/lvmlockctl.c
@@ -30,6 +30,7 @@ static int kill_vg = 0;
static int drop_vg = 0;
static int gl_enable = 0;
static int gl_disable = 0;
+static int use_stderr = 0;
static int stop_lockspaces = 0;
static char *arg_vg_name = NULL;
@@ -47,6 +48,22 @@ do { \
printf(fmt "\n", ##args); \
} while (0)
+#define log_sys_emerg(fmt, args...) \
+do { \
+ if (use_stderr) \
+ fprintf(stderr, fmt "\n", ##args); \
+ else \
+ syslog(LOG_EMERG, fmt, ##args); \
+} while (0)
+
+#define log_sys_warn(fmt, args...) \
+do { \
+ if (use_stderr) \
+ fprintf(stderr, fmt "\n", ##args); \
+ else \
+ syslog(LOG_WARNING, fmt, ##args); \
+} while (0)
+
#define MAX_LINE 512
/* copied from lvmlockd-internal.h */
@@ -502,25 +519,82 @@ static int do_stop_lockspaces(void)
return rv;
}
-static int do_kill(void)
+/* Returns -1 on error, 0 on success. */
+
+static int _get_kill_command(char *kill_cmd)
+{
+ char config_cmd[PATH_MAX] = { 0 };
+ char config_val[1024] = { 0 };
+ char line[PATH_MAX] = { 0 };
+ char type[4] = { 0 };
+ FILE *fp;
+
+ snprintf(config_cmd, PATH_MAX, "%s/lvmconfig --typeconfig full global/lvmlockctl_kill_command", LVM_DIR);
+ type[0] = 'r';
+
+ if (!(fp = popen(config_cmd, type))) {
+ log_error("failed to run %s", config_cmd);
+ return -1;
+ }
+
+ if (!fgets(line, sizeof(line), fp)) {
+ log_error("no output from %s", config_cmd);
+ goto bad;
+ }
+
+ if (sscanf(line, "lvmlockctl_kill_command=\"%256[^\n\"]\"", config_val) != 1) {
+ log_error("unrecognized config value from %s", config_cmd);
+ goto bad;
+ }
+
+ if (!config_val[0] || (config_val[0] == ' ')) {
+ log_error("invalid config value from %s", config_cmd);
+ goto bad;
+ }
+
+ printf("Found lvmlockctl_kill_command: %s\n", config_val);
+
+ snprintf(kill_cmd, PATH_MAX, "%s %s", config_val, arg_vg_name);
+
+ pclose(fp);
+ return 0;
+bad:
+ pclose(fp);
+ return -1;
+}
+
+/* Returns -1 on error, 0 on success. */
+
+static int _run_kill_command(char *kill_cmd)
+{
+ int status;
+
+ status = system(kill_cmd);
+
+ if (!WEXITSTATUS(status))
+ return 0;
+
+ return -1;
+}
+
+static int do_drop(void)
{
daemon_reply reply;
int result;
int rv;
- syslog(LOG_EMERG, "Lost access to sanlock lease storage in VG %s.", arg_vg_name);
- /* These two lines explain the manual alternative to the FIXME below. */
- syslog(LOG_EMERG, "Immediately deactivate LVs in VG %s.", arg_vg_name);
- syslog(LOG_EMERG, "Once VG is unused, run lvmlockctl --drop %s.", arg_vg_name);
+ log_sys_warn("Dropping locks for VG %s.", arg_vg_name);
/*
- * It may not be strictly necessary to notify lvmlockd of the kill, but
- * lvmlockd can use this information to avoid attempting any new lock
- * requests in the VG (which would fail anyway), and can return an
- * error indicating that the VG has been killed.
+ * Check for misuse by looking for any active LVs in the VG
+ * and refusing this operation if found? One possible way
+ * to kill LVs (e.g. if fs cannot be unmounted) is to suspend
+ * them, or replace them with the error target. In that
+ * case the LV will still appear to be active, but it is
+ * safe to release the lock.
*/
- reply = _lvmlockd_send("kill_vg",
+ reply = _lvmlockd_send("drop_vg",
"cmd = %s", "lvmlockctl",
"pid = " FMTd64, (int64_t) getpid(),
"vg_name = %s", arg_vg_name,
@@ -534,52 +608,84 @@ static int do_kill(void)
}
daemon_reply_destroy(reply);
-
- /*
- * FIXME: here is where we should implement a strong form of
- * blkdeactivate, and if it completes successfully, automatically call
- * do_drop() afterward. (The drop step may not always be necessary
- * if the lvm commands run while shutting things down release all the
- * leases.)
- *
- * run_strong_blkdeactivate();
- * do_drop();
- */
-
return rv;
}
-static int do_drop(void)
+static int do_kill(void)
{
+ char kill_cmd[PATH_MAX] = { 0 };
daemon_reply reply;
+ int no_kill_command = 0;
int result;
int rv;
- syslog(LOG_WARNING, "Dropping locks for VG %s.", arg_vg_name);
+ log_sys_emerg("lvmlockd lost access to locks in VG %s.", arg_vg_name);
+
+ rv = _get_kill_command(kill_cmd);
+ if (rv < 0) {
+ log_sys_emerg("Immediately deactivate LVs in VG %s.", arg_vg_name);
+ log_sys_emerg("Once VG is unused, run lvmlockctl --drop %s.", arg_vg_name);
+ no_kill_command = 1;
+ }
/*
- * Check for misuse by looking for any active LVs in the VG
- * and refusing this operation if found? One possible way
- * to kill LVs (e.g. if fs cannot be unmounted) is to suspend
- * them, or replace them with the error target. In that
- * case the LV will still appear to be active, but it is
- * safe to release the lock.
+ * It may not be strictly necessary to notify lvmlockd of the kill, but
+ * lvmlockd can use this information to avoid attempting any new lock
+ * requests in the VG (which would fail anyway), and can return an
+ * error indicating that the VG has been killed.
*/
+ _lvmlockd = lvmlockd_open(NULL);
+ if (_lvmlockd.socket_fd < 0 || _lvmlockd.error) {
+ log_error("Cannot connect to lvmlockd for kill_vg.");
+ goto run;
+ }
+ reply = _lvmlockd_send("kill_vg",
+ "cmd = %s", "lvmlockctl",
+ "pid = " FMTd64, (int64_t) getpid(),
+ "vg_name = %s", arg_vg_name,
+ NULL);
+ if (!_lvmlockd_result(reply, &result))
+ log_error("lvmlockd result %d kill_vg", result);
+ daemon_reply_destroy(reply);
+ lvmlockd_close(_lvmlockd);
+ run:
+ if (no_kill_command)
+ return 0;
+
+ rv = _run_kill_command(kill_cmd);
+ if (rv < 0) {
+ log_sys_emerg("Failed to run VG %s kill command %s", arg_vg_name, kill_cmd);
+ log_sys_emerg("Immediately deactivate LVs in VG %s.", arg_vg_name);
+ log_sys_emerg("Once VG is unused, run lvmlockctl --drop %s.", arg_vg_name);
+ return -1;
+ }
+
+ log_sys_warn("Successful VG %s kill command %s", arg_vg_name, kill_cmd);
+
+ /*
+ * If kill command was successfully, call do_drop(). (The drop step
+ * may not always be necessary if the lvm commands run while shutting
+ * things down release all the leases.)
+ */
+ rv = 0;
+ _lvmlockd = lvmlockd_open(NULL);
+ if (_lvmlockd.socket_fd < 0 || _lvmlockd.error) {
+ log_sys_emerg("Failed to connect to lvmlockd to drop locks in VG %s.", arg_vg_name);
+ return -1;
+ }
reply = _lvmlockd_send("drop_vg",
"cmd = %s", "lvmlockctl",
"pid = " FMTd64, (int64_t) getpid(),
"vg_name = %s", arg_vg_name,
NULL);
-
if (!_lvmlockd_result(reply, &result)) {
- log_error("lvmlockd result %d", result);
+ log_sys_emerg("Failed to drop locks in VG %s", arg_vg_name);
rv = result;
- } else {
- rv = 0;
}
-
daemon_reply_destroy(reply);
+ lvmlockd_close(_lvmlockd);
+
return rv;
}
@@ -600,7 +706,7 @@ static void print_usage(void)
printf("--force | -f 0|1>\n");
printf(" Force option for other commands.\n");
printf("--kill | -k <vgname>\n");
- printf(" Kill access to the VG when sanlock cannot renew lease.\n");
+ printf(" Kill access to the VG locks are lost (see lvmlockctl_kill_command).\n");
printf("--drop | -r <vgname>\n");
printf(" Clear locks for the VG when it is unused after kill (-k).\n");
printf("--gl-enable | -E <vgname>\n");
@@ -609,6 +715,8 @@ static void print_usage(void)
printf(" Tell lvmlockd to disable the global lock in a sanlock VG.\n");
printf("--stop-lockspaces | -S\n");
printf(" Stop all lockspaces.\n");
+ printf("--stderr | -e\n");
+ printf(" Send kill and drop messages to stderr instead of syslog\n");
}
static int read_options(int argc, char *argv[])
@@ -628,6 +736,7 @@ static int read_options(int argc, char *argv[])
{"gl-enable", required_argument, 0, 'E' },
{"gl-disable", required_argument, 0, 'D' },
{"stop-lockspaces", no_argument, 0, 'S' },
+ {"stderr", no_argument, 0, 'e' },
{0, 0, 0, 0 }
};
@@ -637,7 +746,7 @@ static int read_options(int argc, char *argv[])
}
while (1) {
- c = getopt_long(argc, argv, "hqidE:D:w:k:r:S", long_options, &option_index);
+ c = getopt_long(argc, argv, "hqidE:D:w:k:r:Se", long_options, &option_index);
if (c == -1)
break;
@@ -680,6 +789,9 @@ static int read_options(int argc, char *argv[])
case 'S':
stop_lockspaces = 1;
break;
+ case 'e':
+ use_stderr = 1;
+ break;
default:
print_usage();
exit(1);
@@ -698,8 +810,12 @@ int main(int argc, char **argv)
if (rv < 0)
return rv;
- _lvmlockd = lvmlockd_open(NULL);
+ /* do_kill handles lvmlockd connections itself */
+ if (kill_vg)
+ return do_kill();
+
+ _lvmlockd = lvmlockd_open(NULL);
if (_lvmlockd.socket_fd < 0 || _lvmlockd.error) {
log_error("Cannot connect to lvmlockd.");
return -1;
@@ -720,11 +836,6 @@ int main(int argc, char **argv)
goto out;
}
- if (kill_vg) {
- rv = do_kill();
- goto out;
- }
-
if (drop_vg) {
rv = do_drop();
goto out;
diff --git a/include/configure.h.in b/include/configure.h.in
index 59b4da86f..2597651e3 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -586,6 +586,9 @@
/* Path to lvm binary. */
#undef LVM_PATH
+/* Path to lvm binary dir. */
+#undef LVM_DIR
+
/* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
*/
#undef MAJOR_IN_MKDEV
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index f04b435fb..fac5d6317 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -1152,6 +1152,15 @@ cfg(global_sanlock_lv_extend_CFG, "sanlock_lv_extend", global_CFG_SECTION, CFG_D
"and can cause lvcreate to fail. Applicable only if LVM is compiled\n"
"with lockd support\n")
+cfg(global_lvmlockctl_kill_command_CFG, "lvmlockctl_kill_command", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "", vsn(2, 3, 12), NULL, 0, NULL,
+ "The command that lvmlockctl --kill should use to force LVs offline.\n"
+ "The lvmlockctl --kill command is run when a shared VG has lost\n"
+ "access to locks (e.g. when sanlock has lost access to storage.)\n"
+ "An empty string means that there will be no automatic attempt by\n"
+ "lvmlockctl --kill to forcibly shut down LVs in the VG, and the user\n"
+ "can manually intervene as described in lvmlockd(8).\n"
+ "The VG name will be appended to the command specified here.\n")
+
cfg(global_thin_check_executable_CFG, "thin_check_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, THIN_CHECK_CMD, vsn(2, 2, 94), "@THIN_CHECK_CMD@", 0, NULL,
"The full path to the thin_check command.\n"
"LVM uses this command to check that a thin metadata device is in a\n"
diff --git a/man/lvmlockctl.8_main b/man/lvmlockctl.8_main
index b7ac0ecd6..14ce926b5 100644
--- a/man/lvmlockctl.8_main
+++ b/man/lvmlockctl.8_main
@@ -65,17 +65,21 @@ and prints it.
.SS kill
This is run by sanlock when it loses access to the storage holding leases
-for a VG. It currently emits a syslog message stating that the VG must
-be immediately deactivated. In the future it may automatically attempt to
-forcibly deactivate the VG. For more, see
+for a VG. It runs the command specified in lvm.conf
+lvmlockctl_kill_command to deactivate LVs in the VG. If the specified
+command is successful, locks will be dropped for the VG in lvmlockd
+(the equivalent of lvmlockctl --drop will be run.) If no command
+is specified, or the command fails, then the user must intervene
+to forcefully deactivate LVs in the VG, and if successful, run
+lvmlockctl --drop. For more, see
.BR lvmlockd (8).
.SS drop
This should only be run after a VG has been successfully deactivated
following an lvmlockctl --kill command. It clears the stale lockspace
-from lvmlockd. In the future, this may become automatic along with an
-automatic handling of --kill. For more, see
+from lvmlockd. When lvmlockctl_kill_command is used, the --kill
+command may run drop automatically. For more, see
.BR lvmlockd (8).
.SS gl-enable
3 years, 1 month
main - filters: better message for excluding LV
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e9d10f371199055e9ed...
Commit: e9d10f371199055e9ed0c2715b5353491cb759b0
Parent: d0b0c20077affbd9671f89c7eab685ee3315e8d8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Mar 3 12:07:57 2021 -0600
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Mar 3 12:07:57 2021 -0600
filters: better message for excluding LV
Make the generic "device is not usable" message from filter-usable
more specific in case the device is not usable because it's an LV.
(i.e. when scan_lvs=0)
---
lib/activate/activate.c | 2 +-
lib/activate/activate.h | 2 +-
lib/activate/dev_manager.c | 6 ++++--
lib/cache/lvmcache.c | 2 ++
lib/filters/filter-usable.c | 8 ++++++--
lib/filters/filter.h | 1 +
6 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index de866fb6c..75248aa63 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -392,7 +392,7 @@ int add_areas_line(struct dev_manager *dm, struct lv_segment *seg,
{
return 0;
}
-int device_is_usable(struct device *dev, struct dev_usable_check_params check)
+int device_is_usable(struct device *dev, struct dev_usable_check_params check, int *is_lv)
{
return 0;
}
diff --git a/lib/activate/activate.h b/lib/activate/activate.h
index 53c8631b4..4c9328a66 100644
--- a/lib/activate/activate.h
+++ b/lib/activate/activate.h
@@ -253,7 +253,7 @@ struct dev_usable_check_params {
* Returns 1 if mapped device is not suspended, blocked or
* is using a reserved name.
*/
-int device_is_usable(struct device *dev, struct dev_usable_check_params check);
+int device_is_usable(struct device *dev, struct dev_usable_check_params check, int *is_lv);
/*
* Declaration moved here from fs.h to keep header fs.h hidden
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c
index 9a2548213..1a8f848ac 100644
--- a/lib/activate/dev_manager.c
+++ b/lib/activate/dev_manager.c
@@ -405,7 +405,7 @@ static int _ignore_blocked_mirror_devices(struct device *dev,
.check_blocked = 1,
.check_suspended = ignore_suspended_devices(),
.check_error_target = 1,
- .check_reserved = 0 }))
+ .check_reserved = 0 }, NULL))
goto out; /* safe to use */
stack;
}
@@ -620,7 +620,7 @@ static int _ignore_frozen_raid(struct device *dev, const char *params)
*
* Returns: 1 if usable, 0 otherwise
*/
-int device_is_usable(struct device *dev, struct dev_usable_check_params check)
+int device_is_usable(struct device *dev, struct dev_usable_check_params check, int *is_lv)
{
struct dm_task *dmt;
struct dm_info info;
@@ -675,6 +675,8 @@ int device_is_usable(struct device *dev, struct dev_usable_check_params check)
if (check.check_lv && uuid && !strncmp(uuid, "LVM-", 4)) {
/* Skip LVs */
+ if (is_lv)
+ *is_lv = 1;
goto out;
}
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 04f6fe0a5..b78262b65 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -2909,6 +2909,8 @@ const char *dev_filtered_reason(struct device *dev)
return "device is not in devices file";
if (dev->filtered_flags & DEV_FILTERED_DEVICES_LIST)
return "device is not in devices list";
+ if (dev->filtered_flags & DEV_FILTERED_IS_LV)
+ return "device is an LV";
/* flag has not been added here */
if (dev->filtered_flags)
diff --git a/lib/filters/filter-usable.c b/lib/filters/filter-usable.c
index 8a5b0d828..43a37afd0 100644
--- a/lib/filters/filter-usable.c
+++ b/lib/filters/filter-usable.c
@@ -111,6 +111,7 @@ static int _passes_usable_filter(struct cmd_context *cmd, struct dev_filter *f,
filter_mode_t mode = data->mode;
int skip_lvs = data->skip_lvs;
struct dev_usable_check_params ucp = {0};
+ int is_lv = 0;
int r = 1;
dev->filtered_flags &= ~DEV_FILTERED_MINSIZE;
@@ -145,8 +146,11 @@ static int _passes_usable_filter(struct cmd_context *cmd, struct dev_filter *f,
break;
}
- if (!(r = device_is_usable(dev, ucp))) {
- dev->filtered_flags |= DEV_FILTERED_UNUSABLE;
+ if (!(r = device_is_usable(dev, ucp, &is_lv))) {
+ if (is_lv)
+ dev->filtered_flags |= DEV_FILTERED_IS_LV;
+ else
+ dev->filtered_flags |= DEV_FILTERED_UNUSABLE;
log_debug_devs("%s: Skipping unusable device.", dev_name(dev));
}
}
diff --git a/lib/filters/filter.h b/lib/filters/filter.h
index bd4293090..40fbdeabb 100644
--- a/lib/filters/filter.h
+++ b/lib/filters/filter.h
@@ -66,5 +66,6 @@ struct dev_filter *usable_filter_create(struct cmd_context *cmd, struct dev_type
#define DEV_FILTERED_UNUSABLE 0x00000400
#define DEV_FILTERED_DEVICES_FILE 0x00000800
#define DEV_FILTERED_DEVICES_LIST 0x00001000
+#define DEV_FILTERED_IS_LV 0x00002000
#endif /* _LVM_FILTER_H */
3 years, 1 month
main - WHATS_NEW: updates
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d0b0c20077affbd9671...
Commit: d0b0c20077affbd9671f89c7eab685ee3315e8d8
Parent: 9cb913ab4bf8e8e98f2f84210e4bee55d7f177a8
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 27 00:15:25 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 2 22:57:35 2021 +0100
WHATS_NEW: updates
---
WHATS_NEW | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/WHATS_NEW b/WHATS_NEW
index e65f13123..cbd542fed 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,9 @@
Version 2.03.12 -
===================================
+ Support interruption when taking archive and backup.
+ Accelerate large lvremoves.
+ Speedup search for cached device nodes.
+ Speedup command initialization.
Add devices file feature, off by default for now.
Support extension of writecached volumes.
Fix problem with unbound variable usage within fsadm.
3 years, 1 month
main - make: generate
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9cb913ab4bf8e8e98f2...
Commit: 9cb913ab4bf8e8e98f2f84210e4bee55d7f177a8
Parent: 8e1771f8571c54cc053b077305b886278086dd03
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 24 12:40:15 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 2 22:57:35 2021 +0100
make: generate
---
conf/example.conf.in | 32 ++++++++++++++++++++++++++++++++
man/lvchange.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/lvconvert.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/lvcreate.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/lvdisplay.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvextend.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/lvm-fullreport.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvm-lvpoll.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvmconfig.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvmdiskscan.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvreduce.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvremove.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvrename.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvresize.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/lvs.8_pregen | 28 ++++++++++++++++++++++++++++
man/lvscan.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvchange.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvck.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/pvcreate.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvdisplay.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvmove.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvremove.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvresize.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvs.8_pregen | 28 ++++++++++++++++++++++++++++
man/pvscan.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgcfgbackup.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgcfgrestore.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/vgchange.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/vgck.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgconvert.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgcreate.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgdisplay.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgexport.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgextend.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgimport.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgimportclone.8_pregen | 38 ++++++++++++++++++++++++++++++++++++++
man/vgmerge.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgmknodes.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgreduce.8_pregen | 36 ++++++++++++++++++++++++++++++++++++
man/vgremove.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgrename.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgs.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgscan.8_pregen | 28 ++++++++++++++++++++++++++++
man/vgsplit.8_pregen | 28 ++++++++++++++++++++++++++++
44 files changed, 1318 insertions(+)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index fc0a16bf1..8ac376303 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -124,6 +124,38 @@ devices {
#
# This configuration option does not have a default value defined.
+ # Configuration option devices/use_devicesfile.
+ # Enable or disable the use of a devices file.
+ # When enabled, lvm will only use devices that
+ # are lised in the devices file. A devices file will
+ # be used, regardless of this setting, when the --devicesfile
+ # option is set to a specific file name.
+ # This configuration option has an automatic default value.
+ # use_devicesfile = 0
+
+ # Configuration option devices/devicesfile.
+ # The name of the system devices file, listing devices that LVM should use.
+ # This should not be used to select a non-system devices file.
+ # The --devicesfile option is intended for alternative devices files.
+ # This configuration option has an automatic default value.
+ # devicesfile = "system.devices"
+
+ # Configuration option devices/search_for_devnames.
+ # Look outside of the devices file for missing devname entries.
+ # A devname entry is used for a device that does not have a stable
+ # device id, e.g. wwid, so the unstable device name is used as
+ # the device id. After reboot, or if the device is reattached,
+ # the device name may change, in which case lvm will not find
+ # the expected PV on the device listed in the devices file.
+ # This setting controls whether lvm will search other devices,
+ # outside the devices file, to look for the missing PV on a
+ # renamed device. If "none", lvm will not look at other devices,
+ # and the PV may appear to be missing. If "auto", lvm will look
+ # at other devices, but only those that are likely to have the PV.
+ # If "all", lvm will look at all devices on the system.
+ # This configuration option has an automatic default value.
+ # search_for_devnames = "auto"
+
# Configuration option devices/filter.
# Limit the block devices that are used by LVM commands.
# This is a list of regular expressions used to accept or reject block
diff --git a/man/lvchange.8_pregen b/man/lvchange.8_pregen
index e133387af..572f84aa8 100644
--- a/man/lvchange.8_pregen
+++ b/man/lvchange.8_pregen
@@ -72,6 +72,14 @@ lvchange - Change the attributes of logical volume(s)
\fB--detachprofile\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
.ad b
@@ -586,6 +594,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -782,6 +798,24 @@ See \fBlvm.conf\fP(5) for more information about profiles.
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
.br
Specifies how the device-mapper thin pool layer in the kernel should
@@ -1192,6 +1226,7 @@ Change LV permission to read-only:
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -1214,6 +1249,7 @@ Change LV permission to read-only:
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 01fbc7154..c645d6a56 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -78,6 +78,14 @@ lvconvert - Change logical volume layout
\fB--deduplication\fP \fBy\fP|\fBn\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
.ad b
@@ -1146,6 +1154,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -1326,6 +1342,24 @@ See \fBlvmvdo\fP(7) for more information about VDO usage.
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
.br
Specifies how the device-mapper thin pool layer in the kernel should
@@ -2265,6 +2299,7 @@ Detach and remove the cache pool from a cache LV.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -2287,6 +2322,7 @@ Detach and remove the cache pool from a cache LV.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvcreate.8_pregen b/man/lvcreate.8_pregen
index 716db5053..8f548811e 100644
--- a/man/lvcreate.8_pregen
+++ b/man/lvcreate.8_pregen
@@ -90,6 +90,14 @@ lvcreate - Create a logical volume
\fB--deduplication\fP \fBy\fP|\fBn\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
.ad b
@@ -1199,6 +1207,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -1412,6 +1428,24 @@ See \fBlvmvdo\fP(7) for more information about VDO usage.
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--discards\fP \fBpassdown\fP|\fBnopassdown\fP|\fBignore\fP
.br
Specifies how the device-mapper thin pool layer in the kernel should
@@ -3162,6 +3196,7 @@ Create a VDO LV vdo0 with VDOPoolLV size of 10GiB and name vpool1.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -3184,6 +3219,7 @@ Create a VDO LV vdo0 with VDOPoolLV size of 10GiB and name vpool1.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvdisplay.8_pregen b/man/lvdisplay.8_pregen
index 9751b7656..e19447c58 100644
--- a/man/lvdisplay.8_pregen
+++ b/man/lvdisplay.8_pregen
@@ -154,6 +154,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -245,6 +253,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -509,6 +535,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -531,6 +558,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvextend.8_pregen b/man/lvextend.8_pregen
index 3dd4d0f3f..4ccfa809b 100644
--- a/man/lvextend.8_pregen
+++ b/man/lvextend.8_pregen
@@ -30,6 +30,14 @@ lvextend - Add space to a logical volume
\fB-d\fP|\fB--debug\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
@@ -316,6 +324,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -393,6 +409,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -678,6 +712,7 @@ Extend an LV by 16MiB using specific physical extents.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -700,6 +735,7 @@ Extend an LV by 16MiB using specific physical extents.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvm-fullreport.8_pregen b/man/lvm-fullreport.8_pregen
index b6212a6f0..7fb7d046d 100644
--- a/man/lvm-fullreport.8_pregen
+++ b/man/lvm-fullreport.8_pregen
@@ -146,6 +146,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -220,6 +228,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -474,6 +500,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -496,6 +523,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvm-lvpoll.8_pregen b/man/lvm-lvpoll.8_pregen
index bbfa1216d..87af9b925 100644
--- a/man/lvm-lvpoll.8_pregen
+++ b/man/lvm-lvpoll.8_pregen
@@ -72,6 +72,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -134,6 +142,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -289,6 +315,7 @@ Continue thin snapshot merge.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -311,6 +338,7 @@ Continue thin snapshot merge.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvmconfig.8_pregen b/man/lvmconfig.8_pregen
index b2ab265ca..afb890cc3 100644
--- a/man/lvmconfig.8_pregen
+++ b/man/lvmconfig.8_pregen
@@ -141,6 +141,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -202,6 +210,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -481,6 +507,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -503,6 +530,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvmdiskscan.8_pregen b/man/lvmdiskscan.8_pregen
index 62dc2afdd..d47514027 100644
--- a/man/lvmdiskscan.8_pregen
+++ b/man/lvmdiskscan.8_pregen
@@ -67,6 +67,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -116,6 +124,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -233,6 +259,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -255,6 +282,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvreduce.8_pregen b/man/lvreduce.8_pregen
index 9e3dbfe87..4fcc08f99 100644
--- a/man/lvreduce.8_pregen
+++ b/man/lvreduce.8_pregen
@@ -98,6 +98,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -154,6 +162,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -340,6 +366,7 @@ Reduce the size of an LV by 3 logical extents:
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -362,6 +389,7 @@ Reduce the size of an LV by 3 logical extents:
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvremove.8_pregen b/man/lvremove.8_pregen
index 4635ec77c..b53b871cc 100644
--- a/man/lvremove.8_pregen
+++ b/man/lvremove.8_pregen
@@ -102,6 +102,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -158,6 +166,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -334,6 +360,7 @@ Remove all LVs the specified VG.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -356,6 +383,7 @@ Remove all LVs the specified VG.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvrename.8_pregen b/man/lvrename.8_pregen
index 1cfc887a8..0a468aed3 100644
--- a/man/lvrename.8_pregen
+++ b/man/lvrename.8_pregen
@@ -77,6 +77,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -133,6 +141,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -271,6 +297,7 @@ An alternate syntax to rename "lvold" to "lvnew":
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -293,6 +320,7 @@ An alternate syntax to rename "lvold" to "lvnew":
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvresize.8_pregen b/man/lvresize.8_pregen
index 83b060d86..528066154 100644
--- a/man/lvresize.8_pregen
+++ b/man/lvresize.8_pregen
@@ -30,6 +30,14 @@ lvresize - Resize a logical volume
\fB-d\fP|\fB--debug\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
@@ -264,6 +272,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -341,6 +357,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -604,6 +638,7 @@ Extend an LV by 16MB using specific physical extents:
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -626,6 +661,7 @@ Extend an LV by 16MB using specific physical extents:
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvs.8_pregen b/man/lvs.8_pregen
index 57b3736f9..8351aeea2 100644
--- a/man/lvs.8_pregen
+++ b/man/lvs.8_pregen
@@ -150,6 +150,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -227,6 +235,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -587,6 +613,7 @@ s(k)ip activation: this volume is flagged to be skipped during activation.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -609,6 +636,7 @@ s(k)ip activation: this volume is flagged to be skipped during activation.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/lvscan.8_pregen b/man/lvscan.8_pregen
index 0b782fedf..03c7806e2 100644
--- a/man/lvscan.8_pregen
+++ b/man/lvscan.8_pregen
@@ -77,6 +77,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -140,6 +148,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -269,6 +295,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -291,6 +318,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvchange.8_pregen b/man/pvchange.8_pregen
index 234a114a9..ccf7a613d 100644
--- a/man/pvchange.8_pregen
+++ b/man/pvchange.8_pregen
@@ -134,6 +134,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -216,6 +224,24 @@ multiple tags at once. See \fBlvm\fP(8) for information about tags.
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -384,6 +410,7 @@ disk errors, or because it will be removed after freeing it).
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -406,6 +433,7 @@ disk errors, or because it will be removed after freeing it).
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvck.8_pregen b/man/pvck.8_pregen
index eac6634ce..76671a515 100644
--- a/man/pvck.8_pregen
+++ b/man/pvck.8_pregen
@@ -20,6 +20,14 @@ pvck - Check metadata on physical volumes
\fB-d\fP|\fB--debug\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
@@ -342,6 +350,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -391,6 +407,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -568,6 +602,7 @@ parameter with a value of 204800 (100 * 1024 * 1024 / 512 = 204800).
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -590,6 +625,7 @@ parameter with a value of 204800 (100 * 1024 * 1024 / 512 = 204800).
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvcreate.8_pregen b/man/pvcreate.8_pregen
index 781762521..b43dbdd16 100644
--- a/man/pvcreate.8_pregen
+++ b/man/pvcreate.8_pregen
@@ -190,6 +190,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -271,6 +279,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -503,6 +529,7 @@ boundary) manually account for this when initializing for use by LVM.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -525,6 +552,7 @@ boundary) manually account for this when initializing for use by LVM.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvdisplay.8_pregen b/man/pvdisplay.8_pregen
index 7c4500131..b560f9de2 100644
--- a/man/pvdisplay.8_pregen
+++ b/man/pvdisplay.8_pregen
@@ -150,6 +150,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -240,6 +248,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -496,6 +522,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -518,6 +545,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvmove.8_pregen b/man/pvmove.8_pregen
index a34271ff8..0fc745009 100644
--- a/man/pvmove.8_pregen
+++ b/man/pvmove.8_pregen
@@ -125,6 +125,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -226,6 +234,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -459,6 +485,7 @@ extents can also be picked out and moved.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -481,6 +508,7 @@ extents can also be picked out and moved.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvremove.8_pregen b/man/pvremove.8_pregen
index 784fcbe12..802e1d4a1 100644
--- a/man/pvremove.8_pregen
+++ b/man/pvremove.8_pregen
@@ -67,6 +67,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -116,6 +124,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -244,6 +270,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -266,6 +293,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvresize.8_pregen b/man/pvresize.8_pregen
index fc79a3a5f..01cbc099f 100644
--- a/man/pvresize.8_pregen
+++ b/man/pvresize.8_pregen
@@ -62,6 +62,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -111,6 +119,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -251,6 +277,7 @@ appropriate for the intended new partition size).
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -273,6 +300,7 @@ appropriate for the intended new partition size).
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvs.8_pregen b/man/pvs.8_pregen
index d85ae6cda..cb43845d2 100644
--- a/man/pvs.8_pregen
+++ b/man/pvs.8_pregen
@@ -146,6 +146,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -222,6 +230,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -504,6 +530,7 @@ e(x)ported
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -526,6 +553,7 @@ e(x)ported
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/pvscan.8_pregen b/man/pvscan.8_pregen
index 27e1a773e..b604f9328 100644
--- a/man/pvscan.8_pregen
+++ b/man/pvscan.8_pregen
@@ -174,6 +174,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -236,6 +244,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -409,6 +435,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -431,6 +458,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgcfgbackup.8_pregen b/man/vgcfgbackup.8_pregen
index 6401ee4fb..8f662a7ad 100644
--- a/man/vgcfgbackup.8_pregen
+++ b/man/vgcfgbackup.8_pregen
@@ -93,6 +93,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -142,6 +150,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -290,6 +316,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -312,6 +339,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgcfgrestore.8_pregen b/man/vgcfgrestore.8_pregen
index a174d7642..43d863541 100644
--- a/man/vgcfgrestore.8_pregen
+++ b/man/vgcfgrestore.8_pregen
@@ -22,6 +22,14 @@ vgcfgrestore - Restore volume group configuration
\fB-d\fP|\fB--debug\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
@@ -189,6 +197,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -238,6 +254,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -383,6 +417,7 @@ missing PV. Repeat for all other missing PVs in the VG. Then use
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -405,6 +440,7 @@ missing PV. Repeat for all other missing PVs in the VG. Then use
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgchange.8_pregen b/man/vgchange.8_pregen
index 9016e76dd..cb3c3500a 100644
--- a/man/vgchange.8_pregen
+++ b/man/vgchange.8_pregen
@@ -50,6 +50,14 @@ vgchange - Change volume group attributes
\fB--detachprofile\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
@@ -605,6 +613,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -742,6 +758,24 @@ See \fBlvm.conf\fP(5) for more information about profiles.
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -1103,6 +1137,7 @@ Change the maximum number of LVs for an inactive VG.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -1125,6 +1160,7 @@ Change the maximum number of LVs for an inactive VG.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgck.8_pregen b/man/vgck.8_pregen
index 9226dc4a6..13f7a1eb9 100644
--- a/man/vgck.8_pregen
+++ b/man/vgck.8_pregen
@@ -80,6 +80,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -129,6 +137,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -264,6 +290,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -286,6 +313,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgconvert.8_pregen b/man/vgconvert.8_pregen
index 09b6f1d31..ab7c083e9 100644
--- a/man/vgconvert.8_pregen
+++ b/man/vgconvert.8_pregen
@@ -82,6 +82,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -148,6 +156,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -307,6 +333,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -329,6 +356,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgcreate.8_pregen b/man/vgcreate.8_pregen
index adef80999..91fa6a67e 100644
--- a/man/vgcreate.8_pregen
+++ b/man/vgcreate.8_pregen
@@ -146,6 +146,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -253,6 +261,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -514,6 +540,7 @@ Create a VG with two PVs, using the default physical extent size.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -536,6 +563,7 @@ Create a VG with two PVs, using the default physical extent size.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgdisplay.8_pregen b/man/vgdisplay.8_pregen
index f7db557b7..559d64c25 100644
--- a/man/vgdisplay.8_pregen
+++ b/man/vgdisplay.8_pregen
@@ -145,6 +145,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -235,6 +243,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -479,6 +505,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -501,6 +528,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgexport.8_pregen b/man/vgexport.8_pregen
index a9a9dc6fb..e88d91922 100644
--- a/man/vgexport.8_pregen
+++ b/man/vgexport.8_pregen
@@ -96,6 +96,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -150,6 +158,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -289,6 +315,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -311,6 +338,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgextend.8_pregen b/man/vgextend.8_pregen
index 40a34d9e0..1aef95d6e 100644
--- a/man/vgextend.8_pregen
+++ b/man/vgextend.8_pregen
@@ -111,6 +111,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -183,6 +191,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -380,6 +406,7 @@ Add two PVs to a VG.
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -402,6 +429,7 @@ Add two PVs to a VG.
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgimport.8_pregen b/man/vgimport.8_pregen
index b82a1847e..2592fb4d9 100644
--- a/man/vgimport.8_pregen
+++ b/man/vgimport.8_pregen
@@ -86,6 +86,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -141,6 +149,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -287,6 +313,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -309,6 +336,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgimportclone.8_pregen b/man/vgimportclone.8_pregen
index 8cb048ffa..8e0144655 100644
--- a/man/vgimportclone.8_pregen
+++ b/man/vgimportclone.8_pregen
@@ -26,6 +26,10 @@ changes the associated VG and PV UUIDs.
[ \fB-i\fP|\fB--import\fP ]
.ad b
.br
+.ad l
+[ \fB--importdevices\fP ]
+.ad b
+.br
[ COMMON_OPTIONS ]
.RE
.br
@@ -66,6 +70,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -125,6 +137,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -145,6 +175,12 @@ will not be changed (nor will their associated PVs).
.ad b
.HP
.ad l
+\fB--importdevices\fP
+.br
+Add devices to the devices file.
+.ad b
+.HP
+.ad l
\fB--lockopt\fP \fIString\fP
.br
Used to pass options for special cases to lvmlockd.
@@ -250,6 +286,7 @@ Rename the VG associated with "/dev/sdc" and "/dev/sdd" from "vg00" to "vg00_sna
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -272,6 +309,7 @@ Rename the VG associated with "/dev/sdc" and "/dev/sdd" from "vg00" to "vg00_sna
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgmerge.8_pregen b/man/vgmerge.8_pregen
index 03aa096eb..b555a8365 100644
--- a/man/vgmerge.8_pregen
+++ b/man/vgmerge.8_pregen
@@ -63,6 +63,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -119,6 +127,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -235,6 +261,7 @@ Merge an inactive VG named "vg00" into the active or inactive VG named
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -257,6 +284,7 @@ Merge an inactive VG named "vg00" into the active or inactive VG named
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgmknodes.8_pregen b/man/vgmknodes.8_pregen
index 4243b0923..66c16a9f6 100644
--- a/man/vgmknodes.8_pregen
+++ b/man/vgmknodes.8_pregen
@@ -74,6 +74,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -123,6 +131,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -264,6 +290,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -286,6 +313,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgreduce.8_pregen b/man/vgreduce.8_pregen
index 1f1d8d94e..6aded0070 100644
--- a/man/vgreduce.8_pregen
+++ b/man/vgreduce.8_pregen
@@ -28,6 +28,14 @@ vgreduce - Remove physical volume(s) from a volume group
\fB-d\fP|\fB--debug\fP
.ad b
.br
+.ad l
+ \fB--devices\fP \fIPV\fP
+.ad b
+.br
+.ad l
+ \fB--devicesfile\fP \fIString\fP
+.ad b
+.br
.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.ad b
@@ -179,6 +187,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -241,6 +257,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -394,6 +428,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -416,6 +451,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgremove.8_pregen b/man/vgremove.8_pregen
index c715742ad..f78f9b476 100644
--- a/man/vgremove.8_pregen
+++ b/man/vgremove.8_pregen
@@ -77,6 +77,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -126,6 +134,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -281,6 +307,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -303,6 +330,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgrename.8_pregen b/man/vgrename.8_pregen
index b9ac143e5..3444a64ac 100644
--- a/man/vgrename.8_pregen
+++ b/man/vgrename.8_pregen
@@ -90,6 +90,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -146,6 +154,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -277,6 +303,7 @@ Rename the VG with the specified UUID to "myvg".
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -299,6 +326,7 @@ Rename the VG with the specified UUID to "myvg".
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgs.8_pregen b/man/vgs.8_pregen
index f50e43fbd..29ed39e2a 100644
--- a/man/vgs.8_pregen
+++ b/man/vgs.8_pregen
@@ -142,6 +142,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -217,6 +225,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -492,6 +518,7 @@ Allocation policy: (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -514,6 +541,7 @@ Allocation policy: (c)ontiguous, c(l)ing, (n)ormal, (a)nywhere
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgscan.8_pregen b/man/vgscan.8_pregen
index 5d329f921..1772a450d 100644
--- a/man/vgscan.8_pregen
+++ b/man/vgscan.8_pregen
@@ -69,6 +69,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -118,6 +126,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -251,6 +277,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -273,6 +300,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
diff --git a/man/vgsplit.8_pregen b/man/vgsplit.8_pregen
index 9731aa4fa..fe680982d 100644
--- a/man/vgsplit.8_pregen
+++ b/man/vgsplit.8_pregen
@@ -107,6 +107,14 @@ Common options for lvm:
.ad b
.br
.ad l
+[ \fB--devices\fP \fIPV\fP ]
+.ad b
+.br
+.ad l
+[ \fB--devicesfile\fP \fIString\fP ]
+.ad b
+.br
+.ad l
[ \fB--driverloaded\fP \fBy\fP|\fBn\fP ]
.ad b
.br
@@ -184,6 +192,24 @@ messages sent to the log file and/or syslog (if configured).
.ad b
.HP
.ad l
+\fB--devices\fP \fIPV\fP
+.br
+Devices that the command can use. This option can be repeated
+or accepts a comma separated list of devices. This overrides
+the devices file.
+.ad b
+.HP
+.ad l
+\fB--devicesfile\fP \fIString\fP
+.br
+A file listing devices that LVM should use.
+The file must exist in /etc/lvm/devices/ and is managed
+with the lvmdevices(8) command.
+This overrides the lvm.conf devices/devicesfile and
+devices/use_devicesfile settings.
+.ad b
+.HP
+.ad l
\fB--driverloaded\fP \fBy\fP|\fBn\fP
.br
If set to no, the command will not attempt to use device-mapper.
@@ -345,6 +371,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR lvm (8)
.BR lvm.conf (5)
.BR lvmconfig (8)
+.BR lvmdevices (8)
.BR pvchange (8)
.BR pvck (8)
@@ -367,6 +394,7 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.BR vgextend (8)
.BR vgimport (8)
.BR vgimportclone (8)
+.BR vgimportdevices (8)
.BR vgmerge (8)
.BR vgmknodes (8)
.BR vgreduce (8)
3 years, 1 month
main - debug: use enclusing "" for debug
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8e1771f8571c54cc053...
Commit: 8e1771f8571c54cc053b077305b886278086dd03
Parent: 1042cd9a612e1f71fda15dac62948707acee326e
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 27 17:08:52 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 2 22:57:35 2021 +0100
debug: use enclusing "" for debug
---
device_mapper/libdm-config.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/device_mapper/libdm-config.c b/device_mapper/libdm-config.c
index d2ac43c85..7ce5620c6 100644
--- a/device_mapper/libdm-config.c
+++ b/device_mapper/libdm-config.c
@@ -983,7 +983,7 @@ static const char *_find_config_str(const void *start, node_lookup_fn find_fn,
}
if (fail)
- log_very_verbose("%s not found in config: defaulting to %s",
+ log_very_verbose("%s not found in config: defaulting to \"%s\"",
path, fail);
return fail;
}
3 years, 1 month
main - cleanup: simplify condition
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1042cd9a612e1f71fda...
Commit: 1042cd9a612e1f71fda15dac62948707acee326e
Parent: eb3dcc72eb0e1f3922dafcc4d018db70aabc3bc9
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 27 21:18:48 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 2 22:57:35 2021 +0100
cleanup: simplify condition
---
lib/device/dev-cache.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index bbf6ce833..5632456bf 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -1563,9 +1563,6 @@ struct device *dev_cache_get_by_devt(struct cmd_context *cmd, dev_t dev, struct
if (filtered)
*filtered = 0;
- if (d && (d->flags & DEV_REGULAR))
- return d;
-
if (!d) {
sysfs_dir = dm_sysfs_dir();
if (sysfs_dir && *sysfs_dir) {
@@ -1587,10 +1584,10 @@ struct device *dev_cache_get_by_devt(struct cmd_context *cmd, dev_t dev, struct
(int)MAJOR(dev), (int)MINOR(dev));
dev_cache_scan();
d = (struct device *) btree_lookup(_cache.devices, (uint32_t) dev);
- }
- if (!d)
- return NULL;
+ if (!d)
+ return NULL;
+ }
if (d->flags & DEV_REGULAR)
return d;
@@ -1611,6 +1608,7 @@ struct device *dev_cache_get_by_devt(struct cmd_context *cmd, dev_t dev, struct
if (filtered)
*filtered = 1;
+
return NULL;
}
3 years, 1 month
main - cleanup: free already checks for NULL
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=eb3dcc72eb0e1f3922d...
Commit: eb3dcc72eb0e1f3922dafcc4d018db70aabc3bc9
Parent: 0b7a4503e51d29454bdb8852dfd2a39276f828af
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 27 14:14:25 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 2 22:57:35 2021 +0100
cleanup: free already checks for NULL
---
daemons/cmirrord/functions.c | 3 +--
daemons/lvmlockd/lvmlockd-dlm.c | 3 +--
daemons/lvmlockd/lvmlockd-sanlock.c | 6 ++---
lib/cache/lvmcache.c | 3 +--
lib/device/device_id.c | 54 +++++++++++++------------------------
lib/format_text/format-text.c | 7 ++---
tools/pvchange.c | 3 +--
7 files changed, 26 insertions(+), 53 deletions(-)
diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c
index f10a8d5bb..23a17015a 100644
--- a/daemons/cmirrord/functions.c
+++ b/daemons/cmirrord/functions.c
@@ -658,8 +658,7 @@ static int clog_dtr(struct dm_ulog_request *rq)
if (lc->disk_fd != -1 && close(lc->disk_fd))
LOG_ERROR("Failed to close disk log: %s",
strerror(errno));
- if (lc->disk_buffer)
- free(lc->disk_buffer);
+ free(lc->disk_buffer);
free(lc->clean_bits);
free(lc->sync_bits);
free(lc);
diff --git a/daemons/lvmlockd/lvmlockd-dlm.c b/daemons/lvmlockd/lvmlockd-dlm.c
index 7915cc008..dc665e0a4 100644
--- a/daemons/lvmlockd/lvmlockd-dlm.c
+++ b/daemons/lvmlockd/lvmlockd-dlm.c
@@ -327,8 +327,7 @@ int lm_rem_resource_dlm(struct lockspace *ls, struct resource *r)
log_error("S %s R %s rem_resource_dlm unlock error %d", ls->name, r->name, rv);
}
out:
- if (rdd->vb)
- free(rdd->vb);
+ free(rdd->vb);
memset(rdd, 0, sizeof(struct rd_dlm));
r->lm_init = 0;
diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c
index 4bc6402cf..36d57767f 100644
--- a/daemons/lvmlockd/lvmlockd-sanlock.c
+++ b/daemons/lvmlockd/lvmlockd-sanlock.c
@@ -1503,8 +1503,7 @@ out:
fail:
if (lms && lms->sock)
close(lms->sock);
- if (lms)
- free(lms);
+ free(lms);
return ret;
}
@@ -1634,8 +1633,7 @@ int lm_rem_resource_sanlock(struct lockspace *ls, struct resource *r)
/* FIXME: assert r->mode == UN or unlock if it's not? */
- if (rds->vb)
- free(rds->vb);
+ free(rds->vb);
memset(rds, 0, sizeof(struct rd_sanlock));
r->lm_init = 0;
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 172c10f30..04f6fe0a5 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -1406,8 +1406,7 @@ static void _free_vginfo(struct lvmcache_vginfo *vginfo)
free(vginfo->vgname);
free(vginfo->system_id);
free(vginfo->creation_host);
- if (vginfo->lock_type)
- free(vginfo->lock_type);
+ free(vginfo->lock_type);
free(vginfo);
}
diff --git a/lib/device/device_id.c b/lib/device/device_id.c
index 698942bb1..4b7214b60 100644
--- a/lib/device/device_id.c
+++ b/lib/device/device_id.c
@@ -149,12 +149,9 @@ static int _searched_devnames_exists(struct cmd_context *cmd)
void free_du(struct dev_use *du)
{
- if (du->idname)
- free(du->idname);
- if (du->devname)
- free(du->devname);
- if (du->pvid)
- free(du->pvid);
+ free(du->idname);
+ free(du->devname);
+ free(du->pvid);
free(du);
}
@@ -170,8 +167,7 @@ void free_dus(struct dm_list *dus)
void free_did(struct dev_id *id)
{
- if (id->idname)
- free(id->idname);
+ free(id->idname);
free(id);
}
@@ -1213,8 +1209,7 @@ id_done:
du_devname->devname = NULL;
}
- if (check_idname)
- free((void *)check_idname);
+ free((void *)check_idname);
if (!update_du) {
log_debug("Adding new entry to devices file for %s PVID %s %s %s.",
@@ -1227,12 +1222,9 @@ id_done:
dev_name(dev), update_matching_kind, update_matching_name);
}
- if (du->idname)
- free(du->idname);
- if (du->devname)
- free(du->devname);
- if (du->pvid)
- free(du->pvid);
+ free(du->idname);
+ free(du->devname);
+ free(du->pvid);
du->idtype = id->idtype;
du->idname = strdup(id->idname);
@@ -1604,8 +1596,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
dev_name(dev), dev->pvid, du->pvid ?: "none");
if (!(tmpdup = strdup(dev->pvid)))
continue;
- if (du->pvid)
- free(du->pvid);
+ free(du->pvid);
du->pvid = tmpdup;
update_file = 1;
*device_ids_invalid = 1;
@@ -1614,8 +1605,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
if (du->pvid && (du->pvid[0] != '.')) {
log_warn("Device %s has no PVID (devices file %s)",
dev_name(dev), du->pvid);
- if (du->pvid)
- free(du->pvid);
+ free(du->pvid);
du->pvid = NULL;
update_file = 1;
*device_ids_invalid = 1;
@@ -1627,8 +1617,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
dev_name(du->dev), du->devname ?: "none");
if (!(tmpdup = strdup(dev_name(du->dev))))
continue;
- if (du->devname)
- free(du->devname);
+ free(du->devname);
du->devname = tmpdup;
update_file = 1;
*device_ids_invalid = 1;
@@ -1686,8 +1675,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
devname, du->devname ?: "none");
if (!(tmpdup = strdup(devname)))
continue;
- if (du->devname)
- free(du->devname);
+ free(du->devname);
du->devname = tmpdup;
update_file = 1;
*device_ids_invalid = 1;
@@ -2029,24 +2017,18 @@ void device_ids_find_renamed_devs(struct cmd_context *cmd, struct dm_list *dev_l
dup_devname3 = strdup(devname);
id = zalloc(sizeof(struct dev_id));
if (!dup_devname1 || !dup_devname2 || !dup_devname3 || !id) {
- if (dup_devname1)
- free(dup_devname1);
- if (dup_devname2)
- free(dup_devname2);
- if (dup_devname3)
- free(dup_devname3);
- if (id)
- free(id);
+ free(dup_devname1);
+ free(dup_devname2);
+ free(dup_devname3);
+ free(id);
stack;
continue;
}
log_warn("Devices file PVID %s updating IDNAME to %s.", dev->pvid, devname);
- if (du->idname)
- free(du->idname);
- if (du->devname)
- free(du->devname);
+ free(du->idname);
+ free(du->devname);
free_dids(&dev->ids);
du->idname = dup_devname1;
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index e1142c07e..e8533d5dc 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -63,8 +63,7 @@ void free_text_fidtc(struct volume_group *vg)
fidtc->preserve = 0;
- if (fidtc->write_buf)
- free(fidtc->write_buf);
+ free(fidtc->write_buf);
fidtc->write_buf = NULL;
fidtc->write_buf_size = 0;
fidtc->new_metadata_size = 0;
@@ -2018,9 +2017,7 @@ static void _text_destroy(struct format_type *fmt)
if (fmt->orphan_vg)
free_orphan_vg(fmt->orphan_vg);
- if (fmt->private)
- free(fmt->private);
-
+ free(fmt->private);
free(fmt);
}
diff --git a/tools/pvchange.c b/tools/pvchange.c
index 5e457a60b..b0bc83ed5 100644
--- a/tools/pvchange.c
+++ b/tools/pvchange.c
@@ -189,8 +189,7 @@ static int _pvchange_single(struct cmd_context *cmd, struct volume_group *vg,
}
if (du) {
- if (du->pvid)
- free(du->pvid);
+ free(du->pvid);
if (!(du->pvid = strndup((char *)&pv->id, ID_LEN)))
log_error("Failed to set pvid for devices file.");
if (!device_ids_write(cmd))
3 years, 1 month
main - integrity: mark as user of secure_data
by Zdenek Kabelac
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=0b7a4503e51d29454bd...
Commit: 0b7a4503e51d29454bdb8852dfd2a39276f828af
Parent: 67790d7e3bcfb202eb42d23ab36dfdfe31713996
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sat Feb 27 22:12:33 2021 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Mar 2 22:57:35 2021 +0100
integrity: mark as user of secure_data
Use the secure_data with integrity target. Not so big difference,
as the secure feature of the integrity target is not used by lvm2.
---
device_mapper/libdm-deptree.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/device_mapper/libdm-deptree.c b/device_mapper/libdm-deptree.c
index ec345ac55..7045e1f26 100644
--- a/device_mapper/libdm-deptree.c
+++ b/device_mapper/libdm-deptree.c
@@ -2824,6 +2824,9 @@ static int _integrity_emit_segment_line(struct dm_task *dmt,
if (set->sectors_per_bit_set)
EMIT_PARAMS(pos, " sectors_per_bit:%llu", (unsigned long long)set->sectors_per_bit);
+ if (!dm_task_secure_data(dmt))
+ stack;
+
return 1;
}
3 years, 1 month