mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvchange: improve refresh for merging thin volume
When running lvchange --refresh on merging thin volume, try to deactivate snapshot thinLV in case it's preventing startup of merge process.
This commit is contained in:
parent
7e5881dd13
commit
88c19d5d72
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.151 -
|
Version 2.02.151 -
|
||||||
=================================
|
=================================
|
||||||
|
lvchange --refresh for merging thin origin will retry to deactivate snapshot.
|
||||||
Recognize in-progress snapshot merge for thin volumes from dm table.
|
Recognize in-progress snapshot merge for thin volumes from dm table.
|
||||||
Avoid deciding to initiate a pending snapshot merge during resume.
|
Avoid deciding to initiate a pending snapshot merge during resume.
|
||||||
Improve retrying lvmetad requests while lvmetad is being updated.
|
Improve retrying lvmetad requests while lvmetad is being updated.
|
||||||
|
@ -1080,6 +1080,16 @@ int lv_change_activate(struct cmd_context *cmd, struct logical_volume *lv,
|
|||||||
|
|
||||||
int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv)
|
int lv_refresh(struct cmd_context *cmd, struct logical_volume *lv)
|
||||||
{
|
{
|
||||||
|
struct logical_volume *snapshot_lv;
|
||||||
|
|
||||||
|
if (lv_is_merging_origin(lv)) {
|
||||||
|
snapshot_lv = find_snapshot(lv)->lv;
|
||||||
|
if (lv_is_thin_type(snapshot_lv) && !deactivate_lv(cmd, snapshot_lv))
|
||||||
|
log_print_unless_silent("Delaying merge for origin volume %s since "
|
||||||
|
"snapshot volume %s is still active.",
|
||||||
|
display_lvname(lv), display_lvname(snapshot_lv));
|
||||||
|
}
|
||||||
|
|
||||||
if (!lv_refresh_suspend_resume(cmd, lv))
|
if (!lv_refresh_suspend_resume(cmd, lv))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user