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
> 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" <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
> Then i use lsof -g:
Sorry, typo: lsof -p PID1[,PID2, ..., PIDn]
> 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...
man fuser
scott
what does your cdrom line say?
CL
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!
Useless use of cat. "grep cdrom /etc/fstab".
Sorry. Couldn't resist. :)
--
Mikko Koivunen
www.londi.org