diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 8c76a38f2..4aefea06f 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -8025,8 +8025,14 @@ struct logical_volume *lv_create_single(struct volume_group *vg, if (!(lp->segtype = get_segtype_from_string(vg->cmd, SEG_TYPE_NAME_THIN_POOL))) return_NULL; + /* We want a lockd lock for the new thin pool, but not the thin lv. */ + lp->needs_lockd_init = 1; + if (!(lv = _lv_create_an_lv(vg, lp, lp->pool_name))) return_NULL; + + lp->needs_lockd_init = 0; + } else if (seg_is_cache(lp)) { if (!lp->origin_name) { /* Until we have --pooldatasize we are lost */ diff --git a/tools/lvcreate.c b/tools/lvcreate.c index e901968d7..39170dd4f 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -1638,8 +1638,7 @@ static int _lvcreate_single(struct cmd_context *cmd, const char *vg_name, lp->snapshot ? lp->origin_name : "", lp->segtype->name); if (is_lockd_type(vg->lock_type)) { - if (cmd->command->command_enum == lvcreate_thin_vol_and_thinpool_CMD || - cmd->command->command_enum == lvcreate_cachepool_CMD || + if (cmd->command->command_enum == lvcreate_cachepool_CMD || cmd->command->command_enum == lvcreate_cache_vol_with_new_origin_CMD || cmd->command->command_enum == lvcreate_thin_vol_with_thinpool_or_sparse_snapshot_CMD || cmd->command->command_enum == lvcreate_cache_vol_with_new_origin_or_convert_to_cache_vol_with_cachepool_CMD) {