kenellis
Posts: 7
Joined: Thu Jan 17, 2013 5:50 pm

Media Device Busy

Sun Jan 27, 2013 1:11 pm

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.

User avatar
stevepdp
Posts: 285
Joined: Fri Oct 28, 2011 7:41 am

Re: Media Device Busy

Sun Jan 27, 2013 2:10 pm

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

pwd

kenellis
Posts: 7
Joined: Thu Jan 17, 2013 5:50 pm

Re: Media Device Busy

Sun Jan 27, 2013 2:59 pm

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

Return to “Beginners”