Skip to content

Autoplacer,block-size: Consider resource group properties for initial min-IO size#480

Open
chrstnwhlrt wants to merge 1 commit intoLINBIT:masterfrom
chrstnwhlrt:fix-block-size-rg-inheritance
Open

Autoplacer,block-size: Consider resource group properties for initial min-IO size#480
chrstnwhlrt wants to merge 1 commit intoLINBIT:masterfrom
chrstnwhlrt:fix-block-size-rg-inheritance

Conversation

@chrstnwhlrt
Copy link
Copy Markdown

When auto-block-size determines the initial block-size for a new volume definition, it only considers the storage pool's hardware min-IO size. If the resource group or volume group has a larger DrbdOptions/Disk/block-size configured, it is ignored because the volume definition is created with empty properties and rscMinIoSizeCheck() only reads from the volume definition directly.

This causes problems on clusters with mixed sector sizes (e.g. 512-byte and 4096-byte disks): the autoplacer picks nodes with the most free space (typically the 512-byte nodes), sets block-size=512 on the volume definition, and then later adding a 4096-byte node fails with "incompatible minimum I/O size" - even though block-size=4096 is explicitly configured on the resource group.

Fix by consulting the PriorityProps hierarchy (resource definition, volume group, resource group) when initially setting the block-size, and using max(pool min-IO size, configured block-size) as the effective value.

@ghernadi
Copy link
Copy Markdown
Contributor

Thanks for the contribution.
I would only suggest 2 small changes:

  1. Add vlmDfn's and controller-level properties (internally called stltProps) to the PriorityProps before querying it.
  2. Add an entry to CHANGELOG.md.

Afterwards we can merge this PR internally, so it will be included in the next release. Even in this case we will need to close this PR, but will of course keep you as committer + author.

Do you want me to make the small changes or do you want to amend your commit?

@chrstnwhlrt chrstnwhlrt force-pushed the fix-block-size-rg-inheritance branch from 0509fb9 to 5a5fbda Compare February 16, 2026 11:01
@chrstnwhlrt
Copy link
Copy Markdown
Author

@ghernadi I made the requested adjustments, let me know if you need anything else

@ghernadi
Copy link
Copy Markdown
Contributor

We pushed our internal master to here on GitHub. Please rebase your PR since at least a constant changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants