LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-08-2002, 03:59 AM   #1
Paul_assheton
Member
 
Registered: Nov 2000
Location: Ware (Nr London, England
Posts: 114

Rep: Reputation: 15
CD unmounting


Hi there,

This is probably a stupid question but I am having some trouble unmounting CD's on one of my computers.

The computer is running RedHat 7.1 and when I try to unmount a cd I get the "umount: /mnt/cdrom: device is busy" error. This is after I have killed the shell that I mounted and looked at the CD with. Fuser returns no processes using the filesystem and there is no X server running. The problem occurs everytime I try to use a CD on this particular computer.

Is there a way of umounting a file system even if it is being used? CD's are read only so there is no danger of loosing cashed write information.

Thanks

Paul
 
Old 04-08-2002, 04:07 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
it's *extremely* likely that somewhere in your system you are in the mounted directory, make sure you only have one single bash session running, and you are in your home directory and NOTHING is using the driver in any possible way. you could even drop down to single user mode (run "init 1") to make stupidly sure that you're not there at all.
 
Old 04-09-2002, 02:25 AM   #3
Paul_assheton
Member
 
Registered: Nov 2000
Location: Ware (Nr London, England
Posts: 114

Original Poster
Rep: Reputation: 15
I have checked and I can see no process running that is using the CD. If I insert a cd and mount it, look at it (ls /mnt/cdrom not moving dir), then attempt to unmount it, it refuses to unmount.

Are there any system level processes that are known for grabbing CD drivers? The problem is more irritating than anything because I have to reboot it to get the CD out.

Thanks

Paul
 
Old 04-09-2002, 03:02 AM   #4
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Try running lsof. This will list what files are open. See if any of them are accessing the cdrom.

From man page of lsof:

Quote:
An open file may be a regular file, a directory, a block special file, a character special file, an executing text reference, a library, a stream or a network file (Internet socket, NFS file or UNIX domain socket.)
 
Old 04-09-2002, 05:38 AM   #5
Paul_assheton
Member
 
Registered: Nov 2000
Location: Ware (Nr London, England
Posts: 114

Original Poster
Rep: Reputation: 15
Interesting command. Not one that I have run into before. Unfortunatly it produced no reference to the CD. I tried searching for mnt, cdrom and hdc (I tried hda, hdb and hdd too). Still the CD will not eject!

Thanks

Paul
 
Old 04-09-2002, 11:44 AM   #6
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 30
what fuser syntax are you using?

try "fuser -mk /mnt/cdrom".

also, please post your /etc/fstab.
 
Old 04-09-2002, 11:51 AM   #7
Thymox
Senior Member
 
Registered: Apr 2001
Location: Cornwall, England.
Distribution: Debian + Ubuntu
Posts: 4,345

Rep: Reputation: 56
I had a similar problem for a while. It was the supermount option being funny. It would automagically mount the CD when I put it in the drive, and yet would not tell me that it was already mounted when I try to 'mount /mnt/cdrom'. Because it was waiting for an eject command (as opposed to an umount command), it would not let me umount it. In the end I just got rid of supermounting...
 
Old 04-12-2002, 03:01 AM   #8
Paul_assheton
Member
 
Registered: Nov 2000
Location: Ware (Nr London, England
Posts: 114

Original Poster
Rep: Reputation: 15
Sorry for the delay in responding.

Yes I am using fuser -mk /mnt/cdrom to no effect.

Here is the fstab

LABEL=/ / ext2 defaults 1 1
/dev/hda3 /data1 ext2 defaults 1 2
/dev/sda1 /data3 ext2 defaults 1 2
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /proc proc defaults 0 0
none /dev/pts devpts gid=5,mode=620 0 0
/dev/hda2 swap swap defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/sdb1 /data2 ext2 defaults 1 2
/dev/hdb1 /data4 ext2 defaults 1 2


Sorry about the format. I dont know how to format tables in this forum system.

Thanks

Paul
 
Old 04-12-2002, 03:29 AM   #9
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
Try changing this line:

/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0

To this:

/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0

And make sure that /dev/cdrom points to the correct device. Do ls -l /dev/cdrom to see where it points.
 
Old 04-12-2002, 04:53 AM   #10
Manish
Member
 
Registered: Feb 2002
Distribution: Debian / Debian-based
Posts: 58

Rep: Reputation: 15
I think there is a "force" option with umount.
 
Old 04-12-2002, 07:25 AM   #11
Paul_assheton
Member
 
Registered: Nov 2000
Location: Ware (Nr London, England
Posts: 114

Original Poster
Rep: Reputation: 15
Thanks for the suggestions.

The force (-f) option in umount I have already tried and had no effect. It says in the man page that this is for non responding nfs mounts.

As to the changes to the /etc/fstab, the computer is an importent resource server so I will wait until Monday when it gets its scheduled weekly reboot to I try it!! I will let you know how it goes.

Thanks

Paul
 
Old 04-12-2002, 11:56 AM   #12
Sixpax
Member
 
Registered: Mar 2002
Distribution: Mandrake 8.1
Posts: 386

Rep: Reputation: 30
You can change /etc/fstab without rebooting.
 
Old 04-15-2002, 04:15 AM   #13
Paul_assheton
Member
 
Registered: Nov 2000
Location: Ware (Nr London, England
Posts: 114

Original Poster
Rep: Reputation: 15
I did change the fstab but the CD was still stuck in the drive and the changes made will not have any effect untill the drive is remounted.

I rebooted the computer this morning and got the damn disk out. I then tried the drive with the changes to fstab. So far so good. I could get the disk out again! Looks like the change to the fstab has helped.

Thanks for all the help

Paul
 
Old 04-15-2002, 01:40 PM   #14
kylo8787
Member
 
Registered: Jan 2002
Location: longview idaho
Distribution: slackware 8.1
Posts: 48

Rep: Reputation: 15
mount it with

mount -t iso9660 /dev/xxx /xxx

the xxx is are the device and where to mount it


to unmount it do a
mount /cdrom or whatever


also you cannot open the cdrom when the drive is mounted
 
Old 04-16-2002, 02:37 AM   #15
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
You're welcome.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem on unmounting ratmz Ubuntu 2 12-09-2005 02:08 PM
CD/DVD unmounting DaBlade Linux - Hardware 5 03-02-2005 02:35 PM
Trouble unmounting 70k51k Linux - Networking 4 08-09-2003 01:32 AM
Unmounting??? DiZASTiX Linux - Newbie 3 05-13-2003 09:04 PM
Unmounting the cd? mrobi Linux - General 3 02-16-2003 12:23 AM


All times are GMT -5. The time now is 04:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration