Tech Support Forum banner
Status
Not open for further replies.
1 - 20 of 21 Posts

· Registered
Joined
·
70 Posts
Discussion Starter · #1 ·
Hello everyone! Could someone say how to unmount a West. Digital 2TB usb ext hdd using the terminal? I am using Ubuntu 10.04, which was clean installed. When I try to unmount, I get a message that I can't, nor does it say I can "eject" the drive. Thank you all. -gustav521
 

· Premium Member
Joined
·
6,569 Posts
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Hi,

For starters are you using the desktop or server edition. Also, how are you trying to unmount the drive, is it with terminal or by right clicking on it?

Cheers!
 

· Registered
Joined
·
70 Posts
Discussion Starter · #3 ·
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Hello wmorri, thank you for your quick reply! I am using the Desktop Edition

of Ubuntu 10.04. I am right clicking, and it is saying that it can not be

stopped at this time. I asked re using the Terminal to unmount, because I

was looking for a work-a-around to the problem that others are saying

exists in 10.04, ie unmounting ext. usb hdd's. Thank you for your help! -gustav521
 

· Premium Member
Joined
·
6,569 Posts
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Gustav521,

Please give it a little time. Everyone that is on staff here has jobs or goes to school or has matters that take priority over the forum. I will try and get to this tomorrow when I have a little time.
 

· Registered
Joined
·
19 Posts
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Have you tried disk utility in Administration/Preferences? (can't remember at the back of my mind)

Try to unmount the drive and then safely remove it.
 

· Registered
Joined
·
70 Posts
Discussion Starter · #8 ·
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Hello everyone! I now remember that I was coping files to this ext hdd, when I inadvertently turned off the main pc! The ext hdd was still working at that time. How do I find the process accessing the hdd and turn it off?? Thank you! -gustav521
 

· Premium Member
Joined
·
2,755 Posts
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

You have possibly corrupted the external hard drive by switching off whilst it was being accessed.

When rebooting Ubuntu, make sure that no windows are open that display the contents of the external hard drive.

With the external hard drive connected, open a terminal and post contents of
this command:

mount
 

· Registered
Joined
·
70 Posts
Discussion Starter · #10 ·
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

I am trying to avoid mounting this ext hdd, because I don't want to

worsen the corruption issue. So how will I be able to umount it safely, or

kill the process using it?? Thank you! -gustav521
 

· Premium Member
Joined
·
6,569 Posts
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Hi,

You won't be mounting the hdd just by typing the command mount. There is more to it than that. I think that hal8000 just wants to see what drives it finds that can be mounted.
 

· Registered
Joined
·
70 Posts
Discussion Starter · #12 ·
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Here is the output of the command mount. Thank you for the explaination!

~$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/william/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=william)
/dev/sdb1 on /media/Elements type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)

-gustav521
 

· Registered
Joined
·
70 Posts
Discussion Starter · #13 ·
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

And this is the sudo fdisk -l output:

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000357c0

Device Boot Start End Blocks Id System
/dev/sda1 * 1 30166 242304000 83 Linux
/dev/sda2 30166 30516 2810881 5 Extended
/dev/sda5 30166 30516 2810880 82 Linux swap / Solaris

Disk /dev/sdb: 2000.4 GB, 2000396746752 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00020fc3

Device Boot Start End Blocks Id System
/dev/sdb1 1 243202 1953511424 7 HPFS/NTFS

What can I do?? Thank you! -gustav521
 

· Premium Member
Joined
·
2,755 Posts
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Your 2TB drive has been formatted with NTFS and there will probably be some corruption.
The command "mount" lists mounted partitions and is mounted at /media/Elements.

From your terminal type this:


sudo umount /media/Elements

(note that elements has "E")
if it fails to unmount, force it with "f" switch:

sudo umount -f /media/Elements

if it fails copy and paste the error message.
 

· Registered
Joined
·
70 Posts
Discussion Starter · #16 ·
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Your suggestion worked "hal8000", thank you! I can umount in the future, but can I run chkdsk somehow like you can in Windows to fix the errors??
And thanks to everyone else who helped too!
-gustav521
 

· Premium Member
Joined
·
2,755 Posts
Re: Ubuntu 10.04: how to unmount usb ext hdd using terminal

Ok, please mark as [solved] in your top line.

Boot into windows and connect your extl HDD. Run chkdsk or scandisk from windows,
it may be clean, if not windows should fix the errors for you.
 

· Registered
Joined
·
70 Posts
Discussion Starter · #18 ·
Hello "hal8000" and everyone again! I have now used:
sudo umount /media/Elements to un-mount my West. Digital Elements 2TB ext. hdd several times now. I have also tried using the: System > Admin. > Disk Utility that "slyfth" mentioned to "Safe Remove" the drive, but this is the message I get when I try:

Error detaching drive - An error occurred while performing an operation on "2.0 TB Hard Disk" (WD Ext HDD 1021): The device is busy - Details: One or more partitions are busy on /dev/sdb .

Disk Utility says the drive is healthy, and all my files seem to be intact. Is there some way to identify the process that is using the drive and stop it??
Oh, I have not run chkdsk yet. Thank you all for your continuing help! -gustav521


your help! -gustav521
 

· Premium Member
Joined
·
2,755 Posts
Error detaching drive - An error occurred while performing an operation on "2.0 TB Hard Disk" (WD Ext HDD 1021): The device is busy - Details: One or more partitions are busy on /dev/sdb .
The message says one or more partitions busy, as you only have a single partition
/dev/sdb1

then run command

lsof /dev/sdb1

This will show what files are using the disk.
Post back the results please.

Just make sure also that you have no open windows, nautilus explorer or terminals open that have accessed your disk.
 

· Registered
Joined
·
70 Posts
Discussion Starter · #20 ·
Hello "hal8000" & others: I ran chkdsk / r on my WD 2TB ext. hdd yesterday using the Win XP machine; it took 36 hours!! At stage 3 it found an error

with index $130, file #xyz. So now it has finished through stage 5, and the drive still won't umount safely, as it is being used by who-knows-what! I

tried both: lsof /dev/sdb1 and lsof /media/Elements and nothing happened. I want to get lsof to work. I've read up on it on Google, but it

won't work. So, I am still using sudo umount /media/Elementsl. The program I had been using was Deja Dup when I inadvertently turned off the

PC. Could it be Deja Dup is still trying to finish the "job"? Thanks for your help!. -gustav521
 
1 - 20 of 21 Posts
Status
Not open for further replies.
Top