Main Site Documentation

USB drive corruption


#1

I am not sure how to handel this one.

I am using the EMX for a data logger, which runs unattended in the field
If there is a corruption on the USB drive.
And I do a directory delete. The board hangs.
And it happens every time.
If I take and put the flash drive on a system that is running Windows Ce or my PC. I am able to delete the directory.


#2

When the system hangs, remove the drive and let us know if it unhang the system

Also, are you sure it us not an exception that is causing your app to exit?


#3

First, it may better to track how the corruption is happening. Are you using latest SDK?
You can do a format instead to deleting everything…


#4

I am only deleteing 1 directory on the drive because a file is corrupted in it.

The file was corrupted because the power failed during the write previously


#5

The file system depend on itself being in a healthy structure. If this structure got corrupted, like you said, I understand if it crashed.
The solution is to make sure files are closed gracefully…


#6

That is true; but there is a posiblity the file would become corrupted in the field; Just thought of recovering without formating the drive. Because the directory is erasable from a Windows CE box or a PC.


#7

Is this link anyway related to this issue
http://netmf.codeplex.com/workitem/384

We still see file corruption sometimes


#8

This is already fixed on 4.1.5.0

Are you closing the files before unplugging power? If you can make a program to reproduce the issue, please provide it.