Results 1 to 8 of 8
Once in a while, server administrators can initiate a "CHECK" sync_action on their array. This can be accomplished with the following command:
Code:
sudo su -
echo check >> /sys/block/md0/sync_action
...
- 01-22-2010 #1Just Joined!
- Join Date
- Jan 2005
- Posts
- 54
mdadm - How to Pause a "CHECK" sync_action?
Once in a while, server administrators can initiate a "CHECK" sync_action on their array. This can be accomplished with the following command:
This will have mdadm immediately start a "check" process on the array to verify that all parity is correct. It is a good way to ensure the array is healthy, and that there are no underlying errors on any of the drives affecting your data. CarefuL: On large arrays (++TB), this check can take days!Code:sudo su - echo check >> /sys/block/md0/sync_action
Typically, one might decided to schedule these checks using a cron entry. Perhaps once a month, we'll have this run.
The Question:
* Is there any way to "PAUSE" this mdadm check process? Or stop it?
It is unfortunate if you've brought your server to a LAN party to host files, and all of a sudden the CHECK is running (oops I forgot it's the XX day of the month and the cron kicked in). Sometimes there are situations where you just don't want it to run and it's already started! (i..e you would notice because there is a huge performance impact on CPU and I/O.)
- 02-14-2010 #2Banned
- Join Date
- Feb 2010
- Posts
- 31
To Pause
I assume you tried:
kill -STOP [pid]
and
kill -CONT [pid]
- 03-01-2010 #3Just Joined!
- Join Date
- Jan 2005
- Posts
- 54
So during the check operation:
Code:root@fermmy-server:/sys/block/md500/md# cat /proc/mdstat | grep -A3 md500 md500 : active raid5 sde1[0] sdg1[5] sdf1[4] sdl1[3] sdi1[2] sdh1[1] 2441919360 blocks level 5, 128k chunk, algorithm 2 [6/6] [UUUUUU] [>....................] check = 0.6% (2965760/488383872) finish=467.1min speed=17316K/sec
Hmmm.... could someone confirm which PID to kill?
I'm guessing it's the one in bold, but wanted to get a second opinion prior to doing so.Code:root@fermmy-server:/sys/block/md500/md# ps wauxx | grep md500 root 4787 0.3 0.0 0 0 ? S< Feb27 5:28 [md500_raid5] root 5290 3.1 0.0 0 0 ? R< 22:48 0:00 [md500_resync] root 6443 0.0 0.0 2160 600 ? Ss Feb27 0:00 /sbin/mdadm --monitor --pid-file /var/run/mdadm/monitor.pid --daemonise --scan --syslog --test /dev/md1000 /dev/md125 /dev/md250 /dev/md500
- 04-02-2011 #4Just Joined!
- Join Date
- Jan 2005
- Posts
- 54
ping; I guess this is still an open question; sometimes check resync actions are occuring, and we want to pause them ...
- 04-05-2011 #5Just Joined!
- Join Date
- Apr 2011
- Posts
- 1
Very similar as to , but instead of check, echo 'idle'
Killing the sync process is NOT the way to do it. Note that the path might be different on your system, on mine it's /sys/block/md0/md/sync_actionCode:sudo su - echo idle > /sys/block/md0/sync_action
You can edit the scheduling in your crontab, /etc/cron.d/mdadmLast edited by pmodin; 04-05-2011 at 11:10 PM.
- 04-06-2011 #6Just Joined!
- Join Date
- Jan 2005
- Posts
- 54
Hm. But wouldn't that STOP the check sync action, rather than pause?
i.e., if I set it to idle in the middle of a check (say, 50% complete), then a few hours later, put in "check" again, will it resume @ the previous 50%, or restart @ 0%?
- 05-28-2011 #7Just Joined!
- Join Date
- Jan 2005
- Posts
- 54
Can anyone comment on this though?
What affect does this have on the array while the resync process (PID) is paused? Obviously, we'd like to still access the filesystem on the array while a resync process is paused via "kill -STOP [pid]".Code:kill -STOP [pid] and kill -CONT [pid]
I haven't actually tried it yet, as I'm not confident myself that it is safe.
- 08-23-2011 #8Just Joined!
- Join Date
- Aug 2011
- Posts
- 1



