1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvconvert more test for thin external origin

Some LV types were not properly disallowed to be used as external origin.
This commit is contained in:
Zdenek Kabelac 2014-10-06 13:15:31 +02:00
parent 60d2a63368
commit b2b18a5f8b
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.112 -
=====================================
Fix detection of unsupported thin external lvconversions.
Fix detection of unsupported cache and thin pool lvconversions.
Fix detection of unsupported lvconversion of cache to snapshot.
Improve code for creation of cache and cache pool volumes.

View File

@ -2664,8 +2664,13 @@ static int _lvconvert_thin(struct cmd_context *cmd,
return 0;
}
if (lv_is_pool(lv)) {
log_error("Can't use pool %s as external origin.",
if (lv_is_cache_type(lv) ||
lv_is_cow(lv) ||
lv_is_pool(lv) ||
lv_is_thin_pool_data(lv) ||
lv_is_thin_pool_metadata(lv)) {
log_error("Can't use %s %s as external origin.",
first_seg(lv)->segtype->name,
display_lvname(lv));
return 0;
}