Repository navigation
fix(satellite): resize only a DRBD device short of its definition - #333
Open
Andrei Kvapil (kvaps) wants to merge 1 commit into
Open
Andrei Kvapil (kvaps) wants to merge 1 commit into
Andrei Kvapil (kvaps) wants to merge 1 commit into
Conversation
A restore received from another node arrives at the snapshot's size, and its backing grows to the definition before the replica's first activation creates metadata on it, so the device attaches at the new size. The pass still ran `drbdadm resize` after the attach because its backing had grown, and when the replica was already connected (a tiebreaker witness taken over by the placement) it was resyncing by then: DRBD refused with "Resize not allowed during resync" and every such restore logged a failed apply. Resize only when some volume's DRBD device, read from sysfs, is smaller than its definition, as LINSTOR does. A device that cannot be measured still gets the resize. Assisted-by: LLM Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Andrei Kvapil (kvaps)
requested review from
IvanHunters and
Aleksei Sviridkin (lexfrei)
as code owners
November 25, 2026 18:34
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A restore with grow logged
Apply per-resource failure ... drbdadm resize --assume-clean ...: Failure: (130) Resize not allowed during resynconce for every restored volume, followed byApplySucceededa moment later.The replica that hits it is the one placed on a node without the snapshot. It receives the snapshot from a peer at the snapshot's size, its backing grows to the definition before its first activation creates the metadata, and the device then attaches at the definition's size. The pass still ran
drbdadm resizeafter the attach because its backing had grown. When that replica was a tiebreaker witness taken over by the placement (linstor-csi adds the preferred-segment replica alone and the rest with a second autoplace, so the definition briefly has two diskful replicas and gets a witness), it was already connected and resyncing by then, and DRBD refused the resize. The refusal changes nothing in the kernel, but it shows up as a Warning on every such restore.The resize now runs only when some volume's DRBD device, read from sysfs, is smaller than its definition. That is the condition LINSTOR resizes on (DrbdLayer.needsResize, TOO_SMALL). A device that cannot be measured still gets the resize, so a grow whose resize failed is retried as before.
Test:
TestApplyResizesOnlyADeviceShortOfTheDefinitiongrows a backing held at the old size and checks thatdrbdadm resizeruns when the device stays short and does not run when the device already reports the definition. It fails without the change.