Jump to content
Compatible Support Forums
Sign in to follow this  
bloody

eject failed :O

Recommended Posts

I've been having yet another feud with linux over my disk drives, a nd it has finally managed to get on my nerves. It seems Linux has a grudge against me, and doesn't want to eject cds, that, or something must be wrong(Oh my!) Whether I try to eject using KDE, a terminal of some sort, or whatever, it simply won't let me do it, it tells me that the umount has failed because the device is busy.....and it's not, the device isn't busy at all! How annoying...

Share this post


Link to post

open up a terminal and enter

 

fuser -c /mnt/point/of/device

 

That will tell you what process is locking that baby up.

 

then type

 

kill pid# and if that doesn't work kill -9 pid#

 

then try to eject

 

that mount point info can be obtained with

 

df -h

 

Share this post


Link to post

Mr.iamroot, not even the godly powers of root would free my disks from their prisons, sad ne?

 

Okay, thank you danleff, that was much easier than logging out just to take out a disk I must say. I still though, have no idea why famd was using the drives, then again, I really have no idea what famd is in the first place. After killing famd it seems konqueror was still using the drives as well, strange. Have any ideas on a permanent fix for this?

Share this post


Link to post

Did Danleff reply to this thread or are you refering to me? anyway famd is the file allocation manager daemon. It is the daemon that scans your filesystems looking for changes and such.

Share this post


Link to post

Originally posted by bloody:

Quote:
Mr.iamroot, not even the godly powers of root would free my disks from their prisons, sad ne?

 

Okay, thank you danleff, that was much easier than logging out just to take out a disk I must say. I still though, have no idea why famd was using the drives, then again, I really have no idea what famd is in the first place. After killing famd it seems konqueror was still using the drives as well, strange. Have any ideas on a permanent fix for this?

 

I used to run into the same thing with RH 9 and FC1. I don't seem to notice it as much under FC2 and 3 nor in SuSE or Slackware.

 

When I did have the problem, often I could eject the cd just by closing the existing terminal and opening a new one, becoming root and...

 

Code:
umount /mnt/cdrom

Code:
eject /mnt/cdrom

 

When that wouldn't work, I did exactly what

egorgry recommended. Good luck! smile

Share this post


Link to post

Originally posted by egorgry:

Quote:
Did Danleff reply to this thread or are you refering to me? anyway famd is the file allocation manager daemon. It is the daemon that scans your filesystems looking for changes and such.

 

Sorry about that, I was kinda reading a couple posts at once, and mixed myself up, so yeah, I meant you... Crap, that's embarrassing, I really need more caffeine around here.

 

Dapper Dan: That's more or less exactly what I was doing, just I wasn't having near as much luck, so I'm pretty much stuck using egorgry's method, which seems to be working pretty consistently.

Share this post


Link to post

hehe. No problem I just thought I was crazy I didn't see danleff's post so I thought I was missing something because he always has good advise and insight to problems he also explains things much better then me.

 

you could write yourself a little unmount/eject script if your comfortable with that or I can guide you in writting one. I'd look to see if your distro has any updates too.

Share this post


Link to post

Erm, I'm not sure, I'm using a fairly up-to-date Debian Sarge... snapshot from sometime in early May, but I've updated a reasonable bit of it since then, not all of it because I'm forced into using dialup, if you know what I mean. It couldn't be the kernel version could it? I do recall that it's using the 2.4 kernel instead of 2.6, if that could do it. Hmm, the idea of that shell script sounds like an intriguing idea, I think I just might have to try that out.

 

[an hour or so later]

 

Ah,yes,k a little help in writing one may come of use... Any good ideas on getting the script to execute something (more specifically - fuser) as root in the script? So far what I have is

#!/bin/bash

 

clear screen

 

echo

echo "Attempting to kill all processes using the Drive..."

echo

 

fuser -kvi /media/cdrom0

 

echo

echo "Attempting to unmount and eject cdrom device 0..."

echo

 

#umount /media/cdrom0

eject /media/cdrom0

 

echo; echo

It probably should work if I find myself a way to do that one line as root, though, half the time it gives me an error when I go to the eject(when doing it in terminal as root), something about an invalid argument...

eject: unable to eject, last error: Invalid argument

Then I run the same script from out of terminal, as myself, afterwards and it ejects it... crazyness, I need help indeed, though, this was an excellent excuse to [attempt to] write my first shell script. laugh

 

Whoa, d***.... 9:30 already, time flies... well, off to bed, need to be up at 3:30.

Share this post


Link to post

I totally missed this somehow, sorry.

 

you can run the script as root from your env by setting the set uid root, invoke chmod +s scriptname, after that you'll see something like -rwsr-xr-x or you can use sudo to run the line as root. If you're using gnome you can put the script in your nautilus scripts folder and it will be accessible via righ click > scripts. I'm bad at explaing stuff so if you need further elaboration just ask.

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×