Page 1 of 1

Media Device Busy

Posted: Sun Jan 27, 2013 1:11 pm
by kenellis
I have added an external hard drive to my setup. This is addressed as /media/HD-PCU2. I am not sure how but I have also got a /media/HD-PCU2_ directory. When I try to remove it using : sudo rmdir HD-PCU2_ I get a message "failed to remove 'media/HD-PCU2_': Device or resource busy". Since I'm at the command prompt and nothing else is going on, I am perplexed.

Re: Media Device Busy

Posted: Sun Jan 27, 2013 2:10 pm
by stevepdp
Is it possible that a partition is mounted at that directory?

If you try "df -h", you'll see the active mount points and corresponding device names.

From there, you can try unmounting the drive with a command like:

Code: Select all

sudo umount /media/HD-PCU2_
Also, just to be certain, make sure that your current working directory is not within the mount point, you can check this either by looking at your prompt or running:

Code: Select all


Re: Media Device Busy

Posted: Sun Jan 27, 2013 2:59 pm
by kenellis
Thanks Steve. I tried your suggestions and I didn't get anywhere, but in the event this was not suprising. I decided to try the rmdir again, and it worked! So the reboot obviously cleared whatever was causing the problem. I should, of course have tried a reboot, before asking for help. I shall do so in future.

Ken Ellis