3

Notice

I could not find the solution but after installing Ubuntu 16.04.2 LTS the problem no longer exists!


The Problem

I have a 1TB Transcend external hdd (inner chip is WDC_WD10JPVX-22JC3T0_WD-WX11A15R3AC8) and when I try to safely remove it either from file manager or even from command line with udisksctl unmount -b /dev/sdb1 and then udisksctl power-off -b /dev/sdb1, it immediately pops up again and won't power off.

I'm using Ubuntu 16.04.1 LTS.

  • It happens either USB2 or USB3.
  • It can safely be removed in either Mac or Windows!
  • I tried 16.04 live and could not safely remove! but my HD can be safely removed in a live 16.04 booted in another PC, and also can be safely removed in my laptop in Windows!

These are some output after running udisksctl unmount -b /dev/sdb1 and then udisksctl power-off -b /dev/sdb:

  1. udevadm monitor
  2. udisksctl monitor
  • Is this plugged into a USB3 port? – heynnema Nov 02 '16 at 01:04
  • @heynnema, yes it is. :) – Masked Man Nov 02 '16 at 07:43
  • Try plugging it into a USB2 port, and see if it still occurs. I'm checking on reports that it may be a USB3 issue. Report back. – heynnema Nov 02 '16 at 14:03
  • @heynnema, no it's the same :) – Masked Man Nov 02 '16 at 19:42
  • You lost me. Does it work "as expected" on a USB2 port, but won't power off/unmount on USB3? – heynnema Nov 02 '16 at 19:53
  • @heynnema, I mean the problem is there no matter of which port I use :) – Masked Man Nov 02 '16 at 20:04
  • Well, that eliminates a USB3 issue. Does the same thing happen under Windows, or on another computer? – heynnema Nov 02 '16 at 20:59
  • @heynnema, not I can safely remove it in either Mac or Windows! – Masked Man Nov 02 '16 at 21:24
  • Boot to the Ubuntu 16.10 Live DVD and see if the problem still occurs. If it works... you know what you have to do... :-) – heynnema Nov 02 '16 at 21:45
  • @heynnema, what should I do?! If you mean I have to do a fresh install: Reinstall is not a solution, it is a give up! – Masked Man Nov 02 '16 at 22:01
  • No no no. I just wanted you to BOOT to the 16.10 Ubuntu Live DVD to see if your disk can be properly dismounted. If it DOES work, then that means that there's something that they've fixed/changed in 16.10. THEN an upgrade to 16.10 would be in order. We don't give up THAT easily :-) – heynnema Nov 02 '16 at 22:07
  • @heynnema, oh I read 16.04 instead of 16.10 but 16.10 is not LTS so I will not upgrade to it however! thanks for follow-up. – Masked Man Nov 03 '16 at 07:12
  • BOOTING to a 16.10 DVD won't disturb your LTS installation at all. It's just to test to see if your problem has been fixed in 16.10. – heynnema Nov 03 '16 at 15:03
  • @heynnema, I know but even if it is fixed there I won't upgrade the system to 16.10 so it's not worth the effort! NOTE: I don't exactly recall if it was a live 16.04 or my installation at the very first, but back then I could safely remove it, and when again plugged it was not able to do it. – Masked Man Nov 03 '16 at 15:30
  • For me, personally, I couldn't sleep until I confirmed it was a 16.04 problem, that was fixed in 16.10. It may not be. But if it still failed in 16.10, then I'd know to keep looking for a fix. It may be a problem with the USB to SATA converter board in your Transcend box (a firmware fix?), or maybe even a problem with the HDD. WD has a number of settings in their drives that can be tweaked. Some have to do with spin down/up. But we never got that far. – heynnema Nov 03 '16 at 15:49
  • @heynnema, I can't download the 16.10 right now and as I said I think it's something newly installed waking it up again! could it be? – Masked Man Nov 03 '16 at 17:04
  • You lost me. You want the drive awake, yes? Is your /home on your internal drive, or this external drive? To eliminate something you installed on 16.04, do you already have a 16.04 Ubuntu DVD burned? If so, boot to it, and see if the external disk mounts/unmounts as you expect. Our next comments may need to go to chat... just so you know... as they don't want extended comments here... so just click the chat link, if you see it. – heynnema Nov 03 '16 at 17:21
  • Did you ever try booting to a Ubuntu Live DVD/USB 16.10 in "Try Ubuntu" mode and see if the problem still exists? Are you willing to "do what it takes" to try and resolve this problem? – heynnema Nov 25 '16 at 15:47
  • @heynnema ,not a 16.10 but I tried 16.04 live and could not safely remove! but my HD can be safely removed in a live 16.04 booted in another PC, and also can be safely removed in my laptop in windows! – Masked Man Nov 25 '16 at 19:30
  • Using your brand/make/model #'s, go to the manufacturers web site and make sure you've got the latest BIOS firmware installed. Also... do the 16.10 Ubuntu Live DVD/USB test as I've asked since Nov 2. – heynnema Nov 25 '16 at 19:40
  • @heynnema I have the latest bios version and do not have access to 16.10 right now. I want to solve it in my 16.04 :) – Masked Man Nov 25 '16 at 19:46
  • Then I'm sorry... I can't help you. – heynnema Nov 25 '16 at 20:01
  • @MaskedMan, Could you post output of dpkg -l *smart*, in other hand run udevadm monitor -u and udisksctl monitor in separate terminals then use your commands udisksctl unmount -b /dev/sdb1 and then udisksctl power-off -b /dev/sdb1 , post their output too. BTW, is there only one partition in this drive? – user.dz Nov 26 '16 at 18:03
  • 1
  • This is a similar case: https://askubuntu.com/questions/422481/prevent-usb-drives-from-auto-remounting-after-remove – user.dz Nov 26 '16 at 20:32
  • @user.dz, gvfs-mount --eject "file:///media/$USER/DISK_LABEL" just unmounts HD but it still spins and it's light is on! – Masked Man Nov 26 '16 at 20:52
  • @MaskedMan, Check if all device nodes get removed ls -l /dev/sdb* , if no device node is left then it's ok. – user.dz Nov 26 '16 at 20:55
  • @user.dz, It's not working. – Masked Man Nov 26 '16 at 21:02
  • @MaskedMan Have you tried the Disks application ? – userDepth Mar 21 '17 at 16:19

3 Answers3

2

I have a cheap WD Black that has the same issue and there is no firmware update available. As I use it as a back-up drive that I only attach 1/week, I stopped worrying about it and unmount all partitions and then just unplug it...

Has been successful for the last 4 years or so.

Fabby
  • 34,259
  • I know it is not so harmful to unplug it after unmounting as I can hear it spins down itself, but I'm looking for the right way! so I upvoted your answer but did not accept it :) – Masked Man Nov 01 '16 at 21:56
  • Thanks... The only solution is a firmware upgrade, as the "hardware" doesn't support it. Didn't look into your specific chipset, but looked into mine and there wasn't one, so I stopped looking after 6 months or so as it was a cheap one meant for backup anyway. – Fabby Nov 02 '16 at 06:57
  • 1
    I don't think it to be a firmware issue as it was neither Windows nor OSx couldn't safely remove it but they can! :) – Masked Man Nov 02 '16 at 07:45
  • @Fabby note that WD drives have internal parameters that you can tweak, using a WD tool that runs under Windows (see wd.com), and even hdparm in Ubuntu can get to some of them. As memory serves... some parameters had to do with idle time, spin up/down, power saving, etc. – heynnema Nov 03 '16 at 15:56
  • @heynnema Yup, I know, but I don;t have Windows and hdparam did not show that parameter... ;) – Fabby Nov 25 '16 at 10:02
1

Gnome-disk-utility has "power of this disk" option which I use to power off my external disks safely. Please check the image attached. I'm running Linux Mint 19.1 Tessa

deni
  • 59
0

I had the same problem with a 1TB external Seagate hdd. Whenever I safely removed it or ejected it, it got unmounted and remounted within seconds.

The first thing I did was to zero fill the entire hdd with the dd command, because it had some weird partitioning on its own.

Then I created an MBR (msdos) partition table and a unique primary ntfs partition with parted.

This solved the problem of the hdd being automatically remounted after being safely removed or ejected. Also, this keeps the hdd from mounting on its own when plugged to the pc/laptop (for some reason I do not understand).

However, even in the unmounted state, the drive continued spinning. To completely shut it down before removing it from my pc/laptop, I do:

sudo hdparm -Y /dev/sdb

This works for me.

Chim3ra
  • 211