On 4/7/2025 2:09 PM, TSS wrote:
> Greetings,
>
> I've been using this gimmick for backing up some OpenBSD 7.6 systems:
> https://github.com/thexhr/openbsd-timemachine
> For the purposes of this discussion, it:
>
> 1. uses hotplugd to run a script when you plug in a USB backup drive
> 2. this script mounts the backup drive
> 3. it then uses rsnapshot (rsync basically) to back up the data
> 4. the script unmounts the backup drive
>
> Everything is just fine until step 4, when the backup drive refuses to
> unmount. If you try to do it yourself, you see:
>
> umount: /my_backup_mount_point: Device busy
>
> This doesn't seem to be a temporary issue: after an hour's wait, the drive
> still can't be unmounted.
>
> I'm not sure how to debug the problem since fstat shows no open file on the
> drive, nor any process using any directory on the drive as a working
> directory. Also, fuser -c shows no usage of the drive. Restarting or
> turning off hotplugd doesn't free up the drive for unmounting either. Is
> there some other reason why the drive would remain in use that I could
> investigate?
>
> Thanks for any suggestions,
> --T
I've not used hotplugd, but does the script to a "cd <mounted usb backup
drive>"? If so, at the end of the script, change directory back to
something not on the usb device. That's a real confusing thing, if the
script perhaps hangs around. I know I've been annoyed to find a second
terminal or virtual console open where I changed into a folder then
switched screens (forgot) and couldn't umount a device.
Good luck!
Cheers,
Steve W.
No comments:
Post a Comment