I'm using my RasPi as a media center with the media stored on an external HDD. Now the problem is that the HDD crashes sometimes, usually one or a few times a week. When this happens the drive is 'disconnected', and so my system cannot download after these events.Can I create a script that sort of forces a restart of all the usb devices (so no reboot of the Pi) when (using udev) the HDD crashes?
Creating a script that 'restarts' usb devices
usb;hard disk;devices;crash