[Drbd-dev] [PATCH] drbd-utils: Fix the default node id initialization when upgrade v8 to v9

Lars Ellenberg lars.ellenberg at linbit.com
Mon Jan 16 11:35:02 CET 2017


On Fri, Jan 13, 2017 at 10:01:50AM -0900, David M. Syzdek wrote:
> 
> 
> > On Jan 13, 2017, at 2:03 AM, Lars Ellenberg <lars.ellenberg at linbit.com> wrote:
> > 
> > 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.
> 
> If by configuration, you are referring the .res resource file, then
> this may be the intention, however this is not currently the case.  I
> am able to initialize a new resource on two peers using the following
> config without using the ’node-id’ directives:

Yes, I forgot, if we find a two-node-only 8 compat config,
we sort the IP addresses (or something),
and use that to implicitly assign node-id.

works for most "simple" setups,
may break for more interesting ones
(IPs look different depending on node)

> > Also, IMO, in virtually all 8 -> 9 upgrade scenarios, you are better off
> > creating new DRBD 9 meta data instead of trying to "convert”.
> 
> Is there a technical reason

There are two basic scenarios, "rolling" upgrade,
and "stop, replace, and restart the world". 

"stop the world" obviously means downtime.
But for the "rolling" upgrade,
you need more steps and at least a switchover,
which typically also implies a downtime.

My preferred upgrade procedure would be "replace the world"
 * make sure all data is "stable" and in sync
 * stop all services (yes, that means a short down time)
 * upgrade modules
 * recreate meta data, and prepare to skip the initial sync,
   because we know everything is in sync (see first step)
   potentially allocating more bitmap slots in preparation for N > 2.
 * bring it all online.

If that is not acceptable, or you think the rolling upgrade incurs less
service interruption, you go with the "upgrade meta data in place"
procedure, and hope we got that right :-)

-- 
: Lars Ellenberg
: LINBIT | Keeping the Digital World Running
: DRBD -- Heartbeat -- Corosync -- Pacemaker
: R&D, Integration, Ops, Consulting, Support

DRBD® and LINBIT® are registered trademarks of LINBIT


More information about the drbd-dev mailing list