Created
May 22, 2020 08:37
-
-
Save wica128/9d0f530b13e1cfdc73096e41743ac1a0 to your computer and use it in GitHub Desktop.
Search in Cepg for defect OSD.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
printf "PGID\tOSD\tPRIM\tERROR\n" | |
for pg in $(ceph pg dump pgs --format=json-pretty 2> /dev/null|jq -r '.[]|select (.state|test("inconsistent"))| .pgid'); do | |
res=$(rados list-inconsistent-obj $pg --format=json-pretty| jq -r '.inconsistents[].shards[]|select(.errors |length > 0)| [.osd,.primary,.errors[]]|@tsv') | |
printf "%s\t%s\t%s\t%s\n" $pg $res | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment