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

Directories created by auto mount don't get deleted at shutdown, drives will be mounted to numbered directories next time #104

Closed
emoryy opened this issue Feb 25, 2016 · 3 comments

Comments

@emoryy
Copy link

emoryy commented Feb 25, 2016

I have removable disks that are connected to my computer most of the time. When the system is shut down, the mount point directories remain in place. Udiskie doesn't seem able to reuse those on next reboot, so for example with a drive labeled Something, it will be mounted to Something1. I need to unmount, delete, remount manually.

@coldfix
Copy link
Owner

coldfix commented Feb 25, 2016

Hey,

I've noticed this too. I think this should be fixed in udisks, not udiskie: udisks could e.g. just remount to existing directories if they're empty.

In my experience, removing those directories requires root permissions, so this can't be done by udiskie itself anyway - the only thing that I could imagine to be done from udiskie is to add a shutdown hook that performs automatic unmount before shutdown, but this only handles the specific shutdown case and is a lot messier than the solution in udisks.

@emoryy
Copy link
Author

emoryy commented Mar 23, 2016

I've come up with a workaround. :)
My auto mount directory is /media, and now I made it to be a tmpfs file system.
This line goes into /etc/fstab :
tmpfs /media tmpfs nodev,nosuid,size=1M 0 0
Since the content of a tmpfs mount is stored in RAM, it's entirely gone on system shutdown or restart, and it gets remounted as an empty dir on startup.

@coldfix
Copy link
Owner

coldfix commented May 10, 2016

That's kind of a nice workaround, actually. I will add this to the wiki.

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

2 participants