1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvconvert: do not ignore -f in lvconvert --repair -y -f

This commit is contained in:
Peter Rajnoha 2012-12-11 09:52:54 +01:00
parent 1ec6a59dcf
commit f942ae4a7a
2 changed files with 14 additions and 11 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.99 -
===================================
Do not ignore -f in lvconvert --repair -y -f for mirror and raid volumes.
Disallow pvmove on RAID LVs until they are addressed properly
Allow empty activation/{auto_activation|read_only|}_volume_list config option.
Add lvm.conf option global/thin_disabled_features.

View File

@ -806,14 +806,14 @@ static void _lvconvert_mirrors_repair_ask(struct cmd_context *cmd,
return;
}
if (yes)
return;
if (force != PROMPT) {
*replace_log = *replace_mirrors = 0;
return;
}
if (yes)
return;
if (failed_log &&
yes_no_prompt("Attempt to replace failed mirror log? [y/n]: ") == 'n') {
*replace_log = 0;
@ -1523,29 +1523,31 @@ static void _lvconvert_raid_repair_ask(struct cmd_context *cmd, int *replace_dev
int force = arg_count(cmd, force_ARG);
int yes = arg_count(cmd, yes_ARG);
*replace_dev = 0;
*replace_dev = 1;
if (arg_count(cmd, use_policies_ARG)) {
dev_policy = find_config_tree_str(cmd, "activation/raid_fault_policy", DEFAULT_RAID_FAULT_POLICY);
if (!strcmp(dev_policy, "allocate") ||
!strcmp(dev_policy, "replace"))
*replace_dev = 1;
/* else if (!strcmp(dev_policy, "anything_else")) -- ignore */
return;
/* else if (!strcmp(dev_policy, "anything_else")) -- no replace */
*replace_dev = 0;
return;
}
if (yes) {
*replace_dev = 1;
if (force != PROMPT) {
*replace_dev = 0;
return;
}
if (force != PROMPT)
if (yes)
return;
if (yes_no_prompt("Attempt to replace failed RAID images "
"(requires full device resync)? [y/n]: ") == 'y') {
*replace_dev = 1;
"(requires full device resync)? [y/n]: ") == 'n') {
*replace_dev = 0;
}
}