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 07-03-2004, 11:14 PM   #1
jhimes
Member
 
Registered: Mar 2004
Posts: 35

Rep: Reputation: 15
Unmount cd: device is busy


Frequently when I mount a cd - generally a data cd - I can't unmount it. Instead I get a message "device is busy." I cannot identify what process supposedlly is using the cd and thus creating this condition.

What is the command to figure out what the obstructing process is. I want to find that out so that I can kill it.

Issuing the command umount /mnt/cdrom is useless. I get the "device is busy" response.
 
Old 07-03-2004, 11:20 PM   #2
frelihm
Member
 
Registered: Jan 2003
Location: Ljubljana, Slovenia, Europe
Distribution: debian
Posts: 72

Rep: Reputation: 15
are you unmounting from /mnd/cdrom directory?
 
Old 07-03-2004, 11:45 PM   #3
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
just make sure, u shouldn't be in same path or location. check below.

[root@mail cdrom]#

if it then just type :

[root@mail cdrom]# cd / [enter] [to go / directory]

Now type :

[root@mail /]# umount /mnt/cdrom or eject [enter] [eject command will auto umount the device and eject the CD from CD-ROM]

Also, you can reinsert cd-rom case without pressing button on CD-ROM. but u should be on following path:

[root@mail /]#

Now type :

[root@mail /]# eject -t

Hope this helps.

-Hitesh
 
Old 07-03-2004, 11:52 PM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
you need to "cd" back to / before you can umount /dev/cdrom
 
Old 07-04-2004, 10:12 PM   #5
jhimes
Member
 
Registered: Mar 2004
Posts: 35

Original Poster
Rep: Reputation: 15
unmount: device is busy

Neither umount nor eject works.

I log in as root, and cd /
Type: umount /mnt/cdrom

Response: umount: /mnt/cdrom: device is busy

That's the same response that I get using the graphic interface, which gives my the unmount box.

Same approach with eject
Type: eject

Response: eject: unmount of '/dev/cdrom' failed.

So, I'm nowhere. All I can do is shut down, and reboot.

Anyone got another idea?
 
Old 07-04-2004, 10:31 PM   #6
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
there is a program called lsof that can tell you which program is using the cd , all u have to do it type :

lsof /mnt/cdrom

then find which program is using the cdrom to make it busy then kill it
 
Old 07-04-2004, 11:13 PM   #7
sh1ft
Member
 
Registered: Feb 2004
Location: Ottawa, Ontario, Can
Distribution: Slackware, ubuntu
Posts: 391

Rep: Reputation: 31
Are you using supermount or any other transparent mounting device? Not too familar with these but seems like it could cause that.
 
Old 07-04-2004, 11:56 PM   #8
jhimes
Member
 
Registered: Mar 2004
Posts: 35

Original Poster
Rep: Reputation: 15
1. I log in as root and cd /.

Type lsof /mnt/cdrom

Response: bash lsof: command not found

So that does not get me anywhere.

2. i do not know what a "supermount" or "other transparent mounting device" is?
 
Old 07-05-2004, 04:16 AM   #9
mike_sh
LQ Newbie
 
Registered: Jul 2004
Location: Europe/Latvia
Distribution: Ubuntu
Posts: 5

Rep: Reputation: 0
You have to be root to have lsof working!
 
Old 07-05-2004, 12:22 PM   #10
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
and if u dont have it u could install it
 
Old 07-05-2004, 03:06 PM   #11
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 85
To summarize, you will not be able to unmount the CD if there are any apps, sessions, or processes open that are accessing it. As an example, if you have a terminal session open, and are in the /mnt/cdrom directory, you will *not* be able to unmount the CD from where you are. Why? Because your terminal session is actively using /mnt/cdrom, and umount cannot unmount a device that is currently in use. Similarly, if you are using an audio app such as XMMS that is playing a CD, you won't be able to unmount it, for the same reason.

As others have suggested, move to a different directory, close out any apps, processes, or sessions that are accessing the CD, then do the umount. That ought to take care of it. -- J.W.
 
Old 07-05-2004, 08:06 PM   #12
jhimes
Member
 
Registered: Mar 2004
Posts: 35

Original Poster
Rep: Reputation: 15
Thus far, nothing has worked. I tested the problem again. Here's what I did:

1. Mount the data CD - one that I've burned a couple hard drive files to. It mounts. It even unmounts fine if I don't open any file on it.

2. I opened one of the files on the CD. It's an Open Office text document, so OO launches to open the document. I close the document, and exit OO. If OO is continuing to access the CD, how can I tell that? The Panel certainly does not show OO running. If I go to System Tools>Monitor, and look at the processes, I can't see anything identified as OO that is running.

3. But now, having opened the text document using OO, I can no long umount. Whether I use the graphic interface or the command line, the response is the same: "device is busy." I get this response using the command line after I log in to a terminal (or the console) as root, and cd to /. It seems to me that OO is still running, and that I need to shut it down. How can I determine whether or not that is so?

4. I've tried the lsof /mnt/cdrom command as root after cd /. The response is bash lsof: command not found. I see above that I have to be root to run this. Does that mean that I have to log into the session as root. That I've not done. I've logged into the session as a user. However, I've logged into both the console and a terminal in that session and then su to access the shell as root. Is that good enough.
 
Old 07-05-2004, 08:19 PM   #13
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
no it seams that u dont have lsof installed

install it from the cds of ur distro or download it
 
Old 07-05-2004, 08:23 PM   #14
jhimes
Member
 
Registered: Mar 2004
Posts: 35

Original Poster
Rep: Reputation: 15
What's lsof called if I want to install it?
 
Old 07-05-2004, 08:29 PM   #15
jhimes
Member
 
Registered: Mar 2004
Posts: 35

Original Poster
Rep: Reputation: 15
Worse: I just checked apt. I show lsof to be installed and up to date!

So why can't I use it. Is there some special location where I have to be. I certainly am not in /mnt/cdrom when I try.
 
  


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
Device busy, cannot unmount trebek Linux - Hardware 19 10-17-2008 04:58 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 11:43 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