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

Retain activation state after changing LV minor number with --force.

This commit is contained in:
Alasdair Kergon 2006-10-13 21:33:31 +00:00
parent a8e13f0505
commit a590f3b6a3
2 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,7 @@
Version 2.02.12 -
===================================
Propogate clustered flag in vgsplit and require resizeable flag.
Retain activation state after changing LV minor number with --force.
Propagate clustered flag in vgsplit and require resizeable flag.
Version 2.02.11 - 12th October 2006
===================================

View File

@ -294,16 +294,15 @@ static int lvchange_persistent(struct cmd_context *cmd,
log_error("Major number must be specified with -My");
return 0;
}
if (lv_info(cmd, lv, &info, 0) && info.exists &&
!arg_count(cmd, force_ARG)) {
if (yes_no_prompt("Logical volume %s will be "
"deactivated temporarily. "
"Continue? [y/n]: ", lv->name) == 'n') {
log_print("%s device number not changed.",
lv->name);
return 0;
}
if (lv_info(cmd, lv, &info, 0) && info.exists)
active = 1;
if (active && !arg_count(cmd, force_ARG) &&
yes_no_prompt("Logical volume %s will be "
"deactivated temporarily. "
"Continue? [y/n]: ", lv->name) == 'n') {
log_print("%s device number not changed.",
lv->name);
return 0;
}
log_verbose("Ensuring %s is inactive.", lv->name);
if (!deactivate_lv(cmd, lv)) {