Skip to content

ceph_prepare_installation: auto-create LVM when ceph_osd_disk is defined#916

Merged
insatomcat merged 2 commits into
seapath:mainfrom
dupremathieu:main
May 7, 2026
Merged

ceph_prepare_installation: auto-create LVM when ceph_osd_disk is defined#916
insatomcat merged 2 commits into
seapath:mainfrom
dupremathieu:main

Conversation

@dupremathieu
Copy link
Copy Markdown
Member

When only ceph_osd_disk is provided (no lvm_volumes), the role now automatically creates a single LVM volume group "vg_ceph" and logical volume "lv_ceph" using the full disk. This is needed for the cephadm playbook which expects this exact VG/LV naming.

  • Add ceph_prepare_installation_flush_osds variable (default false) to force re-creation even if the LVM already exists.
  • Check that the disk exists before attempting to create partitions.
  • Zap the disk using the appropriate ceph-volume command (cephadm ceph-volume or ceph-volume depending on deployment mode).
  • Create a single GPT partition with the lvm flag, then vg_ceph/lv_ceph.
  • Restrict the legacy lvm_volumes creation path to only run when lvm_volumes is actually defined.
  • Update README to document the new automatic LVM creation behavior and the flush_osds variable.
  • Remove the ceph-volume dependency when we use cephadm.

Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
When only ceph_osd_disk is provided (no lvm_volumes), the role now
automatically creates a single LVM volume group "vg_ceph" and logical
volume "lv_ceph" using the full disk. This is needed for the cephadm
playbook which expects this exact VG/LV naming.

- Add ceph_prepare_installation_flush_osds variable (default false) to
  force re-creation even if the LVM already exists.
- Check that the disk exists before attempting to create partitions.
- Zap the disk using the appropriate ceph-volume command
  (cephadm ceph-volume or ceph-volume depending on deployment mode).
- Create a single GPT partition with the lvm flag, then vg_ceph/lv_ceph.
- Restrict the legacy lvm_volumes creation path to only run when
  lvm_volumes is actually defined.
- Update README to document the new automatic LVM creation behavior and
  the flush_osds variable.
- Remove the ceph-volume dependency when we use cephadm.

Signed-off-by: Mathieu Dupré <mathieu.dupre@savoirfairelinux.com>
@insatomcat insatomcat merged commit 89824fe into seapath:main May 7, 2026
12 of 15 checks passed
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.

2 participants