mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tools: allow -S|--select for vgchange, lvchange and pvchange
This commit is contained in:
parent
d6c8f0de28
commit
f784c60cd6
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.117 -
|
Version 2.02.117 -
|
||||||
====================================
|
====================================
|
||||||
|
Add support for -S/--select to vgchange,lvchange and pvchange.
|
||||||
Add infrastructure to support selection for non-reporting tools.
|
Add infrastructure to support selection for non-reporting tools.
|
||||||
Add LVM_COMMAND_PROFILE env var to set default command profile name to use.
|
Add LVM_COMMAND_PROFILE env var to set default command profile name to use.
|
||||||
set CLOEXEC flag on file descriptors originating in libdaemon
|
set CLOEXEC flag on file descriptors originating in libdaemon
|
||||||
|
@ -135,6 +135,7 @@ xx(lvchange,
|
|||||||
"\t[-r|--readahead ReadAheadSectors|auto|none]\n"
|
"\t[-r|--readahead ReadAheadSectors|auto|none]\n"
|
||||||
"\t[--refresh]\n"
|
"\t[--refresh]\n"
|
||||||
"\t[--resync]\n"
|
"\t[--resync]\n"
|
||||||
|
"\t[-S|--select Selection]\n"
|
||||||
"\t[--sysinit]\n"
|
"\t[--sysinit]\n"
|
||||||
"\t[-t|--test]\n"
|
"\t[-t|--test]\n"
|
||||||
"\t[-v|--verbose]\n"
|
"\t[-v|--verbose]\n"
|
||||||
@ -144,17 +145,16 @@ xx(lvchange,
|
|||||||
"\tLogicalVolume[Path] [LogicalVolume[Path]...]\n",
|
"\tLogicalVolume[Path] [LogicalVolume[Path]...]\n",
|
||||||
|
|
||||||
activationmode_ARG, addtag_ARG, alloc_ARG, autobackup_ARG, activate_ARG,
|
activationmode_ARG, addtag_ARG, alloc_ARG, autobackup_ARG, activate_ARG,
|
||||||
available_ARG,
|
available_ARG, cachepolicy_ARG, cachesettings_ARG, contiguous_ARG, deltag_ARG,
|
||||||
cachepolicy_ARG, cachesettings_ARG, contiguous_ARG, deltag_ARG, discards_ARG,
|
discards_ARG, detachprofile_ARG, errorwhenfull_ARG, force_ARG,
|
||||||
detachprofile_ARG, errorwhenfull_ARG, force_ARG,
|
|
||||||
ignorelockingfailure_ARG, ignoremonitoring_ARG, ignoreactivationskip_ARG,
|
ignorelockingfailure_ARG, ignoremonitoring_ARG, ignoreactivationskip_ARG,
|
||||||
ignoreskippedcluster_ARG, major_ARG, metadataprofile_ARG, minor_ARG,
|
ignoreskippedcluster_ARG, major_ARG, metadataprofile_ARG, minor_ARG,
|
||||||
monitor_ARG, minrecoveryrate_ARG, maxrecoveryrate_ARG, noudevsync_ARG,
|
monitor_ARG, minrecoveryrate_ARG, maxrecoveryrate_ARG, noudevsync_ARG,
|
||||||
partial_ARG, permission_ARG, persistent_ARG, poll_ARG,
|
partial_ARG, permission_ARG, persistent_ARG, poll_ARG,
|
||||||
raidminrecoveryrate_ARG, raidmaxrecoveryrate_ARG, raidsyncaction_ARG,
|
raidminrecoveryrate_ARG, raidmaxrecoveryrate_ARG, raidsyncaction_ARG,
|
||||||
raidwritebehind_ARG, raidwritemostly_ARG, readahead_ARG, resync_ARG,
|
raidwritebehind_ARG, raidwritemostly_ARG, readahead_ARG, resync_ARG,
|
||||||
refresh_ARG, setactivationskip_ARG, syncaction_ARG, sysinit_ARG, test_ARG,
|
refresh_ARG, select_ARG, setactivationskip_ARG, syncaction_ARG, sysinit_ARG,
|
||||||
writebehind_ARG, writemostly_ARG, zero_ARG)
|
test_ARG, writebehind_ARG, writemostly_ARG, zero_ARG)
|
||||||
|
|
||||||
#define COMMON_OPTS \
|
#define COMMON_OPTS \
|
||||||
"\t[--commandprofile ProfileName] [-d|--debug] [-h|-?|--help]\n" \
|
"\t[--commandprofile ProfileName] [-d|--debug] [-h|-?|--help]\n" \
|
||||||
@ -638,6 +638,7 @@ xx(pvchange,
|
|||||||
"\t[-d|--debug]\n"
|
"\t[-d|--debug]\n"
|
||||||
"\t[-f|--force]\n"
|
"\t[-f|--force]\n"
|
||||||
"\t[-h|--help]\n"
|
"\t[-h|--help]\n"
|
||||||
|
"\t[-S|--select Selection]\n"
|
||||||
"\t[-t|--test]\n"
|
"\t[-t|--test]\n"
|
||||||
"\t[-u|--uuid]\n"
|
"\t[-u|--uuid]\n"
|
||||||
"\t[-x|--allocatable y|n]\n"
|
"\t[-x|--allocatable y|n]\n"
|
||||||
@ -649,7 +650,7 @@ xx(pvchange,
|
|||||||
"\t[PhysicalVolumePath...]\n",
|
"\t[PhysicalVolumePath...]\n",
|
||||||
|
|
||||||
all_ARG, allocatable_ARG, allocation_ARG, autobackup_ARG, deltag_ARG,
|
all_ARG, allocatable_ARG, allocation_ARG, autobackup_ARG, deltag_ARG,
|
||||||
addtag_ARG, force_ARG, metadataignore_ARG, test_ARG, uuid_ARG)
|
addtag_ARG, force_ARG, metadataignore_ARG, select_ARG, test_ARG, uuid_ARG)
|
||||||
|
|
||||||
xx(pvresize,
|
xx(pvresize,
|
||||||
"Resize physical volume(s)",
|
"Resize physical volume(s)",
|
||||||
@ -945,6 +946,7 @@ xx(vgchange,
|
|||||||
"\t[--poll {y|n}]\n"
|
"\t[--poll {y|n}]\n"
|
||||||
"\t[--noudevsync]\n"
|
"\t[--noudevsync]\n"
|
||||||
"\t[--refresh]\n"
|
"\t[--refresh]\n"
|
||||||
|
"\t[-S|--select Selection]\n"
|
||||||
"\t[--sysinit]\n"
|
"\t[--sysinit]\n"
|
||||||
"\t[-t|--test]\n"
|
"\t[-t|--test]\n"
|
||||||
"\t[-u|--uuid]\n"
|
"\t[-u|--uuid]\n"
|
||||||
@ -962,13 +964,13 @@ xx(vgchange,
|
|||||||
"\t[VolumeGroupName...]\n",
|
"\t[VolumeGroupName...]\n",
|
||||||
|
|
||||||
activationmode_ARG, addtag_ARG, alloc_ARG, allocation_ARG, autobackup_ARG,
|
activationmode_ARG, addtag_ARG, alloc_ARG, allocation_ARG, autobackup_ARG,
|
||||||
activate_ARG,
|
activate_ARG, available_ARG, clustered_ARG, deltag_ARG, detachprofile_ARG,
|
||||||
available_ARG, clustered_ARG, deltag_ARG, detachprofile_ARG,
|
|
||||||
ignoreactivationskip_ARG, ignorelockingfailure_ARG, ignoremonitoring_ARG,
|
ignoreactivationskip_ARG, ignorelockingfailure_ARG, ignoremonitoring_ARG,
|
||||||
ignoreskippedcluster_ARG, logicalvolume_ARG, maxphysicalvolumes_ARG,
|
ignoreskippedcluster_ARG, logicalvolume_ARG, maxphysicalvolumes_ARG,
|
||||||
metadataprofile_ARG, monitor_ARG, noudevsync_ARG, metadatacopies_ARG,
|
metadataprofile_ARG, monitor_ARG, noudevsync_ARG, metadatacopies_ARG,
|
||||||
vgmetadatacopies_ARG, partial_ARG, physicalextentsize_ARG, poll_ARG,
|
vgmetadatacopies_ARG, partial_ARG, physicalextentsize_ARG, poll_ARG,
|
||||||
refresh_ARG, resizeable_ARG, resizable_ARG, sysinit_ARG, test_ARG, uuid_ARG)
|
refresh_ARG, resizeable_ARG, resizable_ARG, select_ARG, sysinit_ARG,
|
||||||
|
test_ARG, uuid_ARG)
|
||||||
|
|
||||||
xx(vgck,
|
xx(vgck,
|
||||||
"Check the consistency of volume group(s)",
|
"Check the consistency of volume group(s)",
|
||||||
|
@ -1152,8 +1152,8 @@ int lvchange(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
if (!update || !update_partial_unsafe)
|
if (!update || !update_partial_unsafe)
|
||||||
cmd->handles_missing_pvs = 1;
|
cmd->handles_missing_pvs = 1;
|
||||||
|
|
||||||
if (!argc) {
|
if (!argc && !arg_is_set(cmd, select_ARG)) {
|
||||||
log_error("Please give logical volume path(s)");
|
log_error("Please give logical volume path(s) or provide selection criteria.");
|
||||||
return EINVALID_CMD_LINE;
|
return EINVALID_CMD_LINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,8 @@ int pvchange(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(arg_count(cmd, all_ARG)) && !argc && !handle->internal_report_for_select) {
|
if (!(arg_count(cmd, all_ARG)) && !argc && !handle->internal_report_for_select) {
|
||||||
log_error("Please give a physical volume path");
|
log_error("Please give a physical volume path "
|
||||||
|
"or use -S for selection.");
|
||||||
r = EINVALID_CMD_LINE;
|
r = EINVALID_CMD_LINE;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user