mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
Add --nolocking option for read operations if locking is failing/unavailable.
This commit is contained in:
parent
7fa2d1a092
commit
acd03445c3
@ -13,6 +13,7 @@ arg(version_ARG, '\0', "version", NULL)
|
||||
arg(quiet_ARG, '\0', "quiet", NULL)
|
||||
arg(physicalvolumesize_ARG, '\0', "setphysicalvolumesize", size_mb_arg)
|
||||
arg(ignorelockingfailure_ARG, '\0', "ignorelockingfailure", NULL)
|
||||
arg(nolocking_ARG, '\0', "nolocking", NULL)
|
||||
arg(metadatacopies_ARG, '\0', "metadatacopies", int_arg)
|
||||
arg(metadatasize_ARG, '\0', "metadatasize", size_mb_arg)
|
||||
arg(restorefile_ARG, '\0', "restorefile", string_arg)
|
||||
|
@ -301,9 +301,9 @@ xx(lvs,
|
||||
"\t[--version]" "\n"
|
||||
"\t[LogicalVolume[Path] [LogicalVolume[Path]...]]\n",
|
||||
|
||||
aligned_ARG, ignorelockingfailure_ARG, noheadings_ARG, nosuffix_ARG,
|
||||
options_ARG, partial_ARG, segments_ARG, separator_ARG, sort_ARG,
|
||||
unbuffered_ARG, units_ARG)
|
||||
aligned_ARG, ignorelockingfailure_ARG, noheadings_ARG, nolocking_ARG,
|
||||
nosuffix_ARG, options_ARG, partial_ARG, segments_ARG, separator_ARG,
|
||||
sort_ARG, unbuffered_ARG, units_ARG)
|
||||
|
||||
xx(lvscan,
|
||||
"List all logical volumes in all volume groups",
|
||||
@ -483,8 +483,9 @@ xx(pvs,
|
||||
"\t[--version]\n"
|
||||
"\t[PhysicalVolume [PhysicalVolume...]]\n",
|
||||
|
||||
aligned_ARG, ignorelockingfailure_ARG, noheadings_ARG, nosuffix_ARG,
|
||||
options_ARG, separator_ARG, sort_ARG, unbuffered_ARG, units_ARG)
|
||||
aligned_ARG, ignorelockingfailure_ARG, noheadings_ARG, nolocking_ARG,
|
||||
nosuffix_ARG, options_ARG, separator_ARG, sort_ARG, unbuffered_ARG,
|
||||
units_ARG)
|
||||
|
||||
xx(pvscan,
|
||||
"List all physical volumes",
|
||||
@ -758,8 +759,9 @@ xx(vgs,
|
||||
"\t[--version]\n"
|
||||
"\t[VolumeGroupName [VolumeGroupName...]]\n",
|
||||
|
||||
aligned_ARG, ignorelockingfailure_ARG, noheadings_ARG, nosuffix_ARG,
|
||||
options_ARG, partial_ARG, separator_ARG, sort_ARG, unbuffered_ARG, units_ARG)
|
||||
aligned_ARG, ignorelockingfailure_ARG, noheadings_ARG, nolocking_ARG,
|
||||
nosuffix_ARG, options_ARG, partial_ARG, separator_ARG, sort_ARG,
|
||||
unbuffered_ARG, units_ARG)
|
||||
|
||||
xx(vgscan,
|
||||
"Search for all volume groups",
|
||||
|
@ -764,8 +764,12 @@ static int _run_command(struct cmd_context *cmd, int argc, char **argv)
|
||||
if ((ret = _process_common_commands(cmd)))
|
||||
goto out;
|
||||
|
||||
locking_type = find_config_int(cmd->cft->root, "global/locking_type",
|
||||
1);
|
||||
if (arg_count(cmd, nolocking_ARG))
|
||||
locking_type = 0;
|
||||
else
|
||||
locking_type = find_config_int(cmd->cft->root,
|
||||
"global/locking_type", 1);
|
||||
|
||||
if (!init_locking(locking_type, cmd->cft)) {
|
||||
log_error("Locking type %d initialisation failed.",
|
||||
locking_type);
|
||||
|
Loading…
Reference in New Issue
Block a user