[lvm-devel] master - lvconvert: do not activate cache pool
Zdenek Kabelac
zkabelac at fedoraproject.org
Tue Apr 8 09:02:51 UTC 2014
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=43f849296e1e4b5450681e275495450bf041a11b
Commit: 43f849296e1e4b5450681e275495450bf041a11b
Parent: db4cf3010640307d1764cebf2c7497676d209383
Author: Zdenek Kabelac <zkabelac at redhat.com>
AuthorDate: Mon Apr 7 23:52:22 2014 +0200
Committer: Zdenek Kabelac <zkabelac at redhat.com>
CommitterDate: Tue Apr 8 11:00:14 2014 +0200
lvconvert: do not activate cache pool
Cache pool cannot be active alone.
---
tools/lvconvert.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 1331620..94d870a 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -2698,8 +2698,11 @@ static int _lvconvert_to_pool(struct cmd_context *cmd,
return 0;
}
- /* Allow to have only thinpool active and restore it's active state */
- activate_pool = lv_is_active(pool_lv);
+ if (segtype_is_cache_pool(lp->segtype))
+ activate_pool = 0; /* Cannot activate cache pool */
+ else
+ /* Allow to have only thinpool active and restore it's active state */
+ activate_pool = lv_is_active(pool_lv);
/* We are changing target type, so deactivate first */
if (!deactivate_lv(cmd, pool_lv)) {
More information about the lvm-devel
mailing list