diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2021-07-14 12:53:47 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2021-07-14 12:56:08 +0200 |
commit | d38fdb25e4debc035f1e4585432c2627460d5e50 (patch) | |
tree | 8f3bbd4cafcbb8c1000e9680753d648077da1130 /lib/activate | |
parent | e33c2e032cab40cf8607afa1cb92176400d1cabd (diff) | |
download | lvm2-d38fdb25e4debc035f1e4585432c2627460d5e50.tar.gz |
thin: fix component detection of external origin
When check active componet of thinLV with external origin,
we need to check if the external origin isn't already active.
For this however we need to use layered check for -real device.
Diffstat (limited to 'lib/activate')
-rw-r--r-- | lib/activate/activate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 6bda7385b..94fc9441d 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -2740,7 +2740,10 @@ static int _component_cb(struct logical_volume *lv, void *data) (lv_is_thin_pool(lv) && pool_is_active(lv))) return -1; - if (lv_is_active(lv)) { + /* External origin is activated through thinLV and uses -real suffix. + * Note: for old clustered logic we would need to check for all thins */ + if ((lv_is_external_origin(lv) && lv_info(lv->vg->cmd, lv, 1, NULL, 0, 0)) || + lv_is_active(lv)) { if (!lv_is_component(lv) || lv_is_visible(lv)) return -1; /* skip whole subtree */ |