mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
pvmove: prevent moving writecache device
This commit is contained in:
parent
379a7e1288
commit
c1ee6f0eef
@ -376,6 +376,11 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lv_is_writecache_cachevol(lv)) {
|
||||||
|
log_error("Unable to pvmove device used for writecache.");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
seg = first_seg(lv);
|
seg = first_seg(lv);
|
||||||
if (!needs_exclusive) {
|
if (!needs_exclusive) {
|
||||||
/* Presence of exclusive LV decides whether pvmove must be also exclusive */
|
/* Presence of exclusive LV decides whether pvmove must be also exclusive */
|
||||||
@ -615,6 +620,11 @@ static int _pvmove_setup_single(struct cmd_context *cmd,
|
|||||||
log_error("Logical volume %s not found.", lv_name);
|
log_error("Logical volume %s not found.", lv_name);
|
||||||
return ECMD_FAILED;
|
return ECMD_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (lv_is_writecache(lv)) {
|
||||||
|
log_error("pvmove not allowed on LV using writecache.");
|
||||||
|
return ECMD_FAILED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user