I have an external USB drive, which - for whatever reason - sometimes drops out unrecoverably. Probably due to faulty cables or something. On this I have a LUKS partition.
Buffer I/O error on dev dm-0, logical block 0, lost sync page write
lsusb shows no difference between a fully working condition and the dropout.
I would like to monitor this partition as I also like to have it available. It's not vital to be available, otherwise I would choose different technology here. Also the disk is supposed to spin down whenever it is not in use.
Watching free space does not help, as the OS apparently caches that information and reports the last known state. Trying to access the filesystem for monitoring does not work either, as I don't want the disk to spin up regularly.
This might be a trivial question, yet I could not find an answer. To clarify: I only ask how to find out that the device dropped out, resp. the LUKS partition is not available. Not how I can notify anyone.