Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Annoying problem when trying to safely remove USB external HDD while in linux


  • Please log in to reply
9 replies to this topic

#1 rp88

rp88

  • Members
  • 3,067 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:04:54 AM

Posted 15 January 2018 - 06:07 PM

I have a USB 3.0 external hard-drive to which I sometimes backup files. The drive plugs in via USB and gets all it's power along the USB cable too. I've been doing this recently while booted into linux (mint 17.3 MATE, running installed on an USB stick)(right now I've gone about 2 weeks without using windows at all anywhere, that includes work where we have linux too, definitely my record so far) on my toshiba laptop. The issue is that when I "safely remove" the external HDD it tries to mount again within seconds. Now with a normal USB stick that isn't such a concern, but this is a hard-drive, it has moving parts, I'm not a fan of just pulling the USB lead out while it is whirring, I cannot imagine this is healthy for it in the long term. I'm not sure why this is happening, but would like to know how to properly safely remove the external hard-drive rather than have to try to hurriedly tug the USB out in the few moments between telling it to safely remove and it reconnecting itself and mounting again.

The external HDD is a Western Digital "WD Elements 1TB), I bought the drive in about November 2017 and think it was manufactured in 2017 but I'm not sure of the exact model.

I haven't connected this to the PC while I'm running Windows 8.1, but I have previously connected other external HDDs from WD when I've been running windows and they have been safely removable without remounting. Unfortunately I haven't tested those other drives under linux yet either. I just know that all the WD drives I've used before "dismount" fine in windows and this one doesn't in linux. I can make further checks about that if it could help.

Thanks

Edited by rp88, 15 January 2018 - 06:08 PM.

Back on this site, for a while anyway, been so busy the last year.

My systems:2 laptops, intel i3 processors, windows 8.1 installed on the hard-drive and linux mint 17.3 MATE installed to USB

BC AdBot (Login to Remove)

 


#2 pcpunk

pcpunk

  • Members
  • 6,235 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:11:54 PM

Posted 15 January 2018 - 08:13 PM

 

 

 I've been doing this recently while booted into linux (mint 17.3 MATE, running installed on an USB stick

You may be pushing the limits of using linux this way.

 

 

The issue is that when I "safely remove" the external HDD it tries to mount again within seconds. 

Is it Really trying to Mount again, or is it just powering up again?

 

After you mount it, try Unmounting/Ejecting or is it called "Safely Remove Drive", then run "lsblk" in the terminal to see if it has Unmounted.  This should confirm if it is Unmounted and just Powering back up again, but not actually Re-Mounting.


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#3 JohnC_21

JohnC_21

  • Members
  • 24,638 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:11:54 PM

Posted 15 January 2018 - 08:28 PM

Open the Disks program. Click on the WD external drive in the left pane. There may be a power button icon or an eject icon in the upper left. Click on it. Does the drive automount again? Some WDs have an autostart program that creates a virtual CD drive. I don't know if this would affect linux though. If you attach the drive to a Windows computer do you get a virtual CD drive when opening Computer?



#4 mremski

mremski

  • Members
  • 498 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:NH
  • Local time:12:54 AM

Posted 16 January 2018 - 06:34 AM

This is why some folks don't like automounting stuff. :)

 

When you "safely remove" a device under Linux, one of the things it has to do flush any outstanding writes to the device.  This can sometimes take a while (as in seconds).

Depending on how things are configured, simply accessing a device will cause it to get automounted;  this may or may not be happening.

 

With the device plugged in, go to a terminal window and then as root (either sudo or su):

get a list of mounted filesystems by using the command

mount

 

You should be able to figure out which one is the external drive, probably mounted under /media

Example, lets say it's mounted at /media/rp88Disk.

 

As root, try an unmount it:

umount /media/rp88Disk

 

Notice there is only one n in that command and it's not near the front.

 

See what happens, when the prompt comes back, you can unplug it  or leave it alone and see if it gets remounted.

If it gets remounted, you'll have to dig into your filemanager configuration and figure out how to disable automounting of devices.


FreeBSD since 3.3, only time I touch Windows is to fix my wife's computer


#5 rp88

rp88
  • Topic Starter

  • Members
  • 3,067 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:04:54 AM

Posted 18 January 2018 - 05:52 PM

Post #2, I think it is trying to remount, not just powering up. Because if I'm not quick enough it shortly later displays itself as a mounted disk on the desktop again. When I click to safely remove the disk I see that it's icon on the desktop disappears, but within seconds re-appears as if the disk had just been plugged in. I'll report back to you, later or tomorrow, what I can find with those terminal commands.
Back on this site, for a while anyway, been so busy the last year.

My systems:2 laptops, intel i3 processors, windows 8.1 installed on the hard-drive and linux mint 17.3 MATE installed to USB

#6 pcpunk

pcpunk

  • Members
  • 6,235 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:11:54 PM

Posted 18 January 2018 - 08:22 PM

Post #2, I think it is trying to remount, not just powering up. Because if I'm not quick enough it shortly later displays itself as a mounted disk on the desktop again. When I click to safely remove the disk I see that it's icon on the desktop disappears, but within seconds re-appears as if the disk had just been plugged in. I'll report back to you, later or tomorrow, what I can find with those terminal commands.

That's what I was afraid of but just wanted to be sure I understood.

 

Unfortunately I don't run Mate 17.3 right now, and don't have the time to replicate your setup, this may be where the problems lies (running from usb) this is going to cause you more issues than a Internal Drive Install.  mremski had a better answer to try.  I see others are having issues also, but not exactly.  If possible...for now...obviously just shut it down first.  I wonder if KDE would be better, as it won't Auto Mount USB Devices?

 

I don't use mine for file backup, but for Image Backups, and I think mine is a Passport, but when I get a chance will connect it and see what happens.

 

I wonder, are you plugged into a 3.0 Port?

 

Here is a LINK with similar issue


Edited by pcpunk, 18 January 2018 - 08:34 PM.

sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#7 NickAu

NickAu

    Bleepin' Fish Doctor


  • Moderator
  • 13,706 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:127.0.0.1 Australia
  • Local time:03:54 PM

Posted 18 January 2018 - 10:58 PM

 

Because if I'm not quick enough it shortly later displays itself as a mounted disk on the desktop

In Linux just because a drive icon shows on the desktop, It doesn't mean the drive is mounted


Edited by NickAu, 18 January 2018 - 11:00 PM.


#8 pcpunk

pcpunk

  • Members
  • 6,235 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:11:54 PM

Posted 19 January 2018 - 10:22 AM

 

 

Because if I'm not quick enough it shortly later displays itself as a mounted disk on the desktop

In Linux just because a drive icon shows on the desktop, It doesn't mean the drive is mounted

 

Then would running "lsblk" tell us if the drive is mounted?

lsblk

sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#9 rp88

rp88
  • Topic Starter

  • Members
  • 3,067 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:04:54 AM

Posted 20 January 2018 - 04:15 PM

Post #7, it seems that that is what was happening. I misinterpreted what I saw. Running those terminal commands of "lsblk" and "mount" proved it was no longer mounted once I had safely remove it. And the flashing of the external drive's LED I saw now seems to be just itself in some sort of sleep state. Sorry for failing to realise this earlier. There is now NO PROBLEM for me, I just thought there was and thought it was remounting. Thanks for your help everyone.

Edited by rp88, 20 January 2018 - 04:16 PM.

Back on this site, for a while anyway, been so busy the last year.

My systems:2 laptops, intel i3 processors, windows 8.1 installed on the hard-drive and linux mint 17.3 MATE installed to USB

#10 pcpunk

pcpunk

  • Members
  • 6,235 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:11:54 PM

Posted 20 January 2018 - 05:38 PM

No Problem rp88, I noticed that the light blinks on my Windows 7 Install also After it is "Safety Ejected" but is Solid while in use, or Mounted.

 

Interesting that the drive icon shows on the desktop shortly after it is Safely Ejected.  Admittedly I have not used mine on my Linux Install as it's only for Windows Images.  I will plug it into my KDE Install at some point to see what happens after it is Ejected.  Again, KDE does not Auto Mount by Default.  


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users