Bug 2183485

Summary: [RFE] Report the OSD creation value of min_alloc_size in metadata
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Francois Andrieu <fandrieu>
Component: RADOSAssignee: Neha Ojha <nojha>
Status: NEW --- QA Contact: Pawan <pdhiran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.3CC: bhubbard, ceph-eng-bugs, cephqe-warriors, nojha, vumrao
Target Milestone: ---Keywords: FutureFeature
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Francois Andrieu 2023-03-31 10:44:11 UTC
Description of problem:
With Ceph 5, the new default value of BlueStore’s min_alloc_size for SSDs and HDDs is 4 KB[1].

To apply this setting to existing OSD, they must be recreated.
There is currently no easy way to get the actual value of min_alloc_size for a running OSD as the config db will only show the value used for new OSDs.

After Ceph4 to Ceph5 migration, the min_alloc_size shows the new size, even when the OSD was created with a different value:
# ceph daemon osd.4 config show | grep min_alloc_size
"bluestore_min_alloc_size": "0",
"bluestore_min_alloc_size_hdd": "4096",
"bluestore_min_alloc_size_ssd": "4096"

If the user decides to migrate their OSDs to use the new value, there is no easy way to track which OSD is using the new value or the old one.

Version-Release number of selected component (if applicable):
Ceph 16.2.10-138


Steps to Reproduce:
1. On ceph 4, check the min_alloc_size config:
# ceph daemon osd.4 config show | grep min_alloc_size
"bluestore_min_alloc_size": "0",
"bluestore_min_alloc_size_hdd": "65536",
"bluestore_min_alloc_size_ssd": "4096"

2. Migrate to Ceph 5
3. Check the configuration on the same OSD:
# ceph daemon osd.4 config show | grep min_alloc_size
"bluestore_min_alloc_size": "0",
"bluestore_min_alloc_size_hdd": "4096",
"bluestore_min_alloc_size_ssd": "4096"


Actual results:
The OSD config shows the new value, even if the OSD was created with the old one

Expected results:
Config (or metadata) shows the actual value used by the OSD.

This is basically a tracker for https://github.com/ceph/ceph/pull/50506 to be included in Ceph 5 (if that is possible).

Additional info:
[1]: https://access.redhat.com/documentation/en-us/red_hat_ceph_storage/5.0/html-single/release_notes/index#enhancements

Comment 1 RHEL Program Management 2023-03-31 10:44:21 UTC
Please specify the severity of this bug. Severity is defined here:
https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity.