TSS <t...@mg-1.uk> writes:

> 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.

how did you use fstat ? I don't remember well, but using 
'fstat /my_backup_mount_point' might not be enough.

but you could use:

$ fstat -f /my_backup_mount_point

with -f, fstat will list all opened files in the /my_backup_mount_point
mount point (at any depth). (it should be the same than 
'fstat | grep /my_backup_mount_point')

Regards.
-- 
Sebastien Marie

Reply via email to