LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-05-2017, 02:58 AM   #1
bloupbloup
LQ Newbie
 
Registered: Jul 2017
Posts: 13

Rep: Reputation: Disabled
When does the checking of mdadm happen?


Without any reasons, all my arrays started to get checked. It was painful because it was during a backup and I guess it explained why it was delayed. Is the checking process scheduled somewhere? Can I predict when it will happen next time?
Does it happen after a reboot? Is there any logic behind it?

I have seen the following:

Code:
[Sun Nov  5 00:59:53 2017] md: data-check of RAID array md125
[Sun Nov  5 00:59:59 2017] md: delaying data-check of md126 until md125 has finished (they share one or more physical units)
[Sun Nov  5 01:00:05 2017] md: delaying data-check of md127 until md125 has finished (they share one or more physical units)
[Sun Nov  5 01:00:31 2017] md: md125: data-check done.
[Sun Nov  5 01:00:31 2017] md: delaying data-check of md127 until md126 has finished (they share one or more physical units)
[Sun Nov  5 01:00:31 2017] md: delaying data-check of md126 until md127 has finished (they share one or more physical units)
[Sun Nov  5 01:00:31 2017] md: data-check of RAID array md127
[Sun Nov  5 04:42:07 2017] md: md127: data-check done.
[Sun Nov  5 04:42:07 2017] md: data-check of RAID array md126
[Sun Nov  5 04:42:12 2017] md: md126: data-check done.

Code:
cat /proc/mdstat
Personalities : [raid1] 
md125 : active raid1 sdb1[1] sda1[0]
      4096000 blocks super 1.2 [2/2] [UU]
      bitmap: 1/1 pages [4KB], 65536KB chunk

md126 : active raid1 sdb2[1] sda2[0]
      512960 blocks super 1.0 [2/2] [UU]
      	resync=DELAYED
      bitmap: 0/1 pages [0KB], 65536KB chunk

md127 : active raid1 sdb3[1] sda3[0]
      972018688 blocks super 1.2 [2/2] [UU]
      [==================>..]  check = 94.2% (915822080/972018688) finish=27.4min speed=34068K/sec
      bitmap: 4/8 pages [16KB], 65536KB chunk

unused devices: <none>

Last edited by bloupbloup; 11-05-2017 at 02:59 AM.
 
Old 11-05-2017, 03:21 AM   #2
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: RHEL 7.x, SLES 11 SP2/3/4
Posts: 1,195
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Your disks are syncing which happens only if a new disk was added to your existing raid array.
In general once the disks are synced completely then the sync happens backend without affecting any process writing to that part of disk.

Check you syslog to find more details if someone performed a disk replacement?
 
Old 11-05-2017, 03:26 AM   #3
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Are there cron jobs scheduled for it?

Otherwise check the daemons that might launch it. With strings and grep on the binaries listed in your ps output. And the related .conf and sources for those processes. There likely is logic behind it, although maybe not predictable logic.
 
Old 11-05-2017, 03:59 AM   #4
bloupbloup
LQ Newbie
 
Registered: Jul 2017
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
Are there cron jobs scheduled for it?

Otherwise check the daemons that might launch it. With strings and grep on the binaries listed in your ps output. And the related .conf and sources for those processes. There likely is logic behind it, although maybe not predictable logic.
I have found the root cause of the issue in a cron job:

/etc/cron.d/raid-check cron job running /usr/sbin/raid-check at 1am every sunday.

this is on my centos 7.

thank you.
 
Old 11-08-2017, 01:46 PM   #5
voleg
Member
 
Registered: Oct 2013
Distribution: RedHat CentOS Fedora SuSE
Posts: 354

Rep: Reputation: 51
Then check /etc/sysconfig/raid-check, they should come together.
 
Old 08-02-2020, 10:21 AM   #6
frater
Member
 
Registered: Jul 2008
Posts: 121

Rep: Reputation: 23
I am monitoring /proc/mdstat and /sys/block/md1/md/sync_speed with Zabbix, so I know when my RAIDs are syncing.
This Sunday morning I saw 2 of my servers having a high /sys/block/md1/md/sync_speed and I thought they were both syncing.

It started at the exact same time which could indicate a power cut.
This happened before, but after I issued a "uptime" I knew it had to be something else.
Thanks to this thread I was relieved to find out it was "checking" the RAID and not "syncing" it.

I now need to modify my triggers a bit, so it can distinguish between syncing and checking.

I looked for a cron job on mine and found /etc/cron.d/mdadm
This is on my Ubuntu 18.04

Code:
# cat /etc/cron.d/mdadm
#
# cron.d/mdadm -- schedules periodic redundancy checks of MD devices
#
# Copyright © martin f. krafft <madduck@madduck.net>
# distributed under the terms of the Artistic Licence 2.0
#

# By default, run at 00:57 on every Sunday, but do nothing unless the day of
# the month is less than or equal to 7. Thus, only run on the first Sunday of
# each month. crontab(5) sucks, unfortunately, in this regard; therefore this
# hack (see #380425).
57 0 * * 0 root if [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ]; then /usr/share/mdadm/checkarray --cron --all --idle --quiet; fi
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to backup MDADM super blocks and other tips I should know about mdadm? road hazard Linux - Newbie 5 08-04-2016 12:21 AM
[SOLVED] Attempts to work around a mdadm bug/ mdadm cannot get exclusive access to /dev/md127 Sereph Linux - Newbie 1 08-16-2011 03:21 AM
MDADM screws up the LVM partitions? Can't mount the LVMs after mdadm stopped alirezan1 Linux - Newbie 3 11-18-2008 04:42 PM
unable to load MDADM module BUT mdadm works?!?!?! alirezan1 Linux - Software 2 09-08-2008 07:58 PM
mdadm says "mdadm: /dev/md1 not identified in config file" when booting FC7 raffeD Linux - Server 1 08-11-2008 11:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration