This should be straightforward, but I have been unable to find a direct answer by searching.I find that if I unmount an mdadm-managed array and then either (1) unplug the array, (2) power off the enclosure housing the array, (3) reboot the system, or (4) shut down the system, then mdadm issues an alert about a fail event having been detected:This is an automatically generated mail message from mdadmrunning on <hostname>A Fail event had been detected on md device /dev/md0.It could be related to component device /dev/sdc1.Faithfully yours, etc.P.S. The /proc/mdstat file currently contains the following:Personalities : [raid1] md0 : active (auto-read-only) raid1 sdc1[1](F) sdb1[0]      1952984000 blocks super 1.2 [2/1] [U_]unused devices: <none>The RAID appears to be fine and can be readily resumed. To avoid generating this alert, must I execute mdadm --stop /dev/md0 after unmounting and before either disconnecting or rebooting? For routine system reboot and shutdown, should this command be included within a script in /etc/init.d/ and symbolically linked in /etc/rc0.d/ and /etc/rc6.d/?Thank you for clarifying.
proper way to stop software RAID before system shutdown
debian;raid;mdadm;software raid;reboot