maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   Cannot "Umount /media/mmc2" - Device busy (https://talk.maemo.org/showthread.php?t=27446)

icke 2009-03-11 19:15

Cannot "Umount /media/mmc2" - Device busy
 
I encountered problems to connect my n810 to a PC via USB. While the external memory card is connected successfully, the internal card cannot be accessed via the PC (running a Ubuntu system). When I try to unmount the card the following statement is displayed:
umount: cannot umount /media/mmc2: Device or resource busy
Searching the forums I found only a reference in the German n800.de forum. Yet, the proposed workaround (to connect directly w/o intermediate usb-hub) does not work for me. Up until now, the only solution I have found is to reboot the system. Which is feasible yet not very convinient.

Maybe somebody knows a way how to calm down the memory card - preferable w/o killing all processes by hand?

icke

fatalsaint 2009-03-11 19:27

Re: Cannot "Umount /media/mmc2" - Device busy
 
You need to make sure NOTHING is accessing the card.. and I do mean nothing.

If even a terminal is open and you are just "cd"'d into the media card.. it's considered busy. Or if your terminal is open as "user" who is in /media/mmc2, and you sudo su - to "root", and you cd out of the directory as root, and try to umount it.. "user" is still in the directory even though the active terminal is not. So you must first exit "root", change directories in "user", then go back to root and umount.

Or if a media application is running and even is aware there might be, possibly, a music file on your media card.. it could also be busy.

Or if you are booted into the media card with a cloned OS.. it's obviously busy..

If you are absolutely sure NOTHING you care about is currently accessing that device.. you CAN force linux to do as you wish by issuing:

umount -l /media/mmc2

Which is a "lazy" unmount.. it doesn't check anything and *can* cause some filesystem corruptions if done in the middle of read/write operations and things of that nature. It's typically a bad, evil, command that should only be used.. well, never :D. But I still find use for it sometimes.

lm2 2009-03-11 19:55

Re: Cannot "Umount /media/mmc2" - Device busy
 
Relatedly, I have used console tools to establish a swap partition on mmc1. But sometimes I want to take out mmc1 to use it with a card reader on the PC. How can I do this safely without throwing the tablet into a tailspin and having to force a reboot?

Thanks.

Bundyo 2009-03-11 19:57

Re: Cannot "Umount /media/mmc2" - Device busy
 
swapoff [filename]

icke 2009-03-11 19:58

Re: Cannot "Umount /media/mmc2" - Device busy
 
Thank you very much for the quick reply. Meanwhile I had to reboot the system as I encountered another issue (with the external card). Unfortunately, I could not solve it.

So my next steps will be to use the search function and maybe to open the next thread.

Again, thank you very much for your help.
Yours,
icke

fnordianslip 2009-03-11 20:08

Re: Cannot "Umount /media/mmc2" - Device busy
 
You could try typing

Code:

sudo  lsof | grep /media/mmc2
to find out what process has open files on it. Prefixing the invocation with sudo i think digs out processes with root privileges which otherwise wouldn't be shown. I assume lsof is there by default, I'm not sure.

In my case, the results I get (for mmc1) are like this:

Code:

panucci  3240      user  13r  REG      254,9 6286422  2552 /media/mmc1/gpodder/Hacker Public Radio/hpr0306.mp3
fnord

lm2 2009-03-11 20:18

Re: Cannot "Umount /media/mmc2" - Device busy
 
Bundyo, how do I determine the name of the swap file? I just assumed it was "swap"?!

fatalsaint 2009-03-11 20:26

Re: Cannot "Umount /media/mmc2" - Device busy
 
It's going to be the partition you created for it.. IE:

swapoff /dev/mmcblk1p2

lm2 2009-03-11 20:33

Re: Cannot "Umount /media/mmc2" - Device busy
 
cool, thanks. And then "swapon ..." to turn it back on?

icke 2009-03-11 20:33

Re: Cannot "Umount /media/mmc2" - Device busy
 
o_O I have a swap partition, too ...

Curious,
icke


All times are GMT. The time now is 15:40.

vBulletin® Version 3.8.8