All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takahiro Yasui <tyasui@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 8 of 13] LVM: add logic to allow mirrored log
Date: Mon, 22 Feb 2010 01:08:02 -0500	[thread overview]
Message-ID: <4B821F42.8000200@redhat.com> (raw)
In-Reply-To: <201002171756.o1HHuw4H004907@hydrogen.msp.redhat.com>

Jonathan Brassow wrote:
>  static int _lv_update_log_type(struct cmd_context *cmd,
> @@ -657,21 +672,48 @@ static int _lv_update_log_type(struct cm
>  			       struct logical_volume *lv,
>  			       int log_count)
>  {
...
> +	log_lv = first_seg(original_lv)->log_lv;
> +
> +	/* Adding redundancy to the log */
> +	if (old_log_count < log_count) {
> +		log_error("Adding log redundancy not supported yet.");
> +		log_error("Try converting the log to 'core' first.");
> +		return_0;
>  	}
> -	return 1;
> +
> +	/* Reducing redundancy of the log */
> +	return remove_mirror_images(log_lv, log_count,
> +				    lp->pv_count ? lp->pvh : NULL, 1U);
>  }

Should we pass lp->pvh even if lp->pv_count is 0?

+	return remove_mirror_images(log_lv, log_count, lp->pvh, 1U);

Looking at remove_mirror_images(), the third agrument, removable_pvs,
is used to decide which mirror leg should be removed. When lp->pv_count
is 0, lp->pvh has the list of PVs in the VG (see lvconvert_single())
and the PV list needs to be passed to remove_mirror_images().

This issue is found during tests. When the primary leg of the mirrored
log (e.g. vg00-lv00_mlog_mimage_0) failed, lvconvert --repair vg00/lv00
didn't recover the vg00/lv00.

With the above fix, lvconvert --repair vg00/lv00 worked well when
the primary leg of the mirrored log failed.

Thanks,
Taka



      parent reply	other threads:[~2010-02-22  6:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 17:56 [PATCH 8 of 13] LVM: add logic to allow mirrored log Jonathan Brassow
2010-02-19  1:41 ` Takahiro Yasui
2010-02-22  6:08 ` Takahiro Yasui [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B821F42.8000200@redhat.com \
    --to=tyasui@redhat.com \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.