Skip to content

Block pool - #56

Draft
zmc wants to merge 3 commits into
stacks-0-prereqsfrom
stacks-1-block-pool
Draft

zmc wants to merge 3 commits into
stacks-0-prereqsfrom
stacks-1-block-pool

Conversation

@zmc

@zmc zmc commented Oct 21, 2026

Copy link
Copy Markdown
Member

Optionally back loop devices with slices of a dedicated disk or partition instead of sparse files. The pool enrolls an empty device, refuses anything that isn't empty or its own, and clears BlueStore label copies when it takes a slice back. Testnodes switch to the shared loop device code, and ceph-devstack block-pool status shows allocations.

Testing

On folio12, enrolled a 1.5T NVMe device and ran 12 testnodes from it through teuthology:no-ceph and orch:cephadm:smoke-small. After smoke-small, releasing the slices cleared every OSD's BlueStore labels (checked at +0 and +1G); before that fix, reused slices yielded no OSDs.

zmc added 3 commits October 21, 2026 14:30
Loop devices can now be backed by slices of a dedicated disk or
partition instead of sparse files.

- BlockPool enrolls an empty device and hands out fixed-size regions,
  tracked in a locked state file. It refuses devices that aren't empty
  or aren't its own.
- Released regions are zeroed wherever BlueStore keeps a label copy;
  otherwise ceph-volume silently skips a reused region.
- LoopDeviceMixin picks free loop numbers, safely across parallel
  creates, and attaches them to pool regions or sparse files.

Device access runs on the container host, so this also works through a
podman machine.

Signed-off-by: Zack Cerza <zack@cerza.org>
TestNode derived loop device numbers from its index, so they could
collide with loop devices already in use on the host. Use
LoopDeviceMixin instead, which also lets testnodes use the block pool.
The stack allocates loop numbers for every container before creating
them in parallel, so concurrent creates can't pick the same ones.

Signed-off-by: Zack Cerza <zack@cerza.org>
Ship a commented [block_pool] section, add `ceph-devstack block-pool
status` to show allocations, and have doctor check that the user can
read and write the pool's parent device. Document the pool in the
README.

On Fedora CoreOS (e.g. a podman machine) the disk group is only defined
in /usr/lib/group, where usermod can't add members, so doctor --fix
copies it to /etc/group first.

Signed-off-by: Zack Cerza <zack@cerza.org>
@zmc
zmc added this pull request to stack #57 October 21, 2026 22:18

This branch has not been deployed

No deployments
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.

1 participant