I have an issue where a mounted external USB hard drive fails, this causes the IO Wait of the system to spike (I can see this in Grafana) but shortly after the system becomes completely unresponsive, so I cannot ssh into it to force a umount or to reboot.
I am presently mounting the drive like this:
UUID=UUID_HERE /data/path/disk1 ext4 user,defaults,nofail,noatime,commit=60,x-systemd.device-timeout=120,errors=continue 0 2 # Added 2023-01-03 09:41:46 +0000
How can I prevent this from happening? - is there some fstab mount option to automatically unmount after a number of errors? - or to force a umount after a read/write timeout? - Or maybe if there is a read timeout to somehow kill power to the USB ports?