mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
vgscan --mknodes
This commit is contained in:
parent
27642fade0
commit
5a8fa8c91f
@ -26,6 +26,7 @@ arg(units_ARG, '\0', "units", string_arg)
|
||||
arg(nosuffix_ARG, '\0', "nosuffix", NULL)
|
||||
arg(removemissing_ARG, '\0', "removemissing", NULL)
|
||||
arg(abort_ARG, '\0', "abort", NULL)
|
||||
arg(mknodes_ARG, '\0', "mknodes", NULL)
|
||||
|
||||
/* Allow some variations */
|
||||
arg(resizable_ARG, '\0', "resizable", yes_no_arg)
|
||||
|
@ -752,11 +752,12 @@ xx(vgscan,
|
||||
"\t[-d|--debug]\n"
|
||||
"\t[-h|--help]\n"
|
||||
"\t[--ignorelockingfailure]\n"
|
||||
"\t[--mknodes]\n"
|
||||
"\t[-P|--partial] " "\n"
|
||||
"\t[-v|--verbose]\n"
|
||||
"\t[--version]" "\n",
|
||||
|
||||
ignorelockingfailure_ARG, partial_ARG)
|
||||
ignorelockingfailure_ARG, mknodes_ARG, partial_ARG)
|
||||
|
||||
xx(vgsplit,
|
||||
"Move physical volumes into a new volume group",
|
||||
|
@ -45,6 +45,8 @@ static int vgscan_single(struct cmd_context *cmd, const char *vg_name,
|
||||
|
||||
int vgscan(struct cmd_context *cmd, int argc, char **argv)
|
||||
{
|
||||
int maxret, ret;
|
||||
|
||||
if (argc) {
|
||||
log_error("Too many parameters on command line");
|
||||
return EINVALID_CMD_LINE;
|
||||
@ -58,6 +60,14 @@ int vgscan(struct cmd_context *cmd, int argc, char **argv)
|
||||
|
||||
log_print("Reading all physical volumes. This may take a while...");
|
||||
|
||||
return process_each_vg(cmd, argc, argv, LCK_VG_READ, 1, NULL,
|
||||
maxret = process_each_vg(cmd, argc, argv, LCK_VG_READ, 1, NULL,
|
||||
&vgscan_single);
|
||||
|
||||
if (arg_count(cmd, mknodes_ARG)) {
|
||||
ret = vgmknodes(cmd, argc, argv);
|
||||
if (ret > maxret)
|
||||
maxret = ret;
|
||||
}
|
||||
|
||||
return maxret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user