Previously, I wrote that I had a problem with the RAID health check on each PC start, as I use it from time to time. Unfortunately, the receipt didn’t help, so here is a new one
Previous post: https://phpdev.one/how-to-disable-raid-check-in-ubuntu.html
This time, I again observed that the health check has started after the boot
$ cat /proc/mdstat
Personalities : [raid1] [raid0] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sdb1[1] sda1[0]
7813499904 blocks super 1.2 [2/2] [UU]
[>....................] check = 2.5% (199647040/7813499904) finish=627.5min speed=202220K/sec
bitmap: 1/59 pages [4KB], 65536KB chunk
So I stopped it
$ sudo /usr/share/mdadm/checkarray -x --all
Then I disabled the systemd timers responsible for the checks:
$ sudo systemctl disable mdcheck_start.timer
Removed '/etc/systemd/system/mdmonitor.service.wants/mdcheck_continue.timer'.
Removed '/etc/systemd/system/mdmonitor.service.wants/mdcheck_start.timer'.
$ sudo systemctl disable mdcheck_continue.timer
Then I stopped systemd timers that were running
$ sudo systemctl stop mdcheck_start.timer
$ sudo systemctl stop mdcheck_continue.timer
And then I rebooted the PC. It looks like the problem solved now
Explanation
- mdcheck_start.timer: This timer is usually responsible for initiating a new RAID consistency check.
- mdcheck_continue.timer: This timer is often used to resume a previously interrupted check.
- Disabling both ensures that checks are neither started nor resumed automatically.
- Disabling both ensures that checks are neither started nor resumed automatically.
- systemctl disable: This command removes the symlinks that enable the service or timer to start during boot.
- systemctl stop: This command stops the running instance of the service or timer.
Manual check
You can run this check manually when it is comfortable for you with the next command
$ sudo echo check > /sys/block/md0/md/sync_action
where “md0” – your array ID
My OS version
It’s Kubuntu 24.10
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.10
Release: 24.10
Codename: oracular