LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   Failed to unmount /cache and /system, 16: Device or resource busy (https://www.linuxquestions.org/questions/linux-mobile-81/failed-to-unmount-cache-and-system-16-device-or-resource-busy-4175537196/)

contactteja 03-18-2015 10:39 PM

Failed to unmount /cache and /system, 16: Device or resource busy
 
Hi,

In my code, I have resized my cache and system partiotions.
After sucessful repartiotion, Before rebooting the device was trying to unmount /cache and /system partiotions.

But I was getting this below error.
Failed to unmount /cache and /system, 16: Device or resource busy

Can any one help this issue please ?

Thanks,
Teja

sag47 03-19-2015 07:47 AM

Use lsof to determine if any applications have open files on that device.

Code:

lsof | grep '/path'
Shut those applications down if you find any (gracefully if possible).

Also, ensure that your shell working directory is not on the device you want to umount.

Are those directories you originally mounted? What OS and platform?

contactteja 03-19-2015 09:28 PM

Thanks for the reply.
I am working on android platform.


I have used this command "adb shell lsof | grep system", I could see there are couple of files related to security libraries files and shared libs files are running on
on system partition. But I am not getting what to close, (I couldnt see any of my process which are running on system partition)

Thanks,
Teja

sag47 03-22-2015 08:48 PM

Use lsof | head -n1 to see the top of the lsof command. It shows all of the fields in the lsof output. You want to refer to PID and not which field it is. Then use your original lsof command and look at what PIDs have open file handles on the partition. You can use other tools like ps to find more information about the PID.

E.g.

Code:

ps aux | grep somePID
From there you can decide how to handle the process. Either by gracefully shutting it down or by using the kill command.


All times are GMT -5. The time now is 03:16 PM.