[systemd-devel] Errorneous detection of degraded array

Luke Pyzowski Luke at sunrisefutures.com
Thu Jan 26 18:02:50 UTC 2017


Hello,
I have a large RAID6 device with 24 local drives on CentOS7.3. Randomly (around 50% of the time) systemd will unmount my RAID device thinking it is degraded after the mdadm-last-resort at .timer expires, however the device is working normally by all accounts, and I can immediately mount it manually upon boot completion. In the logs below /share is the RAID device. I can increase the timer in /usr/lib/systemd/system/mdadm-last-resort at .timer from 30 to 60 seconds, but this problem can randomly still occur.

systemd[1]: Created slice system-mdadm\x2dlast\x2dresort.slice.
systemd[1]: Starting system-mdadm\x2dlast\x2dresort.slice.
systemd[1]: Starting Activate md array even though degraded...
systemd[1]: Stopped target Local File Systems.
systemd[1]: Stopping Local File Systems.
systemd[1]: Unmounting /share...
systemd[1]: Stopped (with error) /dev/md0.
systemd[1]: Started Activate md array even though degraded.
systemd[1]: Unmounted /share.

When the system boots normally the following is in the logs:
systemd[1]: Started Timer to wait for more drives before activating degraded array..
systemd[1]: Starting Timer to wait for more drives before activating degraded array..
...
systemd[1]: Stopped Timer to wait for more drives before activating degraded array..
systemd[1]: Stopping Timer to wait for more drives before activating degraded array..

The above occurs within the same second according to the timestamps and the timer ends prior to mounting any local filesystems, it properly detects that the RAID is valid and everything continues normally. The other RAID device - a RAID1 of 2 disks containing swap and / have never exhibited this failure.

My question is, what are the conditions where systemd detects the RAID6 as being degraded? It seems to be a race condition somewhere, but I am not sure what configuration should be modified if any. If needed I can provide more verbose logs, just let me know if they might be useful.

Many thanks,
Luke Pyzowski


More information about the systemd-devel mailing list