[lvm-devel] [Patch]: Handle both devices of a mirrored log failing (bug 607347)

Petr Rockai prockai at redhat.com
Fri Jul 2 09:06:43 UTC 2010


Hi,

Jonathan Brassow <jbrassow at redhat.com> writes:
> Fix for bug 607347: failing both redundant mirror log legs...
>
> Rather than attempting to remove all the images of a mirrored
> log volume via remove_mirror_images, simply remove the log
> if all its devices have failed.
>
> Index: LVM2/tools/lvconvert.c
> ===================================================================
> --- LVM2.orig/tools/lvconvert.c
> +++ LVM2/tools/lvconvert.c
> @@ -705,9 +705,12 @@ static int _lv_update_mirrored_log(struc
>  		return 1;
>  
>  	/* Reducing redundancy of the log */
> -	return remove_mirror_images(log_lv, log_count,
> -				    is_mirror_image_removable,
> -				    operable_pvs, 0U);
> +	if (log_count)
> +		return remove_mirror_images(log_lv, log_count,
> +					    is_mirror_image_removable,
> +					    operable_pvs, 0U);
> +
> +	return remove_mirror_log(lv->vg->cmd, lv, operable_pvs);
>  }
>  
>  static int _lv_update_log_type(struct cmd_context *cmd,
Looks OK (but not tested). Adding a test to the suite would be quite
welcome (one that fails before this patch and works after).

Yours,
   Petr.

Reviewed-By: prockai at redhat.com




More information about the lvm-devel mailing list