diff --git a/WHATS_NEW b/WHATS_NEW index a597c4217..bc958e2b8 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.170 - ================================== + Look for limited thin pool metadata size when using 16G metadata. Add lvconvert pool creation rule disallowing options with poolmetadata. Fix lvconvert when the same LV is incorrectly reused in options. Fix lvconvert VG name validation in option values. diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index a2e399d56..8f7177117 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -260,6 +260,11 @@ static int _info_run(const char *dlid, struct dm_info *dminfo, start *= seg_status->seg->le; length *= _seg_len(seg_status->seg); + /* Uses max DM_THIN_MAX_METADATA_SIZE sectors for metadata device */ + if (lv_is_thin_pool_metadata(seg_status->seg->lv) && + (length > DM_THIN_MAX_METADATA_SIZE)) + length = DM_THIN_MAX_METADATA_SIZE; + do { target = dm_get_next_target(dmt, target, &target_start, &target_length, &target_name, &target_params); diff --git a/test/shell/lvcreate-thin-big.sh b/test/shell/lvcreate-thin-big.sh index 9abc1fdf9..da7812f4a 100644 --- a/test/shell/lvcreate-thin-big.sh +++ b/test/shell/lvcreate-thin-big.sh @@ -37,6 +37,11 @@ lvcreate -L4M --chunksize 64k --poolmetadatasize 17G -T $vg/pool2 2>out grep "WARNING: Maximum" out check lv_field $vg/pool1_tmeta size "2.00m" check lv_field $vg/pool2_tmeta size "16.00g" + +# Check can start and see thinpool with metadata size above kernel limit +lvcreate -L4M --poolmetadatasize 16G -T $vg/poolM +check lv_field $vg/poolM data_percent "0.00" + lvremove -ff $vg # Test automatic calculation of pool metadata size