Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unable to unmount a CD-ROM

0 views
Skip to first unread message

Muzzy

unread,
Aug 23, 2003, 3:35:49 PM8/23/03
to
HI,
Probably a simple question for a professional, but a confising one for a
newbie like me :)

I dont have a problem mounting a CD-ROM :
mount -t iso9660 /dev/cdrom /cdrom

But, when i try to unmount the cdrom, or eject it, i get an error
messaege, 'device is busy'...

I am not in one of the cdrom's directories when i try to unmount the
device, basicly i type:

cd /
eject /cdrom

Is there a way to check what process prevents cdrom from unmounting?
It happens constantly, even if i just mount it and unmount right away...
I dont' use any automount features...

Any ideas would be highly appreciated!

Thank you in advance,
Andrey

ynotssor

unread,
Aug 23, 2003, 3:41:24 PM8/23/03
to
"Muzzy" <leya...@yahoo.com> wrote in message
news:pmP1b.177929$cF.60751@rwcrnsc53

> I dont have a problem mounting a CD-ROM :
> mount -t iso9660 /dev/cdrom /cdrom
>
> But, when i try to unmount the cdrom, or eject it, i get an error
> messaege, 'device is busy'...

[...]


> Is there a way to check what process prevents cdrom from unmounting?
> It happens constantly, even if i just mount it and unmount right
> away... I dont' use any automount features...

Check to see what pid is using the filesystem:

ls -l /proc/[0-9]*/cwd | grep cdrom

Then use lsof -g pid# to see the actual process involved. lsof won't show a
shell's pid if a user is in that directory, but the ownership of the
symbolic link returned by the above command will decide which particular
user is involved, and can be the starting point for the next step in your
investigation.


tony


--
use hotmail com for any email replies

-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Muzzy

unread,
Aug 23, 2003, 4:25:19 PM8/23/03
to
ynotssor wrote:

> "Muzzy" <leya...@yahoo.com> wrote in message
> news:pmP1b.177929$cF.60751@rwcrnsc53
>
>
>>I dont have a problem mounting a CD-ROM :
>>mount -t iso9660 /dev/cdrom /cdrom
>>
>>But, when i try to unmount the cdrom, or eject it, i get an error
>>messaege, 'device is busy'...
>
> [...]
>
>>Is there a way to check what process prevents cdrom from unmounting?
>>It happens constantly, even if i just mount it and unmount right
>>away... I dont' use any automount features...
>
>
> Check to see what pid is using the filesystem:
>
> ls -l /proc/[0-9]*/cwd | grep cdrom


It gave me 3 lines:

lrwxrwxrwx 1 root root 0 Aug 23 15:58 /proc/918/cwd -> /cdrom/mysql_inst
lrwxrwxrwx 1 root root 0 Aug 23 15:58 /proc/995/cwd -> /cdrom/samba_inst
lrwxrwxrwx 1 root root 0 Aug 23 15:58 /proc/997/cwd -> /cdrom/samba_inst

> Then use lsof -g pid# to see the actual process involved. lsof won't show a
> shell's pid if a user is in that directory, but the ownership of the
> symbolic link returned by the above command will decide which particular
> user is involved, and can be the starting point for the next step in your
> investigation.

Then i use lsof -g:

lsof -g 918 [Enter] - it gave me empty line
lsof -g 995 [Enter] - it gave me about 50 lines:

COMMAND PID PGID USER FD TYPE DEVICE SIZE NODE NAME
nmbd 995 995 root cwd DIR 22,0 2048 314861752
/cdrom/samba-inst

nmbd 995 995 root rtd DIR 3,2 4096 2 /

etc.

I have no idea what is that - i didn't get that far with linux yet :)


Any ideas?

Thank you,
Andrey

ynotssor

unread,
Aug 23, 2003, 4:32:13 PM8/23/03
to
"Muzzy" <leya...@yahoo.com> wrote in message
news:P4Q1b.82127$2x.2...@rwcrnsc52.ops.asp.att.net

> Then i use lsof -g:

Sorry, typo: lsof -p PID1[,PID2, ..., PIDn]

Muzzy

unread,
Aug 23, 2003, 5:04:18 PM8/23/03
to
Muzzy wrote:

> ynotssor wrote:
>
>> "Muzzy" <leya...@yahoo.com> wrote in message
>> news:pmP1b.177929$cF.60751@rwcrnsc53
>>
>>
>>> I dont have a problem mounting a CD-ROM :
>>> mount -t iso9660 /dev/cdrom /cdrom
>>>
>>> But, when i try to unmount the cdrom, or eject it, i get an error
>>> messaege, 'device is busy'...
>>
>>
>> [...]
>>
>>> Is there a way to check what process prevents cdrom from unmounting?
>>> It happens constantly, even if i just mount it and unmount right
>>> away... I dont' use any automount features...
>>
>>
>>
>> Check to see what pid is using the filesystem:
>>
>> ls -l /proc/[0-9]*/cwd | grep cdrom
>
>
>
> It gave me 3 lines:
>
> lrwxrwxrwx 1 root root 0 Aug 23 15:58 /proc/918/cwd -> /cdrom/mysql_inst
> lrwxrwxrwx 1 root root 0 Aug 23 15:58 /proc/995/cwd -> /cdrom/samba_inst
> lrwxrwxrwx 1 root root 0 Aug 23 15:58 /proc/997/cwd -> /cdrom/samba_inst

I actually killed the processes, but it really didn't help...

Scott Lurndal

unread,
Aug 23, 2003, 9:25:36 PM8/23/03
to

man fuser

scott

CL [dnoyeB] Gilbert

unread,
Aug 23, 2003, 9:49:09 PM8/23/03
to
cat /etc/fstab | grep cdrom

what does your cdrom line say?

CL

Muzzy

unread,
Aug 25, 2003, 1:49:39 AM8/25/03
to


U got it Scott! That's what i was looking for: fuser!
I have seen that before, but couldn't recall the util... i remember it started
from 'f'.. :)

Thanks a lot!

Mikko Koivunen

unread,
Aug 25, 2003, 5:09:57 AM8/25/03
to
In article <pan.2003.08.24....@Fakeness.xyz>, CL [dnoyeB]
Gilbert wrote:
> cat /etc/fstab | grep cdrom
> what does your cdrom line say?

Useless use of cat. "grep cdrom /etc/fstab".

Sorry. Couldn't resist. :)


--
Mikko Koivunen
www.londi.org

0 new messages