You are not logged in.

#1 2014-04-29 01:48:47

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

[SOLVED] USB drive mount: automount folders are not always deleted

Hi!

I have an annoying problem.
I use some USB drives so often I don't disconnect them manually before shutdown and thus they are connected before boot as well. They get mounted at /media instead of /run/media/$USER. I think I know why (no user at boot). But during shutdown the auto-created mount folders stay in /media and at next boot the same drives will be mounted in other folders which names' the same except they have underscores at the end.

Is there a way to make sure that the system always deletes folders created for removable drives during shutdown either if they are mounted at /media or /run/media/$USER?
I have links pointing at some of the drives' folders but they're always broken because of this.

If I want to set the mount in /etc/fstab then the boot stops right after the drives' mount. If I start rescue mode, log in as root then log out, the boot will succeed.
I used this:

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx	/mnt/EHD 	ext4		defaults			0 2

But with this I have concerns what would happen if I solved this but the HDD's not there at boot, I read that it most likely cause the boot to hang, also I guess if I remove the drive while the system is running, I couldn't just reattach it to it's place without the mount command in terminal.

So I think the best way would be if the system just unmounted the drives and deleted the folders in /media and /run/media/$USER during shutdown. Is there a way to make sure that'll happen?

Last edited by freyr (2014-04-29 23:19:27)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#2 2014-04-29 02:31:24

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] USB drive mount: automount folders are not always deleted

You need to figure out what is mounting them. /media is the dir used by udisks (/run/media/<user> is used by udisks2), so see if you have that installed and what uses it.

Offline

#3 2014-04-29 03:55:17

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: [SOLVED] USB drive mount: automount folders are not always deleted

Scimmia wrote:

You need to figure out what is mounting them. /media is the dir used by udisks (/run/media/<user> is used by udisks2), so see if you have that installed and what uses it.

I removed udisks and it seems udisks2 alone manages everything fine.  Of course as I saw the dependencies XFCE4 may not work but I use OpenBox without a DE anyway.
Thanks, I didn't know there were two packages doing the same installed.

So the problem was that they are conflicting? At boot udisks manages the mounts then udisks2 takes over and the folders created before are left there?

Last edited by freyr (2014-04-29 04:03:25)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

#4 2014-04-29 04:21:27

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED] USB drive mount: automount folders are not always deleted

udisks/udisks2 won't mount things themselves, something else uses them to mount things. You probably have something installed that uses udisks and is set to mount things automatically. No idea what it is, though.

Offline

#5 2014-04-29 04:31:20

freyr
Member
From: Hungary
Registered: 2010-02-04
Posts: 131

Re: [SOLVED] USB drive mount: automount folders are not always deleted

It was udiskie.

Last edited by freyr (2014-04-29 04:31:34)


What, so everyone's supposed to sleep every single night now? You realize that nighttime makes up half of all time?

Offline

Board footer

Powered by FluxBB