How to disable raid check in Ubuntu?

Pinguin

Today I decided to fix some annoying issue with my desktop. When I try to shutdown pc it doesn’t happen because of raid check run. Usually I used switching to console via Ctrl+Alt+F3, and then login via CLI and shutdown it via sudo. It was so annoying…

In my previous installations I fixed this by disabling /etc/cron.d/mdadm but this time it was not exists, probably after some tons of upgrades..

Yeah, I know that it better to keep these checks, but come on with 8 TB raid it takes 600+ minutes to finish, that is about 10 hours. It ridiculous if you start your pc for 10-15 minutes 1-2 times per week.

You can check this by running

I found the configuration file here /etc/default/mdadm, and some options there that allows to disable:

Pay attention that the manual edits of this file not always get the results, so the recommended way is to use dpkg-reconfigure, like this

The process looks like

That’s all.

Also in the /etc/default/mdadm configuration file I saw that the execution scripts moved from cron to systemd

From here we can understand, that this folder contains the links to the scripts that running checks, so if you want to force remove these jobs instead of using configuration file (that is not recommended) you can probably remove the links to the scripts from this folder.

In some cases it makes sense to just align the schedule to start checking not the every Sunday, but once a month or year, you can do this by editing this file (don’t forget to make initial configuration backup)

You May Also Like

About the Author: vo