Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Unmount mount points if beesd exits. #278

Open
techno156 opened this issue Mar 28, 2024 · 0 comments
Open

[Feature Request] Unmount mount points if beesd exits. #278

techno156 opened this issue Mar 28, 2024 · 0 comments

Comments

@techno156
Copy link

Issue Description

When run manually, beesd will create a new mount point for the drive, but will not clean it up on exit. This means that if a user is running bees on an external drive using the beesd script, they have to manually unmount the additional mountpoints before they can safely remove the drive.

This issue only applies if the user runs beesd manually, as the systemd service uses a private mount, and will clean up those mount points when stopped.

Suggestion and Implementation

Instead of leaving it up to the user, if the beesd script is terminated either by receiving SIGTERM or Interrupt/CTRL-C, the mountpoints created by the script should also be unmounted when exiting.

Issues with Implementation

One issue that I could see with doing it this way if the script tries to unmount a drive before it finishes flushing to the buffer, where it might just throw an error.

Another would be that the mountpoint would be left in cases where the script is killed, but that would be unavoidable.

Alternatives

According to #267 (comment), users can also just use bees through systemd instead of the beesd helper script to avoid this issue.

Leaving users to unmount the points manually is also an option. All the mounts that beesd creates (such as after multiple runs) all share the same path, and can be unmounted simultaneously. Similarly, the user can unmount them all by unmounting the device that the path points to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant