From: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
To: lvm-devel@redhat.com
Subject: LVM2 ./WHATS_NEW man/lvchange.8 tools/args.h t ...
Date: Mon, 23 Oct 2006 20:17:40 -0400 [thread overview]
Message-ID: <453D5BA4.9000107@ce.jp.nec.com> (raw)
In-Reply-To: <20061023230356.28539.qmail@sourceware.org>
Hi Jonathan, Alasdair,
Thanks for updating forcesync patch.
I have 2 comments, one for man page and the other for a minor bug.
agk at sourceware.org wrote:
> +.I \-\-forcesync
> +This option only make sense if the logical volume being operated
> +on is a mirrored logical volume. This option is used to
> +resynchronize the devices in a mirrored logical volume. Since
> +resynchronization can take considerable time and resources, you
> +should consider using this option only if you have reason to
> +believe that the devices in your mirror are no longer the same.
> +.TP
I think it's better to emphasize that
- resynchronization is generally done automatically based on
persistent mirror log or upon activation if there is no log.
- resynchronization is done in background, so the completion of
'lvchange --forcesync' doesn't mean the devices are resynchronized.
So how about something like this?
This option only makes sense if the logical volume being operated
on is a mirrored logical volume. This option is used to reset
the sync status and start resynchronization of the devices in a
mirrored logical volume. Please note that generally resynchronization
is done automatically based on persistent log or upon every activation
in case of in-memory log. Since resynchronization can take considerable
time and resources, you should consider using this option only if
you have reason to believe that the devices in your mirror are no
longer the same.
> +static int lvchange_forcesync(struct cmd_context *cmd,
> + struct logical_volume *lv)
> +{
> + int active = 0;
...
> +
> + if (lv_info(cmd, lv, &info, 1)) {
> + if (info.open_count) {
> + log_error("Can't resync open logical volume \"%s\"",
> + lv->name);
> + return ECMD_FAILED;
> + }
> +
> + if (info.exists && !arg_count(cmd, yes_ARG)) {
> + if (yes_no_prompt("Do you really want to deactivate "
> + "logical volume %s to resync it? [y/n]: ",
> + lv->name) == 'n') {
> + log_print("Logical volume \"%s\" not resynced",
> + lv->name);
> + return ECMD_FAILED;
> + }
> + }
> +
> + active = 1;
> + }
This "active = 1" should be set only if info.exists is true,
because lv_info() succeeds even if the lv is not activated.
Thanks,
--
Jun'ichi Nomura, NEC Corporation of America
next prev parent reply other threads:[~2006-10-24 0:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-23 23:03 LVM2 ./WHATS_NEW man/lvchange.8 tools/args.h t agk
2006-10-24 0:17 ` Jun'ichi Nomura [this message]
2006-10-24 14:46 ` Jonathan E Brassow
2006-10-24 15:27 ` Alasdair G Kergon
-- strict thread matches above, loose matches on Subject: below --
2006-10-24 17:18 agk
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=453D5BA4.9000107@ce.jp.nec.com \
--to=j-nomura@ce.jp.nec.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.