Find the answer to your Linux question:
Results 1 to 10 of 10
How do I properly unmount a external USB hard drive (Western Digital My Book 300GB)? When I right click on the icon for the external device I choose "unmount". But ...
  1. #1
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221

    Unable to Unmount External USB Drive

    How do I properly unmount a external USB hard drive (Western Digital My Book 300GB)? When I right click on the icon for the external device I choose "unmount". But I get a error "Operation Failed - Cannot figure out where the device is mounted."

    My OS is Suse Linux Enterprise Server - SP2.

    -Mike

  2. #2
    Just Joined!
    Join Date
    Apr 2007
    Posts
    93
    The only answers I can think of are:

    1. Call up a text Shell and try a text umount command. I do not remember the syntax, but you can find it in "man" or "info".

    2. Turn off the computer. In my case, it was convenient for me to turn off the computer when I was done, so I never tried to unmount my external HD. So I do not know if it works on mine or not.

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Execute this
    Code:
    su -
    fdisk -l
    df -h
    Post output here.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Here is the output. Any help will be apprecitated - thanks!!

    linux-0f1s:~ # fdisk -l

    Disk /dev/sda: 160.0 GB, 160000000000 bytes
    255 heads, 63 sectors/track, 19452 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 1 194 1558273+ 82 Linux swap / Solaris
    /dev/sda2 * 195 19452 154689885 83 Linux

    Disk /dev/sdb: 320.0 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 38913 312568641 83 Linux
    linux-0f1s:~ # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 148G 115G 34G 78% /
    udev 502M 112K 502M 1% /dev
    /dev/sdb1 294G 197G 82G 71% /media/disk
    linux-0f1s:~ #

  5. #5
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    /dev/sdb1 294G 197G 82G 71% /media/disk
    Try this
    Code:
    su -
    umount /dev/sdb1
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #6
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Thanks devils casper! After running the unmount command that you posted I noticed that the GUI still shows the drive as mounted - when I right click on the icon for the external storage device the option to "unmount" is still visible. Is the device truly unmmounted? It appears that it is not from my output below.

    Output from Terminal:
    linux-0f1s:~ # umount /dev/sdb1
    linux-0f1s:~ # umount /dev/sdb1
    umount: /dev/sdb1: not mounted
    linux-0f1s:~ #

    Next I powered off the external USB device and unlugged it from my server and noticed that there is still a directory in my filesystem called "/media/disk" and is 62GB. I do not want my back up files on my hard disk. They need to be on the USB external hard drive. This has caused me "disk full" errors a couple of times in the past.

    What am I doing wrong? I thought all I had to do was plug in the USB hard drive.

    How do I prevent the files from my external USB device from being copied to the file system on my hard drive?

    -Mike
    Suse Linux Enterprise Server 11
    Suse Linux Enterprise Server 10 - SP3
    OpenSuse 11.2, KDE 4.3.1

  7. #7
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Does output of df -h command list /dev/sdb1 partition?
    Code:
    umount /dev/sdb1
    df -h
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #8
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Thanks again for replying. Since my last post, I unmounted, powered off, then unplugged the USB cable. I deleted the "disk" directory inside /media/disk. I did not delete /media. Then I re-attached the USB hard drive. Here is the output:


    linux-0f1s:~ # umount /dev/sdb1
    linux-0f1s:~ # df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/sda2 148G 77G 72G 52% /
    udev 502M 112K 502M 1% /dev
    linux-0f1s:~ #

    I should have ran the "df-h" command before I deleted the "disk" directory inside /media/disk. Does this mean everything is back to normal? What would have caused the USB hard drive to make a copy onto media/disk which resulted in a "error 28" or disk full error?


    -Mike
    Suse Linux Enterprise Server 11
    Suse Linux Enterprise Server 10 - SP3
    OpenSuse 11.2, KDE 4.3.1

  9. #9
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Copying files to the mount location when not mounted might do it.


  10. #10
    Linux Newbie
    Join Date
    Feb 2007
    Location
    USA
    Posts
    221
    Thank you everyone for your input on this topic!

    Quote Originally Posted by gogalthorp View Post
    Copying files to the mount location when not mounted might do it.
    That may have been what happened. But I wonder how it became unmounted. I will have to keep an eye on this and will make use of this command more often "dh -h."

    -Mike
    Suse Linux Enterprise Server 11
    Suse Linux Enterprise Server 10 - SP3
    OpenSuse 11.2, KDE 4.3.1

Posting Permissions

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