First a confession. This is about Android but it is using a Linux kernel so I hope this is not entirely off topic.
I have an application on my phone which allows me to clear the 'cache' partition although I had never used that until recently. After using it to clear the cache partition that particular partition will no longer mount. It doesn't appear in the 'mount' list although there are no sign signs of an error.
The only noticeable difference is that I can't download or update any applications because the download process uses the 'cache' partition and it's not mounted. Other than that the phone works normally.
I can get round that by deleting the '/cache' mount point and creating a soft link to another point in the filing system which is then linked to '/ cache' but it's all reset again every time the phone starts.
I've tried manually mounting the 'cache' partition using 'mount -o rw - t ext3 /dev/block/mmcblk0p2 /cache' but that gives me 'Invalid argument'. It can't be a command line argument because there seems to nothing wrong there. I've tried numerous variations of that command with the same error message.
e2fsck on the partition says it's clean.
I made a nandroid backup many months ago long before this happened and have tried restoring the 'cache' partition only from that but the problem remains. I've deduced from that that it cannot be a problem with the partition itself.
So, can anyone suggest reasons why a partition would refuse to mount?
On 18/06/13 16:59, Barry Samuels wrote:
I have an application on my phone which allows me to clear the 'cache' partition although I had never used that until recently. After using it to clear the cache partition that particular partition will no longer mount. It doesn't appear in the 'mount' list although there are no sign signs of an error.
The only noticeable difference is that I can't download or update any applications because the download process uses the 'cache' partition and it's not mounted. Other than that the phone works normally.
I can get round that by deleting the '/cache' mount point and creating a soft link to another point in the filing system which is then linked to '/ cache' but it's all reset again every time the phone starts.
I've tried manually mounting the 'cache' partition using 'mount -o rw - t ext3 /dev/block/mmcblk0p2 /cache' but that gives me 'Invalid argument'. It can't be a command line argument because there seems to nothing wrong there. I've tried numerous variations of that command with the same error message.
e2fsck on the partition says it's clean.
I made a nandroid backup many months ago long before this happened and have tried restoring the 'cache' partition only from that but the problem remains. I've deduced from that that it cannot be a problem with the partition itself.
So, can anyone suggest reasons why a partition would refuse to mount?
It's a bit of a longshot and probably unrelated, but I work on an Android keyboard with a few million installs and we occasionally had reports from some users who couldn't update files in some of our application storage folders.
Often, the user just deleting the entire folder in their SD card fixed the issue, but other time this didn't work. It appeared to be that occasionally a file or directory would become corrupted in such a way so that it became read-only and wouldn't delete correctly. The work-around we came up with was to re-name (not delete) the corrupt file and then create a new file with the correct name. However, because it was hard to properly reproduce the issue (as it seemed to be some weirdness in how Android was handling such cases), there's no real way of knowing whether that actually fixed anything, other than I don't recall any similar reports of this happening since!
In your case, perhaps it's trying to mount a rw filesystem on a corrupted ro inode or something and obviously failing. OK. it's odd that it would consistently choose the same corrupted inode when you re-create /cache as that's not how Flash is supposed to work, but then Android's just like that sometimes.
Simon
On 18/06/13 22:58:55, Simon Ransome wrote:
On 18/06/13 16:59, Barry Samuels wrote:
I have an application on my phone which allows me to clear the 'cache' partition although I had never used that until recently. After using it to clear the cache partition that particular partition will no longer mount. It doesn't appear in the 'mount' list although there are no sign signs of an error.
The only noticeable difference is that I can't download or update any applications because the download process uses the 'cache' partition and it's not mounted. Other than that the phone works normally.
I can get round that by deleting the '/cache' mount point and creating a soft link to another point in the filing system which is then linked to '/cache' but it's all reset again every time the phone starts.
I've tried manually mounting the 'cache' partition using 'mount -o rw -t ext3 /dev/block/mmcblk0p2 /cache' but that gives me 'Invalid argument'. It can't be a command line argument because there seems to nothing wrong there. I've tried numerous variations of that command with the same error message.
e2fsck on the partition says it's clean.
I made a nandroid backup many months ago long before this happened and have tried restoring the 'cache' partition only from that but the problem remains. I've deduced from that that it cannot be a problem with the partition itself.
So, can anyone suggest reasons why a partition would refuse to mount?
It's a bit of a longshot and probably unrelated, but I work on an Android keyboard with a few million installs and we occasionally had reports from some users who couldn't update files in some of our application storage folders.
Often, the user just deleting the entire folder in their SD card fixed the issue, but other time this didn't work. It appeared to be that occasionally a file or directory would become corrupted in such a way so that it became read-only and wouldn't delete correctly. The work-around we came up with was to re-name (not delete) the corrupt file and then create a new file with the correct name. However, because it was hard to properly reproduce the issue (as it seemed to be some weirdness in how Android was handling such cases), there's no real way of knowing whether that actually fixed anything, other than I don't recall any similar reports of this happening since!
In your case, perhaps it's trying to mount a rw filesystem on a corrupted ro inode or something and obviously failing. OK. it's odd that it would consistently choose the same corrupted inode when you re-create /cache as that's not how Flash is supposed to work, but then Android's just like that sometimes.
Simon
Thanks for your input Simon. It did prompt me to try a few things.
I renamed the current /cache directory to /cache0 and rebooted the phone. When it was running again I could see that the /cache directory had been recreated and the /cache0 directory had disappeared.
I tried again by renaming the /cache directory to something totally different i.e. 'bongo' and recreated a new /cache directory then rebooted the phone. When the phone was up and running the 'bongo' directory had diappeared. I don't know whether the /cache directory was the one I created or a new one created on startup.
It does appear that any directory in the root of the filing system which shouldn't be there is e-x-t-e-r-m-i-n-a-t-e-d on startup.
None of this cured my problem but it's interesting nontheless.
Barry Samuels http://www.beenthere-donethat.org.uk The Unofficial Guide to Great Britain