LinuxQuestions.org
Visit Jeremy's Blog.
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 12-13-2007, 10:55 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Unable to Eject a DVDROM


I am unable to eject a DVD from machine as it indicates it is in use by another program but I have no programs that I can see using it nor do I have that mount point open.

How can I force the umounting of my cdrom?

Code:
cwilliams:~# umount /media/cdrom
umount: /media/cdrom0: device is busy
umount: /media/cdrom0: device is busy
cwilliams:~# mount
/dev/md0 on / type ext3 (rw,errors=remount-ro)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sda2 on /boot type ext3 (rw)
/dev/sdb2 on /tmp type ext3 (rw)
/dev/sdc1 on /media/disk type ext3 (rw,nosuid,nodev,uhelper=hal)
/dev/sdd1 on /media/disk-1 type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=1000)
/dev/scd0 on /media/cdrom0 type udf (ro,noexec,nosuid,nodev,user=cwilliams)
 
Old 12-13-2007, 11:26 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Does this show anything:

Code:
sudo lsof | grep /media/cdrom0
 
Old 12-13-2007, 11:30 AM   #3
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Quote:
Originally Posted by MS3FGX View Post
Does this show anything:

Code:
sudo lsof | grep /media/cdrom0
Ah,

Code:
cwilliams@cwilliams:~$ sudo lsof | grep /media/cdrom0
Password:
smbd      21546        root  cwd       DIR       11,0      136        265 /media/cdrom0
One of SMB shares is my CDROM. Can I simply kill this PID and then try?

kill -9 21546?
 
Old 12-13-2007, 11:42 AM   #4
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,575

Rep: Reputation: 220Reputation: 220Reputation: 220
Yes, that should do it. You can accomplish the same thing with the fuser command:

# fuser -vm /dev/scd0

lists all processes accessing the device and:

# fuser -km /dev/scd0

kills all processes accessing the device. Note, fuser will only work on the device file, not the mopunt point.
 
Old 12-13-2007, 02:43 PM   #5
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Thanks for all your help!
 
  


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
"unable to eject" error when trying to safely remove ipod shuffle in slack 12 mattydee Slackware 10 07-06-2007 06:03 PM
Unable to mount/eject. diablo_ Slackware 16 02-04-2007 03:58 AM
Unmount and Eject with CD-Rom Eject Button? CrownAmbassador Linux - Hardware 3 12-26-2006 09:45 PM
Unable to use my dvdrom drive! final60 Linux - Hardware 12 04-20-2006 08:15 PM
VCD does not eject even eject button pressed ic_torres Linux - Software 4 12-01-2005 06:40 PM

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

All times are GMT -5. The time now is 01:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration