mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
writecache: don't pvmove device used by writecache
The existing check didn't cover the unusual case where the cachevol exists on the same device as the origin LV.
This commit is contained in:
parent
247f69f9aa
commit
e7f107c246
@ -387,6 +387,15 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (lv_is_writecache(lv)) {
|
||||
struct logical_volume *lv_cachevol = first_seg(lv)->writecache;
|
||||
if (lv_is_on_pvs(lv_cachevol, source_pvl)) {
|
||||
log_error("Unable to move device used for writecache cachevol %s.", display_lvname(lv_cachevol));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (lv_is_raid(lv) && lv_raid_has_integrity(lv)) {
|
||||
log_error("Unable to pvmove device used for raid with integrity.");
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user