Replies: 3 comments
-
What is the scope of this? Does it apply to ZFS pool scrubbing? |
Beta Was this translation helpful? Give feedback.
0 replies
-
mdadm only, zfs does'nt rely on it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
DISCLAIMIER : DON'T DO THAT DURING YOUR SCRUBBING PERIOD if you don't want all your scrubbing to start again.
Context
by default the first sunday of each month mdadm start scrubbing all arrays. This process is creating massive IO, slowing down the miner and could lead to missing the wdPoST.
How is works (on Ubuntu)
mdadm scrubbing consists in 2 jobs triggered by systemd :
You can see these jobs running this command :
1. The first time trigger "mdcheck_start.timer" contains the following conditions :
Meaning : If it's 1AM and we are a Sunday that is between the 1st to the 7th day of the month then let's wait for a Random time picked up between 0 and 24H before starting the job mdcheck_start.service.
mdmonitor.service contains :
Meaning : Lets execute mdcheck for 6Hours then stop the scrubbing if not finished. After these 6Hours, mdcheck will stop, record the position where it stopped and wait another job to resume the scrubbing the day after for 6more hours.
2. The second time trigger "mdcheck_continue.timer" contains the following conditions :
Meaning : everyday at midnight lets wait for a Random time picked up between 0 and 12H before starting the job mdcheck_continue.service.
Meaning : if will run mdcheck in a "continue" mode for 6Hours then stop and what for the day after to resume and so on until the array have bin completely scrubbed
How make it suitable for your miner
Consideration :
How to modify :
All the files are located here :
/lib/systemd/system/
(in /etc you only have symlinks)adjust OnCalendar and RandomizedDelaySec of mdcheck_start.timer and mdcheck_continue.timer to match your needs.
OnCalendar strings can be safely tested with the folowing command line :
systemd-analyze calendar
examples :Beta Was this translation helpful? Give feedback.
All reactions