Can't unplug external hard drive
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2006
    Posts
    1,689
    Linux (Fedora) Chrome 72.0.3626.81

    Can't unplug external hard drive

    Hi Friends!

    I am running Fedora 29 Workstation, which is fully updated. Today morning I was copying some data from my WD 1 TB external hard drive (USB 3.0) to my pc and despite the amount of data being copied so small, it took forever and when I tried to access my folder the file manager crashed, in fact as I write this, I am no longer able to get into files. I tried to shut down, but the error shown was "some applications are busy or have unsaved work". I panicked and tried the following command from a terminal as a normal user only to 1st unmount, power off and then unplug my external hard drive, but I could not do anything at all. It has been more than 3-4 hours since the time I 1st wanted to unplug, but I am miserable. The external hard drive is still attached and writing the data to my pc, I guess as the light is still blinking and I am too scared to just pull the USB cord out of my USB port. Can you please help?

    Please also let me know which commands are the best way to safely unmount, power off and unplug an external hard drive or pen drive in a situation like this. Thanks.

    Code:
    [james@localhost ~]$ lsblk
    NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda               8:0    0 465.8G  0 disk 
    ├─sda1            8:1    0     1G  0 part /boot
    └─sda2            8:2    0 464.8G  0 part 
      ├─fedora-root 253:0    0    50G  0 lvm  /
      ├─fedora-swap 253:1    0   7.8G  0 lvm  [SWAP]
      └─fedora-home 253:2    0   407G  0 lvm  /home
    sdb               8:16   0 931.5G  0 disk 
    └─sdb1            8:17   0 931.5G  0 part /run/media/james/My Passport
    sr0              11:0    1  1024M  0 rom  
    [james@localhost ~]$ 
    [james@localhost ~]$ 
    [james@localhost ~]$ udisksctl power-off -b /dev/sdb
    Error powering off drive: The drive in use: Device /dev/sdb1 is mounted (udisks-error-quark, 14)
    [james@localhost ~]$ 
    [james@localhost ~]$ 
    [james@localhost ~]$ udisks --detach /dev/sdb
    bash: udisks: command not found...
    ^C
    [james@localhost ~]$ udisksctl power-off -b /dev/sdb
    Error powering off drive: The drive in use: Device /dev/sdb1 is mounted (udisks-error-quark, 14)
    [james@localhost ~]$ 
    [james@localhost ~]$ umount /
    /                                 /home                             /sys/fs/cgroup/cpu\,cpuacct       /sys/fs/fuse/connections
    /boot                             /proc                             /sys/fs/cgroup/cpuset             /sys/fs/pstore
    /dev                              /proc/sys/fs/binfmt_misc          /sys/fs/cgroup/devices            /sys/fs/selinux
    /dev/hugepages                    /run                              /sys/fs/cgroup/freezer            /sys/kernel/config
    /dev/mapper/fedora-home           /run/media/james/My\ Passport     /sys/fs/cgroup/hugetlb            /sys/kernel/debug
    /dev/mapper/fedora-root           /run/user/1000                    /sys/fs/cgroup/memory             /sys/kernel/debug/tracing
    /dev/mqueue                       /run/user/1000/gvfs               /sys/fs/cgroup/net_cls\,net_prio  /sys/kernel/security
    /dev/pts                          /sys                              /sys/fs/cgroup/perf_event         /tmp
    /dev/sda1                         /sys/fs/bpf                       /sys/fs/cgroup/pids               /var/lib/nfs/rpc_pipefs
    /dev/sdb1                         /sys/fs/cgroup                    /sys/fs/cgroup/systemd            
    /dev/shm                          /sys/fs/cgroup/blkio              /sys/fs/cgroup/unified            
    [james@localhost ~]$ umount /dev
    /dev                     /dev/mapper/fedora-home  /dev/mqueue              /dev/sda1                /dev/shm                 
    /dev/hugepages           /dev/mapper/fedora-root  /dev/pts                 /dev/sdb1                
    [james@localhost ~]$ umount /dev/sd
    /dev/sda1  /dev/sdb1  
    [james@localhost ~]$ umount /dev/sdb1
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  2. #2
    Join Date
    Sep 2006
    Posts
    1,689
    Linux (Fedora) Chrome 72.0.3626.81

    Re: Can't unplug external hard drive

    Code:
    [james@localhost ~]$ lsb
    lsblk        lsb_release  
    [james@localhost ~]$ lsb_release -a
    LSB Version:	:core-4.1-amd64:core-4.1-noarch
    Distributor ID:	Fedora
    Description:	Fedora release 29 (Twenty Nine)
    Release:	29
    Codename:	TwentyNine
    [james@localhost ~]$
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  3. #3
    Join Date
    Sep 2006
    Posts
    1,689
    Linux (Fedora) Chrome 72.0.3626.81

    Re: Can't unplug external hard drive

    Code:
    [james@localhost ~]$ echo $XDG_CURRENT_DESKTOP
    GNOME
    [james@localhost ~]$ 
    [james@localhost ~]$ ls /usr/share/xsessions/
    gnome-classic.desktop  gnome.desktop  gnome-xorg.desktop
    [james@localhost ~]$ 
    [james@localhost ~]$ udisksctl status 
    MODEL                     REVISION  SERIAL               DEVICE
    --------------------------------------------------------------------------
    ST3500414CS               CA12      9VV4BGWF             sda     
    HL-DT-ST DVDRAM GH24NSC0  LK00      K4CE7V91352          sr0     
    WD My Passport 25E1       1019      57585431413337315252544B sdb     
    [james@localhost ~]$
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  4. #4
    Join Date
    Sep 2006
    Posts
    1,689
    Linux (Fedora) Chrome 72.0.3626.81

    Re: Can't unplug external hard drive

    Code:
    [james@localhost ~]$ udisksctl monitor 
    Monitoring the udisks daemon. Press Ctrl+C to exit.
    15:40:47.322: The udisks-daemon is running (name-owner :1.6).
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  5. #5
    Join Date
    Sep 2006
    Posts
    1,689
    Linux (Fedora) Chrome 72.0.3626.81

    Re: Can't unplug external hard drive

    some more info, in case...

    Code:
    [james@localhost ~]$ rpm -qa kernel
    kernel-4.18.16-300.fc29.x86_64
    kernel-4.20.5-200.fc29.x86_64
    kernel-4.20.6-200.fc29.x86_64
    [james@localhost ~]$ 
    [james@localhost ~]$ 
    [james@localhost ~]$ cat /proc/cmdline 
    BOOT_IMAGE=/vmlinuz-4.20.6-200.fc29.x86_64 root=/dev/mapper/fedora-root ro resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet LANG=en_US.UTF-8
    [james@localhost ~]$
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  6. #6
    Join Date
    Sep 2006
    Posts
    1,689
    Linux (Fedora) Chrome 72.0.3626.81

    Re: Can't unplug external hard drive

    Code:
    [james@localhost ~]$ lsblk
    NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda               8:0    0 465.8G  0 disk 
    ├─sda1            8:1    0     1G  0 part /boot
    └─sda2            8:2    0 464.8G  0 part 
      ├─fedora-root 253:0    0    50G  0 lvm  /
      ├─fedora-swap 253:1    0   7.8G  0 lvm  [SWAP]
      └─fedora-home 253:2    0   407G  0 lvm  /home
    sdb               8:16   0 931.5G  0 disk 
    └─sdb1            8:17   0 931.5G  0 part /run/media/james/My Passport
    sr0              11:0    1  1024M  0 rom  
    [james@localhost ~]$ 
    [james@localhost ~]$ iostat -p /dev/sdb
    Linux 4.20.6-200.fc29.x86_64 (localhost.localdomain) 	02/05/2019 	_x86_64_	(4 CPU)
    
    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
               2.10    0.02    0.81   45.87    0.00   51.20
    
    Device             tps    kB_read/s    kB_wrtn/s    kB_read    kB_wrtn
    sdb               2.76       151.25         0.72    2462768      11696
    sdb1              2.76       151.18         0.72    2461684      11696
    [james@localhost ~]$
    fedoralinuxcommands.blogspot.com


    All the forces in the world are not so powerful as an idea whose time has come - Victor Hugo

  7. #7
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    1,051
    Linux (Fedora) Firefox 65.0

    Re: Can't unplug external hard drive

    well
    Code:
    $  man umount
    UMOUNT(8)                                                                        System Administration                                                                       UMOUNT(8)
    
    NAME
           umount - unmount file systems
    
    SYNOPSIS
           umount -a [-dflnrv] [-t fstype] [-O option...]
    
           umount [-dflnrv] {directory|device}...
    
           umount -h|-V
    lol, umount is not the command you want to use to show mounted partitions. but "mount". , or "showmount" (for remote mounts).
    umount is used to UN-mount partitions.

    if the drive is still doing stuff, even if you are not doing anything, can you check i you have "tracker" , or "baloo_file" processes running ?
    if so, they are just creating their search databases.... (I always remove those proggies anyway).

    also, when it is "doing stuff", type the command: lsof "/run/media/james/My Passport" and see what program has files open on it.
    "monsters John ... monsters from the ID..."
    "ma vule teva maar gul nol naya"

Similar Threads

  1. Using internal hard drive as external hard drive
    By tech291083 in forum Wibble
    Replies: 5
    Last Post: 9th December 2017, 05:15 PM
  2. external hard drive
    By archfotna in forum Hardware & Laptops
    Replies: 4
    Last Post: 3rd July 2014, 07:47 PM
  3. Replies: 16
    Last Post: 3rd November 2011, 05:31 PM
  4. Replies: 2
    Last Post: 24th November 2008, 12:56 PM
  5. How can I rename the drive in my external hard drive
    By yinglcs in forum Using Fedora
    Replies: 3
    Last Post: 14th February 2007, 03:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •