Skip to content

ceph-volume: skip mkfs discard for LVM NVMe OSDs - #68220

Merged
guits merged 1 commit into
ceph:mainfrom
ujjawal-ibm:ceph-volume-lvm-osd-deployment
Apr 9, 2026
Merged

guits merged 1 commit into
ceph:mainfrom
ujjawal-ibm:ceph-volume-lvm-osd-deployment

Conversation

@ujjawal-ibm

@ujjawal-ibm ujjawal-ibm commented Apr 6, 2026 •

Copy link
Copy Markdown
Contributor

Problem:

NVMe preformat was not being applied during the mkfs step for LVM backed osds.

  • As a result, even after preformatting NVMe devices, the LVM path could still run ceph-osd --mkfs without --bdev-enable-discard false, which is causing slow discard during OSD creation on FCM NVMe.

Fix:

  • Reuse the existing NVMe preformat flow by calling nvme_utils.preformat() in the lvm prepare path for Bluestore block devices.
  • When preformat succeeds, set skip_mkfs_discard so BaseObjectStore appends --bdev-enable-discard false to the ceph-osd --mkfs command.

Testing:

  • Create an LVM backed osd and confirm ceph-volume.log shows --bdev-enable-discard false.
  • Confirm osd prepare time stays under a minute and the daemon come up.

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@ujjawal-ibm
ujjawal-ibm requested a review from a team as a code owner April 6, 2026 06:30
@ujjawal-ibm
ujjawal-ibm force-pushed the ceph-volume-lvm-osd-deployment branch from 1f922f6 to 9bb881e Compare April 6, 2026 06:48
Run NVMe preformat in the LVM bluestore prepare path and
set skip_mkfs_discard so ceph-osd --mkfs gets --bdev-enable-discard false,
matching the raw OSD behavior.

Fixes:https://tracker.ceph.com/issues/75873

Signed-off-by: Ujjawal Anand <[email protected]>
@ujjawal-ibm
ujjawal-ibm force-pushed the ceph-volume-lvm-osd-deployment branch from 9bb881e to bb6d4d7 Compare April 6, 2026 06:49
@ujjawal-ibm
ujjawal-ibm requested a review from guits April 6, 2026 07:11
@guits

guits commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

jenkins ceph-volume unit tests

@guits
guits merged commit fe06524 into ceph:main Apr 9, 2026
18 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants