mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvchange: better --refresh of raid and mirrors
Use lv_check_not_in_use() to detect openned device. Plain info.open_count is not good enough for udev random device openning.
This commit is contained in:
parent
57faf97e6f
commit
aa3e413093
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.107 -
|
Version 2.02.107 -
|
||||||
==================================
|
==================================
|
||||||
|
Fix open_count test for lvchange --refresh or mirrors and raids.
|
||||||
Update pvs,vgs,lvs and lvm man page for selection support.
|
Update pvs,vgs,lvs and lvm man page for selection support.
|
||||||
Add -S/--select to lvm devtypes for report selection.
|
Add -S/--select to lvm devtypes for report selection.
|
||||||
Add -S/--select to pvs,vgs,lvs and {pv,vg,lv}display -C for report selection.
|
Add -S/--select to pvs,vgs,lvs and {pv,vg,lv}display -C for report selection.
|
||||||
|
@ -347,7 +347,7 @@ static int lvchange_resync(struct cmd_context *cmd, struct logical_volume *lv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (lv_info(cmd, lv, 0, &info, 1, 0)) {
|
if (lv_info(cmd, lv, 0, &info, 1, 0)) {
|
||||||
if (info.open_count) {
|
if (!lv_check_not_in_use(cmd, lv, &info)) {
|
||||||
log_error("Can't resync open logical volume \"%s\"",
|
log_error("Can't resync open logical volume \"%s\"",
|
||||||
lv->name);
|
lv->name);
|
||||||
return 0;
|
return 0;
|
||||||
@ -363,9 +363,6 @@ static int lvchange_resync(struct cmd_context *cmd, struct logical_volume *lv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sigint_caught())
|
|
||||||
return_0;
|
|
||||||
|
|
||||||
active = 1;
|
active = 1;
|
||||||
if (lv_is_active_exclusive_locally(lv))
|
if (lv_is_active_exclusive_locally(lv))
|
||||||
exclusive = 1;
|
exclusive = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user