diff --git a/WHATS_NEW b/WHATS_NEW index 838eb41bb..4fa881c29 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.108 - ================================= + Enhance private volumes UUIDs with suffixed for easier detection. Do not use reserved _[tc]meta volumes for temporary LVs. Leave backup pool metadata with _meta%d suffix instead of reserved _tmeta%d. Allow RAID repair to reuse PVs from same image that suffered a failure. diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c index be6298b22..79357f24c 100644 --- a/lib/misc/lvm-string.c +++ b/lib/misc/lvm-string.c @@ -178,8 +178,24 @@ char *build_dm_uuid(struct dm_pool *mem, const struct logical_volume *lv, { const char *lvid = lv->lvid.s; - if (!layer && lv_is_thin_pool(lv)) - layer = "pool"; + if (!layer) { + /* + * Mark internal LVs with layer suffix + * so tools like blkid may immeditelly see it's + * an internal LV they should not scan + * Should also make internal detection simpler + */ + layer = lv_is_cache_pool_data(lv) ? "cdata" : + lv_is_cache_pool_metadata(lv) ? "cmeta" : + lv_is_mirror_image(lv) ? "mimage" : + lv_is_mirror_log(lv) ? "mlog" : + lv_is_raid_image(lv) ? "rimage" : + lv_is_raid_metadata(lv) ? "rmeta" : + lv_is_thin_pool(lv) ? "pool" : + lv_is_thin_pool_data(lv) ? "tdata" : + lv_is_thin_pool_metadata(lv) ? "tmeta" : + NULL; + } return dm_build_dm_uuid(mem, UUID_PREFIX, lvid, layer); }