Skip to contentSkip to conversation

lv_raid_manip: fix r_mimage_r_rimage_N name flaw resultiong from conversion mirror -> raid1 (bz#1175500)

PATCH Superseded [email protected] 1 participant 1 message Dec 18, 2014

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lv_raid_manip: fix r_mimage_r_rimage_N name flaw resultiong from conversion mirror -> raid1 (bz#1175500)

From: Heinz Mauelshagen <[email protected]>

"lvconvert --type raid1 $LV" to convert from "mirror" to "raid1" results in strange "${LV}_mimage_r_rimage_N" hidden data logical volume names.
This fix returns to the familiar "${LV}_rimage_N" namespace.

---
 lib/metadata/raid_manip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/metadata/raid_manip.c +1 -1
index 59d3adb..e7229d0 100644
@@ -1409,7 +1409,7 @@ static int _convert_mirror_to_raid1(struct logical_volume *lv,
 	}
 
 	for (s = 0; s < seg->area_count; ++s) {
-		if (!(new_name = _generate_raid_name(seg_lv(seg, s), "rimage", s)))
+		if (!(new_name = _generate_raid_name(lv), "rimage", s)))
 			return_0;
 		log_debug_metadata("Renaming %s to %s", seg_lv(seg, s)->name, new_name);
 		seg_lv(seg, s)->name = new_name;
Signature · 1 line
2.1.0