Exploiting Ceph: What is Scrub and How to Manage It







Scrub β€” Ceph. , , . Scrub . , .







, « ». Ceph «».







Ceph:

OSD,

.







Scrub



Scrub scrubbing β€” , placement group. , , placement group . , Scrub.







Scrub (, - placement group , , ), , .







Erasure coded pool , : Scrub , , . β€” «» . , .







Scrub : .







placement groups scrubbing, scrubbing+deep. Β«DeepΒ» β€” Scrub.













Scrub, , .







Scrub . .







Scrub OSD placement group. , . . placement group . placement groups.







placement group β€” , Scrub . : placement group . Scrub , . placement group , .







. , placement group 7 .













Scrub placement group, :













, scrub error, . , placement group . Scrub. - , placement group .







: - OSD repair β€” .







Scrub , .







placement group . 7 100% OSD. : , .



Scrub , , , . (, ), .



Linux input/output error. Ceph , . , . , input/output-, .




Scrub , : placement group OSD . :







$ ceph health detail
      
      





:













OSD . / , .







, Scrub, :







$ rados list-inconsistent-obj {PG} | jq
      
      





, . OSD .













, OSD (875 925), primary, , , (463) .







primary-, , :







$ ceph pg repair {PG}
      
      





repair . Ceph placement group id . , , . , repair , primary OSD.









β€” . Scrub, placement group , ( io) Scrub . .







. Scrub . , , .







Scrub Ceph , , , .







. osd , β€œscrub”, .







ceph daemon osd.0 config show | grep osd | grep scrub
      
      











β€œosd_max_scrubs” β€” , placement group «» OSD. β€œ1”, Scrub .







, :







β€œosd_scrub_begin_hour” β€œosd_scrub_end_hour”. β€œ0”, β€œ24”, .







: β€œ02”, β€œ08”:







ceph config set osd osd_scrub_begin_hour 02
ceph config set osd osd_scrub_end_hour 08
      
      





.







: . - placement group - «» , Scrub , . Scrub , .







, , , Ceph Scrub, . - placement group, , .







β€œosd_scrub_sleep” β€” . β€œ0.00000”. β€œ0.1”, Scrub .







β€œosd_debug_deep_scrub_sleep” β€” sleep Deep Scrub. β€œ0”, β€œ0.2”.







:







ceph config set osd osd_debug_deep_scrub_sleep 0.2
      
      





, Scrub . . . io, Scrub .







β€œosd_scrub_chunk_max” β€œosd_scrub_chunk_min” β€” , ; , Scrub.







, 5 β€” .







ceph config set osd osd_scrub_chunk_min 1
ceph config set osd osd_scrub_chunk_max 4
      
      





, , , placement group Scrub . , .







, , , Scrub . , Scrub.







β€œosd_scrub_auto_repair” β€” . , placement group inconsistent. β€œfalse”, Ceph repair placement group, 5. , repair, , , . Ceph , , . , .







β€œosd_scrub_during_recovery” β€” . , Scrub , OSD backfilling, recovery io. - , , rebalance .







Scrubbing io recovery io, , Scrub . rebalance β€” placement group, β€” Scrub , , Scrub , , , «».







: , , Scrub :







:







ceph osd set noscrub
      
      





:







ceph osd set nodeep-scrub
      
      





, . , , :







ceph osd pool set {name} noscrub 1
ceph osd pool set {name} nodeep-scrub 1
      
      





claster health:













Scrub, . , , .







, Scrub. , Scrub, .








All Articles