mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
Thin prevent removal of its data and metadata LVs
LVs cannot be removed while there are linked to thin pool. (Gives better error message, than validation).
This commit is contained in:
parent
d55aa53816
commit
0926438aad
@ -3172,6 +3172,12 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv_is_thin_pool_data(lv) || lv_is_thin_pool_metadata(lv)) {
|
||||
log_error("Can't remove logical volume %s used by a thin pool.",
|
||||
lv->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lv->status & LOCKED) {
|
||||
log_error("Can't remove locked LV %s", lv->name);
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user