The external hard disks attached to my Raspberry Pi spin up seemingly randomly and I don't know why. They form a RAID 1 managed by mdadm whose only partition is formatted with ext4.
Today, I set up a screen running
$ while true; do inotifywait -r /media/raid/; sleep 300; done
and refrained from using my RAID. It didn't monitor a single event the entire time, so no process seems to just randomly access the file system on my RAID.
On a different screen, I ran
# while true; do inotifywait /dev/sd{a,b}* /dev/md1; fuser /dev/sd{a,b}* /dev/md1; sleep 300; done
which recorded many events throughout the day but only a few PIDs. These where from /usr/sbin/smartd -n and /usr/lib/udisks2/udisksd --no-debug which I'm not even sure make the HDDs spin up. The culprits have likely gone unnoticed as they kept the files open only for such a short period of time that it took too long for fuser to be called and produce their PIDs.
How do I find out about the cause of those spin-ups?
In case the suspicion that this is a duplicate is correct, I posted a new question about actually solving the problem.