Failed to start Software RAID monitoring

Hi,

I just installed a minimal Rocky Linux 8 system on a battered Dell Optiplex 780. It has two identical 250 GB SATA disks. So what I usually do with this kind of setup is define a software RAID 0 array because this speeds up things significantly on this kind of old hardware.

Setting up the array went fine and /proc/mdstat looks nice. But after rebooting I get the following error:

# systemctl status mdmonitor
● mdmonitor.service - Software RAID monitoring and management
   Loaded: loaded (/usr/lib/systemd/system/mdmonitor.service; enabled; vendor preset: enabled)
   Active: failed (Result: protocol) since Mon 2023-09-25 18:42:28 CEST; 6min ago
  Process: 849 ExecStart=/sbin/mdadm --monitor --scan -f --pid-file=/var/run/mdadm/mdadm.pid (code=exited, status=0/SUCCESS)

sept. 25 18:42:28 pc-catherine systemd[1]: Starting Software RAID monitoring and management...
sept. 25 18:42:28 pc-catherine systemd[1]: mdmonitor.service: Can't open PID file /var/run/mdadm/mdadm.pid (yet?) after start: No such file or directory.
sept. 25 18:42:28 pc-catherine systemd[1]: mdmonitor.service: Failed with result 'protocol'.
sept. 25 18:42:28 pc-catherine systemd[1]: Failed to start Software RAID monitoring and management.

Any idea what’s going on here ?

What does /proc/mdstat look like after reboot? Can you also use the mdadm commands to see the status of the array?

I followed what the logs said and could find a quick & dirty hack to solve the problem. I copied /usr/lib/systemd/system/mdmonitor.service to /etc/systemd/system and uncommented the line defining the PID file. From there the service started normally on bootup.

Funny detail: bug reports around this have been around for some time now. Weird that Red Hat hasn’t yet adressed this ugly bug. [troll]They’re probably too busy giving downstream distributors a hard time.[/troll] :upside_down_face:

If I remember correct, the mdmonitor service didn’t even run prior to systemd either. And my raid’s were generally OK. I checked /proc/mdstat and everything else with mdadm commands, and all was OK so just figured that service wasn’t necessary. I could be wrong, but :slight_smile:

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.