luksClose fails, device busy

Ok, so I recently put my backup system back into my server only to find an issue with my mount/unmount scripts.

Namely: on unmount, luksClose fails with the device showing as busy. Which is funny because nothing should have been accessing it.

There’s plenty of posts/bugs/etc online of people having the same issue, but either no solutions are posted, or the solutions didn’t apply in my case.  Well, I finally tracked it down: noflushd.

noflushd is a daemon which spins down idle disks.  It probably wasn’t running on my old server which is why I didn’t have any problems before.

Long story short, shutting down noflushd finally let me close my encrypted backup disk and shut it down. Yayy.