LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-16-2005, 03:17 AM   #1
trebek
Member
 
Registered: Feb 2005
Location: Costa Rica
Distribution: Ubuntu, gOS, Debian & Slack 12
Posts: 426

Rep: Reputation: 30
Device busy, cannot unmount


Hi everyone.

I have mounted my USB flash drive into a folder on my desktop called Stick. Sometimes, i get this error: [umount: /home/punisher/Desktop/Stick: device is busy]. What can i do to stop everything going on with the device so i can unmount the card? Like always, ive done research but unsuccesfully found nothing.
 
Old 06-16-2005, 04:01 AM   #2
ashamril
Member
 
Registered: Jan 2003
Location: cyberjaya
Distribution: rh mdk deb fed suse
Posts: 99

Rep: Reputation: 15
u can try run command lsof - list open files to check which processes accessing the folder/files.
 
Old 06-16-2005, 08:48 AM   #3
franzfranz
Member
 
Registered: Mar 2004
Location: Indiana, US
Distribution: gentoo
Posts: 87

Rep: Reputation: 15
many times i'll just have a terminal open somewhere that's working directory is within my pen drive. That will give you that same error.
 
Old 06-16-2005, 12:41 PM   #4
samel_tvom
Member
 
Registered: Aug 2004
Posts: 133

Rep: Reputation: 15
yepp, I have the same problem as franzfranz but sometimes I don't even see that I have a terminal in that directory because I have su:ed.

So if I'm in my mp3player-dir /mnt/mp3 with my ordinary user, and then su and change dir to /mnt (with root-user), my ordinary user is still in /mnt/mp3, so I have to "logout from su" and change dir with the ordinary user... kind of
 
Old 06-20-2005, 01:35 AM   #5
trebek
Member
 
Registered: Feb 2005
Location: Costa Rica
Distribution: Ubuntu, gOS, Debian & Slack 12
Posts: 426

Original Poster
Rep: Reputation: 30
I didn't know that having at least a terminal open implied some kind of work even though nothing is being performed on the device. Am i getting the point right?
 
Old 06-20-2005, 06:14 AM   #6
samel_tvom
Member
 
Registered: Aug 2004
Posts: 133

Rep: Reputation: 15
trebek. yepp. I don't know why but if you have a terminal in the dir (or any sub-dir of that dir), you can't umount.
 
Old 06-20-2005, 08:54 AM   #7
kaz2100
Senior Member
 
Registered: Apr 2005
Location: Penguin land, with apple, no gates
Distribution: SlackWare > Debian testing woody(32) sarge etch lenny squeeze(+64) wheezy jessie stretch buster
Posts: 1,725

Rep: Reputation: 107Reputation: 107
Although I have not tested completely,
Code:
program_1 /mnt/your/mount/point
then do some work with GUI, then close that file (/mnt/your/mount/point).

Code:
umount /mnt/your/mount/point
fails, complaining that device is busy.

When I quit (not close) "program_1",
I can unmount.

So far, acroread seems sometimes to behave like this.

I am using Debian, Sarge kernel 2.6.10 XFce.
 
Old 06-20-2005, 11:52 AM   #8
trebek
Member
 
Registered: Feb 2005
Location: Costa Rica
Distribution: Ubuntu, gOS, Debian & Slack 12
Posts: 426

Original Poster
Rep: Reputation: 30
Does having konqueror open browsing the particular folder make the umount behave the same way? I can't tell cause the only way to access the Stick folder on my desktop is through the terminal, i can't see the folder contents using konqueror, graphical i would say. I can copy and list everything on the mounted folder, but only through a terminal program. Could this be related, or am i just mounting the device incorrectly?

All i do is:

'mount /dev/sda1 /home/punisher/Desktop/Stick'

Last edited by trebek; 06-20-2005 at 11:54 AM.
 
Old 09-18-2006, 12:01 AM   #9
SentinelT
LQ Newbie
 
Registered: Oct 2003
Location: Northam, Western Australia
Distribution: Mandrake 10, Suse 9.1, Dynebolic, Demudi, Gentoo
Posts: 24

Rep: Reputation: 15
reply to "Device busy, cannot unmount"

I know this is an old thread but just the same, people (newbies) have this problem and search for solutions all the time.

I use KDE's ksysguard to find the program still accessing the device (cdrom,sda...) and kill it. I.E. I use cedega a lot and sometimes the program will not let go of the cdrom drive after a bad install and even though I have shut down cedega the wine server is still accessing the cdrom and so I can not umount or eject the disc in the drive.

yes you can use the command line method but most newbies dont know what it is and they are already in a GUI.
Ksysguard is for KDE but Im sure there is an equal program in Gnome or what ever GUI you use.

just my two cents worth
hope it helps someone.

Cheers
Sentinelt
 
Old 09-28-2006, 04:06 PM   #10
trebek
Member
 
Registered: Feb 2005
Location: Costa Rica
Distribution: Ubuntu, gOS, Debian & Slack 12
Posts: 426

Original Poster
Rep: Reputation: 30
Related issue

Old thread, i know, but things keep happening, and i am pretty sure its got to do with something similar to this threads title or subject. For instance, every now and then, i listen to something on the web using firefox, and the of course, i try to open xmms and it won't play, i have to close xmms and open it up again several times and shutdown firefox so the sound device or server is released. This is quite annoying, since linux is my only desktop. I don't like to use windows every time i encounter a problem that i can't solve in my fedora 4 installation.

As always, i ask you linux-savy guys, cause i am clueless about the problem and it's solution. I hope somebody gets to read this.
 
Old 09-28-2006, 05:02 PM   #11
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
If you sit yourself on /mnt/cdrom, the unmount command will not work. Though if you sit yourself some where else and run the commands from there providing the full path of a program, it will unmount the drive.

You could run the following unmount command for optical devices

umount -f -l /mnt/cdrom

This will do a force lazy unmount, but does not always work.


Newbie or not, you still need to learn the command line.

In cedega or any program, use the kill -15 [pid number] to terminate the program. Most documentation says to use kill -9 [pid numpber] to terminate programs which is a lot worst and could create problems in the future. Only use kill -9 [pid number] if kill -15 [pid number] does not work after several attempts.

If you use on-board sound or a sound card that does not have hardware mixing, you have to use esound, arts, or ALSA dmix library to playback multiple sound streams at the same time. For Firefox and Seamonkey (aka Mozila), I use the utility aoss to handle the sound which uses ALSA device 'dsp' that has code to mix multiple sounds together.
 
Old 09-28-2006, 06:03 PM   #12
trebek
Member
 
Registered: Feb 2005
Location: Costa Rica
Distribution: Ubuntu, gOS, Debian & Slack 12
Posts: 426

Original Poster
Rep: Reputation: 30


Ok? I'll research based on that.
 
Old 09-29-2006, 07:02 PM   #13
mma8x
Member
 
Registered: Jul 2004
Posts: 164

Rep: Reputation: 30
you could also try a command called fuser. don't remember the specifics (try man fuser), but i've used it in the past to try to umount a stubborn drive...
 
Old 10-02-2006, 03:37 AM   #14
trebek
Member
 
Registered: Feb 2005
Location: Costa Rica
Distribution: Ubuntu, gOS, Debian & Slack 12
Posts: 426

Original Poster
Rep: Reputation: 30
I don't think it's gotta do something with the drive. Similar to the problem regarding the flash key (this key not unmounting properly), somehow, linux cannot share or release the sound device or application once another application is using it's services. In this case, if firefox takes ownership of the sound device, then xmms or kaffeine cannot use the device, thus crashing.

Is this not a recurring problem in *nix kind OSs? I have not yet found an answer.

BTW, this emoticon scratching its head resembles my state of mind during my research. ROTGL!!!
 
Old 10-02-2006, 11:37 AM   #15
mma8x
Member
 
Registered: Jul 2004
Posts: 164

Rep: Reputation: 30
i was replying to your original post--in order to find out what processess are accessing a given device (in your case, your usb stick, /dev/sda1 or whatever), you could run fuser to find the name/pid of the process and kill it. dunno about firefox, i have no probs using mplayer plugin. but firefox i don't think should be accessing your sound device directly, it should be using a plugin. again, you can find out what's using your sound device with the fuser command.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unmount cd: device is busy jhimes Linux - Hardware 18 04-08-2008 01:51 AM
how can i force unmount a busy CD drive mailavj Linux - Software 1 04-04-2005 06:21 PM
USB flash unmount: device busy mkivihar Linux - Hardware 4 11-20-2004 10:32 AM
can't unmount my cdrom drive (says it's busy) fabs Linux - Hardware 2 02-23-2004 12:12 AM
"VFS:Busy inodes after unmount.Self-destruct in 5 seconds:have a nice day svyshna Linux - Networking 1 10-14-2003 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration