From: Lars Ellenberg <lars.ellenberg@linbit.com>
To: Nick Wang <nwang@suse.com>
Cc: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] [PATCH] drbd-utils: Fix the default node id initialization when upgrade v8 to v9
Date: Fri, 13 Jan 2017 12:03:45 +0100 [thread overview]
Message-ID: <20170113110345.GA9172@soda.linbit> (raw)
In-Reply-To: <1484288158-25952-1-git-send-email-nwang@suse.com>
On Fri, Jan 13, 2017 at 02:15:58PM +0800, Nick Wang wrote:
> Node id will be initialized as "0" in md_convert_08_to_09() when upgrading to drbd9
> (still using two nodes without changing configuration like expliciting set the node id).
With DRBD 9, you *have* to set the node id in the configuration.
If there is a way around that, we need to fix it.
Also, IMO, in virtually all 8 -> 9 upgrade scenarios, you are better off
creating new DRBD 9 meta data instead of trying to "convert".
Still; your suggestion seems sensible enough.
Thanks,
Lars
> diff --git a/user/shared/drbdmeta.c b/user/shared/drbdmeta.c
> index 9a28984..e2a9606 100644
> --- a/user/shared/drbdmeta.c
> +++ b/user/shared/drbdmeta.c
> @@ -3868,6 +3868,7 @@ void md_convert_08_to_09(struct format *cfg)
>
> cfg->md.flags &= ~(MDF_CONNECTED_IND | MDF_FULL_SYNC | MDF_PEER_OUT_DATED);
>
> + cfg->md.node_id = -1;
> cfg->md.magic = DRBD_MD_MAGIC_09;
> re_initialize_md_offsets(cfg);
next prev parent reply other threads:[~2017-01-13 11:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-13 6:15 [Drbd-dev] [PATCH] drbd-utils: Fix the default node id initialization when upgrade v8 to v9 Nick Wang
2017-01-13 9:00 ` Roland Kammerer
2017-01-13 11:03 ` Lars Ellenberg [this message]
2017-01-16 2:30 ` Nick Wang
[not found] ` <F749D893-B652-4BA8-AA15-AD88344EE2F9@acsalaska.com>
2017-01-16 10:35 ` Lars Ellenberg
2017-01-18 3:14 ` Nick Wang
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=20170113110345.GA9172@soda.linbit \
--to=lars.ellenberg@linbit.com \
--cc=drbd-dev@lists.linbit.com \
--cc=nwang@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox