5 ms·
My personal opinion is that if the USB enclosure is that flaky then it's not worth trusting it to operate when it's time to do a restore. You could shuck the d
by benlivengood 5y ago
My personal opinion is that if the USB enclosure is that flaky then it's not worth trusting it to operate when it's time to do a restore.
You could shuck the drive and connect it directly or find a reliable USB enclosure.
Putting the disk in /etc/fstab by uuid should keep it mounted to the same directory at least, but I'll be surprised if the backup software properly handles the potential errors well. The following link has an example to remount the drive with udev when it goes away, and if the backup software isn't running as root you can mount with uid,gid set to the backup user (or chown an ext filesystem) but make the mountpoint directory 0700 owned by root to prevent the backup from writing to it while unmounted.
https://blog.backslasher.net/automatically-mounting-usb-drives-and-surviving-reconnects.html https://blog.backslasher.net/automatically-mounting-usb-driv...
- indiv0 5y ago+1 for shucking the drive. I got a few WD externals (14 TB). They exhibited the exact behaviour described by OP. Essentially the drive slept every 15 minutes or so. Smartctl on a timer didn’t work. Touch on a timer didn’t work. I can’t recall if hdparm or some other tuning of sleep and head parking settings worked. Taking the drive out of the enclosure worked. It got so much quieter too.
- boring_twenties 5y agoThis is so weird. I have a few of the 10TB and 12TB WD EasyStores. I've been using them regularly for years and have never experienced anything like this. Just to be clear, the drive does go to sleep when it's actually idle. Not while it's being used, though. IOW, they work as expected. What distro/kernel version are you on? I mostly use Debian stable, which means a pretty old kernel. I wonder if it could be a regression in more recent ones? I also use the drives with FreeBSD and have never had an issue there, either.
- benlivengood 5y agoI'm also curious if it's aggressive USB power saving attempts with autosuspend. From my limited exploration autosuspend is usually off and e.g. requires powertop to enable (on Ubuntu LTS) or manual fiddling, but may be worth checking.
- indiv0 5y agoThis was Arch without any special kernel, so a fairly recent one. It was a few months ago. Don’t recall the specific version.
- dogorman 5y ago> but I'll be surprised if the backup software properly handles the potential errors well. YMMV but I've found rsync to handle this kind of fuckery well.
- Datagenerator 5y agoOr rclone if you need even faster parallel synchronization
- blooalien 5y agoI've used both of these tools with great success in the past. Infinitely scriptable in your favorite scripting language, being just simple command-line tools, too. Great for automation of backups. Re; the issue of external drives spinning down causing a remount at a different location, I've never had that exact experience before, but I have had drives spin down more frequently than I'd like, so my answer to that was to just disable the spindown entirely. (There's articles about various ways to do that easily findable on your favorite search engine if you're curious how to do it.) Once disabled, if I find that I still want some form of spin-down for the drive, I install one of the handy available daemons that allows a much more easily configurable form of this feature, and then set a longer delay than the drive's default. (This can also be done by configuring the drive itself to a longer delay, but it's more of a pain than just editing a simple text configuration file for a daemon.)