Skip to content

Automatic unmount after idle time #2805

Closed

Description

@tobiisdesired

What is your current rclone version (output from rclone version)?

rclone v1.43.1

  • os/arch: linux/amd64
  • go version: go1.11

What problem are you are trying to solve?

An encrypted mount should automatically be unmounted after some time without access to it. So your data stays secure even if you forget to unmount it.

How do you think rclone should be changed to solve that?

rclone mount could provide an idle timeout parameter. Other tools like encfs have this feature.
Here is an excerpt from the encfs manual pages:

-i, --idle=MINUTES
Enable automatic unmount of the filesystem after a period of inactivity. The period is specified in minutes, so the shortest timeout period that can be requested is one minute. EncFS
will not automatically unmount if there are files open within the filesystem, even if they are open in read-only mode. However simply having files open does not count as activity.

Activity

  1. added this to the Help Wanted milestone on Dec 2, 2018
  2. ncw commented on Dec 2, 2018

    @ncw
    Member

    This is an interesting idea.

    The FS can't umount if it has files open - that would break stuff alas.

    You could check out autofs which unmounts file systems when not in use. I use it for NFS mounts. I haven't tried it with rclone mount but it should work...

  3. modified the milestones: Help Wanted, v1.57, v1.58 on Aug 17, 2021
  4. self-assigned this
    on Aug 17, 2021
  5. modified the milestones: v1.58, Help Wanted on Sep 11, 2021
  6. removed their assignment
    on Sep 11, 2021
  7. ivandeex commented on Sep 11, 2021

    @ivandeex
    Member

    I published a PR #5594 which allows to run rclone smoothly with native Unix Automountd or Systemd.Autofs making this request mostly moot (except for Windows).

    Removing my assignment. Volunteers Welcome!
    @ncw feel free to close this ticket.

  8. ncw commented on Sep 13, 2021

    @ncw
    Member

    I think running rclone on automount is the best solution here - it lets the OS do the tricky job of working out whether we have any open files.

    Since we have patches in the pipeline to make that really smooth I'm going to close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions