mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
thin: removal of external_origin
This commit is contained in:
parent
30c13eff37
commit
2cba0ea9f9
@ -3352,6 +3352,12 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv_is_external_origin(lv)) {
|
||||
log_error("Can't remove external origin logical volume \"%s\".",
|
||||
lv->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv->status & MIRROR_IMAGE) {
|
||||
log_error("Can't remove logical volume %s used by a mirror",
|
||||
lv->name);
|
||||
@ -3578,6 +3584,10 @@ int lv_remove_with_dependencies(struct cmd_context *cmd, struct logical_volume *
|
||||
return_0;
|
||||
}
|
||||
|
||||
if (lv_is_external_origin(lv) &&
|
||||
!_lv_remove_segs_using_this_lv(cmd, lv, force, level, "external origin"))
|
||||
return_0;
|
||||
|
||||
if (lv_is_used_thin_pool(lv) &&
|
||||
!_lv_remove_segs_using_this_lv(cmd, lv, force, level, "pool"))
|
||||
return_0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user