Filesystem on sdcard getting corrupt

#1

Hi,

I have a 32GB class 10 PNY fat32 formatted sdcard in my campan.

After two weeks of local recording with “record on events” setting, i tried to backup few of the videos. Before removing the sdcard from the camera, i was able to playback using the wyze app just fine of a weeks worth of video.

When i mounted the sdcard on my ubuntu m/c following were the content:

total 100
drwxr-xr-x   6 user user 32768 Jan  1  1970 .
drwxr-x---+  3 root   root    4096 Jan 20 13:55 ..
drwxr-xr-x   4 user user 16384 Jan 20 02:19 alarm
drwxr-xr-x   2 user user 16384 Jan 20 12:21 log
drwxr-xr-x   2 user user 16384 Oct 10  2016 time_lapse
drwxr-xr-x  10 user user 16384 Jan 20 00:30         . 

the main folder is listed last,which I am able to browser using the file explorer . though few of the folders, ended up with i/o error and could not be browsed.

After saving on pc, i inserted back the sdcard to camera, and the camera could not see any of the videos! strange. Also, it didnt record any videos on the sdcard now.

I guess the issue is invalid file structure that could be seen above.

Next what i did was create a sdcard dump using ddrescue. On mounting the resulting image, the content of the image dump is as follows:

drwxr-xr-x 10 root root 16384 Jan 20 00:30 ''$'\240\240\240\240\240\240\240\240''.'$'\240\240\240'
drwxr-xr-x  4 root root 16384 Jan 20 02:19  alarm
drwxr-xr-x  2 root root 16384 Jan 20 12:21  log
drwxr-xr-x  2 root root 16384 Oct 10  2016  time_lapse

I am giving this information for help debugging what went wrong on the sdcard, and at what point.
I have seen this issue before, and this time just tried to dump the sdcard before formatting it again.

Does anyone know the reason of such a corruption of the filesystem? And anyone else faced such issues?

One thought comes to my mind is that, for the cause of removing the sdcard, i just pulled the plug on the camera. In future i would pull the plug only after powering it off / or rebooting it.

BTW, what is the method to safely unmount the sdcard on the cam?

#2

This was discussed in another thread. There is no official procedure yet, but iirc someone is working on one. What I have been doing is turning off the camera in the app, after the camera is showing the off state in the app and the blue light on the back of the camera turns off, I then pull the power before removing the card.

I suspect since you were able to view the Playback fine until you removed the card, it may have been damaged when you removed it. Doesn’t FAT32 have a backup of the file allocation table? Seems I remember that from years ago.

Edit to add:


From the previous thread

2 Likes
Removal procedure for microSD card
Can timelapse videos be downloaded from memory card?