How to prevent USB drive from remounting after ejecting?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

How to prevent USB drive from remounting after ejecting?

Postby glitchathon on Fri Aug 22, 2014 2:40 pm

This seems to have been introduced recently after some updates. I am using Mint 17 XFCE edition.

I have a Western Digital 1 TB USB drive. When I am ready to remove it, I go into Thunar and click the eject button. I have also tried right clicking and ejecting. Both ways work. But within two seconds it automatically remounts. This is less time than is possible for me to quickly unplug it.

I have tried disabling the automatic mounting options in the Volume Management settings. But the Settings don't seem to do anything. Even when I disable automatic mounting when a removable drive is inserted, it's still automatically amount.

At this point, I am willing to forgo any automatic mounting, and do everything manual, if I can only get it to properly unmount. But there does not seem to be any way for me using the common Settings to prevent any type of automounting.

Any ideas on what I can do? Thanks!
glitchathon
Level 1
Level 1
 
Posts: 29
Joined: Thu Mar 17, 2011 12:27 pm

Linux Mint is funded by ads and donations.
 

Re: How to prevent USB drive from remounting after ejecting?

Postby WharfRat on Fri Aug 22, 2014 6:34 pm

Try unmounting with umount

First get the device with the mount command
Code: Select all
mount


Look for the drive and the device designation on the left and

Code: Select all
sudo umount -l /dev/sdg1


Use your actual device.
Image
User avatar
WharfRat
Level 12
Level 12
 
Posts: 4273
Joined: Thu Apr 07, 2011 8:15 pm

Re: How to prevent USB drive from remounting after ejecting?

Postby CtrlAltDel on Fri Aug 22, 2014 7:09 pm

glitchathon wrote:This seems to have been introduced recently after some updates. I am using Mint 17 XFCE edition.

I have a Western Digital 1 TB USB drive. When I am ready to remove it, I go into Thunar and click the eject button. I have also tried right clicking and ejecting. Both ways work. But within two seconds it automatically remounts. This is less time than is possible for me to quickly unplug it.

I have tried disabling the automatic mounting options in the Volume Management settings. But the Settings don't seem to do anything. Even when I disable automatic mounting when a removable drive is inserted, it's still automatically amount.

At this point, I am willing to forgo any automatic mounting, and do everything manual, if I can only get it to properly unmount. But there does not seem to be any way for me using the common Settings to prevent any type of automounting.

Any ideas on what I can do? Thanks!


Have you tried using the program named dconf Editor? There is a setting in that program listed at

org.cinnamon.desktop.media-handling

and you can check or uncheck for automount. It's description is:

If set to true, then Nautilus will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.


dconf-editor is available to install from the Software Manager using Mint.
Image
i3-2120 Processor
Intel HD Graphics 2000
8 GB Memory - 1 TB HD
Mint 17 Cinnamon 64bit
User avatar
CtrlAltDel
Level 4
Level 4
 
Posts: 265
Joined: Sun Jun 27, 2010 7:01 pm
Location: Birmingham, AL., USA

Re: How to prevent USB drive from remounting after ejecting?

Postby glitchathon on Fri Aug 22, 2014 7:13 pm

I actually tried that (umount from CLI) several times and got the same result. After digging into it some more, I realized that the ejecting and a unmounting are two different things. The problem arises when you try to eject, and disconnect power. This is the same as hitting the eject button next to the drive in Thunar. The drive will automatically reconnect.

It turns out that the Volume Management section does help. I disabled auto mounting. But, it is still important not to try to eject. Just use that umount command in the commandline, or right-click and unmount the drive, but do not click on the eject button.

It well unmount, but stay powered on, at which point you can disconnect the drive.

Ideally, it would be nice if you could eject the drive and power down without it coming back on. It just feels safer that way, if it worked. But unmounting is good enough, I suppose. It is weird that ejecting worked before though?
glitchathon
Level 1
Level 1
 
Posts: 29
Joined: Thu Mar 17, 2011 12:27 pm

Re: How to prevent USB drive from remounting after ejecting?

Postby glitchathon on Fri Aug 22, 2014 7:18 pm

CtrlAltDel wrote:
Have you tried using the program named dconf Editor? There is a setting in that program listed at

org.cinnamon.desktop.media-handling

and you can check or uncheck for automount. It's description is:

If set to true, then Nautilus will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.


dconf-editor is available to install from the Software Manager using Mint.


Haven't tried it yet, but my searches did lead me to that program. I was about to check it out, when I discovered the unmounting versus ejecting discrepancy mentioned in my previous post.

I may check it out anyway to see if it affects the settings, but for now, it seems I do have a solution. Thanks!
glitchathon
Level 1
Level 1
 
Posts: 29
Joined: Thu Mar 17, 2011 12:27 pm

Re: How to prevent USB drive from remounting after ejecting?

Postby CtrlAltDel on Fri Aug 22, 2014 11:30 pm

glitchathon wrote:
CtrlAltDel wrote:
Have you tried using the program named dconf Editor? There is a setting in that program listed at

org.cinnamon.desktop.media-handling

and you can check or uncheck for automount. It's description is:

If set to true, then Nautilus will automatically mount media such as user-visible hard disks and removable media on start-up and media insertion.


dconf-editor is available to install from the Software Manager using Mint.


Haven't tried it yet, but my searches did lead me to that program. I was about to check it out, when I discovered the unmounting versus ejecting discrepancy mentioned in my previous post.

I may check it out anyway to see if it affects the settings, but for now, it seems I do have a solution. Thanks!


Just as well, it doesn't seem to work on Thunar anyway. It does work on Nautilus, Nemo, and Caja, though. I'm glad you found a solution.
Image
i3-2120 Processor
Intel HD Graphics 2000
8 GB Memory - 1 TB HD
Mint 17 Cinnamon 64bit
User avatar
CtrlAltDel
Level 4
Level 4
 
Posts: 265
Joined: Sun Jun 27, 2010 7:01 pm
Location: Birmingham, AL., USA

Re: How to prevent USB drive from remounting after ejecting?

Postby Buzzsaw on Sat Aug 23, 2014 1:11 pm

Have you tried palimpsest aka 'GNOME Disks' (Menu -> Accessories -> Disks)?

On the top-right, there's a button to press to safely remove external drives.
Buzzsaw
Level 3
Level 3
 
Posts: 187
Joined: Sat Aug 23, 2014 12:53 pm

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 40 guests