2

I think I read documentation/internet left to right, but I cannot see anywhere information, how is mdadm invoked during system startup. I cannot see anything in /etc/rcX.d, I cannot see any systemd service, yet my array is assembled at startup. How? Also I'd like to check the executed commands to know what is happening and if monitoring is in action or not.

distro is fedora/ubuntu.

thanks.

1 Answer 1

2

mdadm installs several sets of udev rules, which trigger on device detection:

/usr/lib/udev/rules.d/01-md-raid-creating.rules
/usr/lib/udev/rules.d/63-md-raid-arrays.rules
/usr/lib/udev/rules.d/64-md-raid-assembly.rules
/usr/lib/udev/rules.d/69-md-clustered-confirm-device.rules

These rules run mdadm in incremental assembly mode:

[64-md-raid-assembly.rules]
31: # remember you can limit what gets auto/incrementally assembled by
32: # mdadm.conf(5)'s 'AUTO' and selectively whitelist using 'ARRAY'
33: ACTION=="add|change", IMPORT{program}="/usr/bin/mdadm --incremental --export $devnode --offroot $env{DEVLINKS}"

They also start mdmonitor.service (mdadm --monitor) for health events:

[63-md-raid-arrays.rules]
35: ENV{MD_LEVEL}=="raid[1-9]*", ENV{SYSTEMD_WANTS}+="mdmonitor.service"
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .