Re: Automount occasionally failing to auto-unmount

2021-04-21 Thread Patrick O'Callaghan
On Wed, 2021-04-21 at 19:30 +, old sixpack13 wrote:
> ...
> >  The drive is normally only used at 3am to run a backup
> > script, ...
> 
> > When I mount the drive manually, the timeout always succeeds (though
> > again after 300 seconds rather than 120).
> > 
> > Any ideas?
> > 
> not for btrfs-automount-case.
> but you {s,c]ould check with your script if the drive is mounted
> *before* backup starts.
> And I would check if the mount point is still clean (in case the backup
> blindy backuped to the mount point without mounted drive) 

Any access to the filesystem triggers the automount, i.e. the same
sequence of events will happen even if I just touch the mount point
rather than running the actual backup. This works correctly. The
automount also triggers a watchdog script which I can see running (via
'systemctl status'). The watchdog is there to spin down the drive when
the filesystem is eventually unmounted. It does this by running
inotifywait on an 'unmount' event and works correctly if I manually
unmount the filesystem.

On the occasions when the the *automatic* unmount fails, I can see that
the watchdog is still running and the filesystem is still mounted even
though no process is accessing it (according to ´fuser´), i.e. systemd
should unmount the filesystem but sometimes doesn't.

As a workaround, I've modified the backup script to run 'umount'
explicitly after the backup has finished, as long as the filesystem was
in the unmounted state beforehand. This is admittedly a kludge.

If I can get a repeatable error I'll BZ this, but I'm not hopeful.

poc

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Re: Automount occasionally failing to auto-unmount

2021-04-21 Thread old sixpack13
...
>  The drive is normally only used at 3am to run a backup
> script, ...

> When I mount the drive manually, the timeout always succeeds (though
> again after 300 seconds rather than 120).
> 
> Any ideas?
> 
not for btrfs-automount-case.
but you {s,c]ould check with your script if the drive is mounted *before* 
backup starts.
And I would check if the mount point is still clean (in case the backup blindy 
backuped to the mount point without mounted drive) 
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure


Automount occasionally failing to auto-unmount

2021-04-16 Thread Patrick O'Callaghan
I use automount with systemd service units (not /etc/fstab) to mount an
external BTRFS filesystem (2 drives configured as RAID-1). There is a
timeout of 120 seconds of inactivity after which it should unmount.
This works *nearly* all the time, but sometimes it doesn't and I can't
figure out why. The drive is normally only used at 3am to run a backup
script, and logs show that this is working correctly, but when I check
in the morning I sometimes find the drive still mounted (shown by
'findmnt') even though nothing is accessing it, i.e. 'fuser' shows
nothing and 'umount' succeeds immediately.

If it matters, the actual timeout always seems to take 300 seconds. I
don't know if this is because BTRFS is keeping the drive alive,
flushing queues or whatever. It's not important in itself, just another
data point.

When I mount the drive manually, the timeout always succeeds (though
again after 300 seconds rather than 120).

Any ideas?

poc
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure