I think “ceph pg dump” is what you’re after, look for the “UP” and “ACTIVE” 
fields to map a PG to an OSD. From there it’s just a matter of verifying your 
PG placement matches the CRUSH rule.

From: Christopher Durham <caduceu...@aol.com>
Date: Wednesday, January 11, 2023 at 3:56 PM
To: ceph-users@ceph.io <ceph-users@ceph.io>
Subject: [EXTERNAL] [ceph-users] pg mapping verification

Hi,
For a given crush rule and pool that uses it, how can I verify hat the pgs in 
that pool folllow the rule? I have a requirement to 'prove' that the pgs are 
mapping correctly.
I see: https://pypi.org/project/crush/
This allows me to read in a crushmap file that I could then use to verify a pg 
with some scripting, but this pypi is very old and seems not to be maintained 
or updatedsince 2017.
I am sure there is a way, using osdmaptool or something else, but it is not 
obvious. Before i spend alot of time searching, I thought I would ask here.
Basically, having a list of pgs like this:
[[1,2,3,4,5],[2,3,4,5,6],...]
Given a read-in crushmap and a specific rule therein, I want to verify that all 
pgs in my list are consistent with the rule specified.
Let me know if there is a proper way to do this, and thanks.
-Chris


_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io
_______________________________________________
ceph-users mailing list -- ceph-users@ceph.io
To unsubscribe send an email to ceph-users-le...@ceph.io

Reply via email to