{"id":825,"date":"2017-08-09T11:04:23","date_gmt":"2017-08-09T17:04:23","guid":{"rendered":"https:\/\/wmbuck.net\/blog\/?p=825"},"modified":"2021-12-06T08:29:50","modified_gmt":"2021-12-06T15:29:50","slug":"mdadm-consistency-checks","status":"publish","type":"post","link":"https:\/\/wmbuck.net\/blog\/?p=825","title":{"rendered":"mdadm consistency checks"},"content":{"rendered":"<p>On ubuntu it seems there is an automatic mdadm array check provided in \/etc\/cron.d\/mdadm, automatically installed with mdadm. This invokes a utility \/usr\/share\/mdadm\/checkarray and the cron is set to run this on the first Sunday of every month at 12:57am. And it is set to do this check on all arrays at one time.<\/p>\n<p>This is horrible! So with 5 arrays, totalling 25TB, when this sucker fires up it quickly saturates the i\/o capacity of cinnamon, slows to a crawl and settles in to run forever.<\/p>\n<p>I&#8217;ve commented that out, and added my own \/etc\/cron.d\/dee_mdadm which doesn&#8217;t do all the goofy shenanigans to try to ensure the thing runs on a Sunday (WHY?! Because the guy who wrote it doesn&#8217;t work on Sunday?). Instead, my version simply runs on the first of the month, at 12:57am, and on each month it starts the consistency check on a different array. I have 5 arrays, so 3 are checked twice a year, and 2 are checked thrice. Checking just one at a time means there is a good chance it will be done before morning, at least for the small arrays.<\/p>\n<p>I don&#8217;t really think the whole consistency check idea is doing me much good, but at least this doesn&#8217;t unaccountably bring the system to its knees on the first Sunday of every month.<\/p>\n<p>Update: December, 2021. I haven&#8217;t paid much attention to this, and today I found it happening again. I change the arrays around as needed, and hadn&#8217;t thought to go recheck what I had done, nor to ensure that the default didn&#8217;t reappear on an update, which it did.<\/p>\n<p>For future reference, manually stopping a check:<\/p>\n<p>echo idle &gt; \/sys\/block\/mdx\/md\/sync_action<\/p>\n<p>or echo check to start manually.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>On ubuntu it seems there is an automatic mdadm array check provided in \/etc\/cron.d\/mdadm, automatically installed with mdadm. This invokes a utility \/usr\/share\/mdadm\/checkarray and the cron is set to run this on the first Sunday of every month at 12:57am. And it is set to do this check on all arrays at one time. This &hellip; <a href=\"https:\/\/wmbuck.net\/blog\/?p=825\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">mdadm consistency checks<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[42,28,4,9],"tags":[],"class_list":["post-825","post","type-post","status-publish","format-standard","hentry","category-arch-linux","category-backup","category-linux","category-ubuntu"],"_links":{"self":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/825"}],"collection":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=825"}],"version-history":[{"count":5,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/825\/revisions"}],"predecessor-version":[{"id":1309,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/825\/revisions\/1309"}],"wp:attachment":[{"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wmbuck.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}