So, situation description:
- USB 2.0 HDD Enclosure (MS-Tech LU379PS, idVendor=152d, idProduct=2336) with a WD Caviar Green 2TB inside.
- Connected to my small Home Server (ZOTAC ZBOXSD-ID12/ID13) via USB 2.0 (not eSata, because my RAID is already connected through that port)
- Server runs Ubuntu Server 16.04 with a minimal lubuntu desktop (no-install-recommends)
- Edited fstab with the UUID of this drive to mount it automatically to a folder (USBBackup) in my home folder
- Wrote a backup script that I run through cron that uses rsync to back up certain files every morning at 5:00 am to that USB drive
After a certain amount of time (it looks random, but especially after prolonged inactivity), the USB drive disconnects and won't reconnect again, which results in a failed backup.
I recently did a extended SMART test using smartmontools on the drive (outside of its enclosure), no issues. I changed the USB cable & tried different USB ports, but the problem persists.
I also have a script that runs at boot to stop automatic usb suspend
for i in /sys/bus/usb/devices/*/power/autosuspend do echo 2 > $i done for i in /sys/bus/usb/devices/*/power/level do echo "on" > $i done for i in /sys/bus/usb/devices/usb*/power/control do echo "on" > $i done
But nothing seems to work... Anybody else with other ideas?