1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

thin: repaired LV uses _meta%d

Don't leave 'regular' LV with reserved suffix for a user.
After succefull repair use 'normal' (non-reserved) LV name
for backup of original metadata.
This commit is contained in:
Zdenek Kabelac 2014-06-30 11:01:04 +02:00
parent b6fe906956
commit eadcea2dae
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.108 -
=================================
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.
New RAID images now avoid allocation on any PVs in the same parent RAID LV.
Always reevaluate filters just before creating PV.

View File

@ -380,7 +380,7 @@ Only inactive thin pool volumes can be repaired.
There is no validation of metadata between kernel and lvm2.
This requires further manual work.
After successfull repair the old unmodified metadata are still
available in \fB<pool>_tmeta<n>\fP LV.
available in \fB<pool>_meta<n>\fP LV.
.TP
.B \-\-replace \fIPhysicalVolume
Remove the specified device (\fIPhysicalVolume\fP) and replace it with one

View File

@ -2468,8 +2468,8 @@ deactivate_pmslv:
if (!handle_pool_metadata_spare(pool_lv->vg, 0, NULL, 1))
stack;
if (dm_snprintf(meta_path, sizeof(meta_path), "%s%%d", mlv->name) < 0) {
log_error("Can't prepare new name for %s.", mlv->name);
if (dm_snprintf(meta_path, sizeof(meta_path), "%s_meta%%d", pool_lv->name) < 0) {
log_error("Can't prepare new metadata name for %s.", pool_lv->name);
return 0;
}
@ -2488,7 +2488,7 @@ deactivate_pmslv:
if (!attach_pool_metadata_lv(first_seg(pool_lv), pmslv))
return_0;
/* Used _tmeta will become visible _tmeta%d */
/* Used _tmeta will become visible _meta%d */
if (!lv_rename_update(cmd, mlv, pms_path, 0))
return_0;
@ -2499,7 +2499,7 @@ deactivate_pmslv:
mlv->vg->name, mlv->name);
log_warn("WARNING: Use pvmove command to move \"%s/%s\" on the best fitting PV.",
mlv->vg->name, first_seg(pool_lv)->metadata_lv->name);
pool_lv->vg->name, first_seg(pool_lv)->metadata_lv->name);
return 1;
}