Skip to content
Snippets Groups Projects
Commit cad0723b authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix DRBD resize code


There are two bugs in the current resize code, affecting mostly DRBD.

First, due to bugs in old DRBD versions (pre 8.0.14), the code currently
calls `drbdsetup resize' on both the primary or secondary. However,
this is actually wrong per current DRBD (from drbdsetup(8)):

     resize
       This causes DRBD to reexamine the size of the device's backing
       storage device. To actually do online growing you need to
       extend the backing storages on both devices and call the resize
       command on one of your nodes.

So calling it just on the primary node should be enough. However, we
can't simply remove the calls to the secondary nodes, since that would
break the growth of the underlying storage (LVM) on the
secondary. Which leads to the second existing bug: we call resize on
each node, even before finish the growth of the underlying
storage. This can leads to all kind of issues if DRDB is not well
behaved.

So to fix both these bugs, we have to extend the current RPC call with
another parameter, which denotes whether to extend the actual backing
storage or just the "logical" one (DRBD being the only one; MD would
be another, if implemented). This allows us to do the growth in two
steps, first the backing store on all nodes, then the logical storage
on just the primary node.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
parent 3891c95e
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment