1
0
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:
Zdenek Kabelac 2012-01-25 08:57:25 +00:00
parent d55aa53816
commit 0926438aad

View File

@ -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;