LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-30-2005, 12:41 PM   #1
G!m!
LQ Newbie
 
Registered: Jun 2005
Distribution: FC3
Posts: 4

Rep: Reputation: 0
umounting a broken CD


Hi,

Problem:
I mount a CD, an I start copying it. If the CD is broken (scratched or whatever ), instead of trying to copy some seconds and then quiting with an error message, my system keeps on trying to read the CD. Therefore I can not unmount and eject the CD unless I restart the computer; I can not kill the process that tries to read the CD either..
This happened on all Red Hat flavors that I have used (now I use FC3). On Mandrake, things worked better from this point of view.

I there any possibility to configure how much time or how many times the system should retry reading the when it meets a I/O error ?

Thanks,
G!m!
 
Old 06-30-2005, 02:58 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
for that

try

fuser -k <where u drive is mounted>

or

fuser -k /dev/cdrom
whatever ur device name is

then try to unmount

regards
 
Old 06-30-2005, 05:34 PM   #3
grimse
Member
 
Registered: Oct 2004
Location: Oldenburg, Germany
Distribution: FC4
Posts: 42

Rep: Reputation: 15
hi.
maybe you should try the the 'eject' command.

greetings, grim
 
Old 07-01-2005, 12:48 AM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
eject won't allow u to unmount it forcefully
it wil report that the device is busy

so use fuser first then eject it

regards
 
Old 07-01-2005, 07:30 AM   #5
Simon_6162
Member
 
Registered: Jul 2004
Location: UK
Distribution: Fedora, Gentoo, Redhat Enterprise
Posts: 141

Rep: Reputation: 16
I normally use this: (as root)

umount -lf /dev/cdrom
eject /dev/cdrom

you may need to kill any processes that are using the device
 
Old 07-01-2005, 01:55 PM   #6
G!m!
LQ Newbie
 
Registered: Jun 2005
Distribution: FC3
Posts: 4

Original Poster
Rep: Reputation: 0
Hi again,
Thanks for your answers.
What I usually try in the described situation is:
lsof /dev/cdrom
I get the PIDs of all processes that use the device and then kill -9 PID
This is similar to your suggestions, but it does not work.
Even after the processes are killed, the umount is frozen, and the CD drive is spinning.
Nevertheless I will try your recommendation as well and give some feedback with the results.

Cheers,
G!m!
 
Old 07-01-2005, 02:01 PM   #7
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
well lsof then killing each PID is more tiresome then fuser
so i think fuser will surely help u

regards
 
Old 07-04-2005, 12:43 AM   #8
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
umount -l /dev/whatever always gets them unmounted. Read the man umount
 
  


Reply



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
umounting NFS jonfa Linux - Networking 9 12-14-2007 03:01 PM
Mounting/umounting TomalakBORG Linux - General 7 05-12-2005 09:30 AM
umounting smbfs ping_wing Linux - General 6 04-25-2005 12:35 PM
umounting during a game install Ryan450 Linux - General 3 04-11-2005 12:08 AM
umounting NFS Syncrm Linux - General 4 10-11-2002 07:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:52 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