mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
uuid: add more private uuid sufixes
Use suffixes for easier detection of private volumes. This commit makes older volume UUIDs incompatible and it most probably needs machine reboot after upgrade.
This commit is contained in:
parent
2ada685216
commit
667f93b7d9
@ -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.
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user