Re: pg mapping verification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Eugen,
Thank you for the tip. While writing a script is ok, it would be nice if therewas an official way to do this.
-Chris
 
 
-----Original Message-----
From: Eugen Block <eblock@xxxxxx>
To: ceph-users@xxxxxxx
Sent: Thu, Jan 12, 2023 8:58 am
Subject:  Re: pg mapping verification

Hi,

I don't have an automation for that. I test a couple of random pg  
mappings if they meet my requirements, usually I do that directly with  
the output of crushtool. Here's one example from a small test cluster  
with three different rooms in the crushmap:

# test cluster (note that the columns may differ between ceph versions  
when using awk as I did here)
storage01:~ # ceph pg ls-by-pool <pool> | awk '{print $15}'
ACTING
[8,13,5]p8
[22,4,13]p22
[28,22,26]p28
[21,5,1]p21
[20,34,27]p20
[...]

for i in {20,34,27}; do ceph osd find $i | grep room; done
        "room": "room2",
        "room": "room3",
        "room": "room1",

For this rule I have a room resiliency requirement so I grep for the  
room of each acting set.
The output of crushtool is helpful if you don't want to inject a new  
osdmap into a production cluster. Just one example:

crushtool -i crushmap.bin --test --rule 5 --show-mappings --num-rep 6 | head
CRUSH rule 5 x 0 [19,7,13,22,16,28]
CRUSH rule 5 x 1 [21,3,15,31,19,7]
[...]

Regards,
Eugen

Zitat von Christopher Durham <caduceus42@xxxxxxx>:

> 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@xxxxxxx
> To unsubscribe send an email to ceph-users-leave@xxxxxxx


_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux