Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

USB corruption for dashcam recording

This site may earn commission on affiliate links.
Here's how I solved this.
First an overview: The issue is because the car cuts power to the flash drive before the drive had a chance to gracefully close the last write operation. Therefore data corruption aka 'dirty bit'. This problem can be resolved by using a special type of SSD that is designed to handle this situation. These SSDs have Tantalum Capacitors which means after power loss, the capacitors will continue providing power to the drive for a few seconds more so the drive can complete the write operation properly without a dirty bit leftover.

They are usually used in embedded and industrial systems. One such SSD is RECDATA Series 16 which you can pick up from Amazon for $29.99 (for the 64GB version). You will also need a USB 3.0 to 2.5" SATA adaptor cable which you can also get on Amazon for $10.95. (e.g. StarTech). So for $40 you got yourself a rock solid dashcam solution. Heck you can even unplug the drive from the USB while you drive and plug it back after a couple of minutes. No corruption, no issue and recording continues.

PS: Don't forget to format your drive as FAT32 with a freeware program like MiniTool Partition Wizard.


SSD.jpg
USBSATA Cable.jpg
 
https://www.amazon.com/gp/product/B007YX9O9O/ref=oh_aui_detailpage_o03_s01?ie=UTF8&psc=1

I used the 16 G option, formatted Fat 32 with windows 7pro

added folder with my laptop using windows 10

One thing that it may have to do with is the initial fat32 limitation of 32Gb and somehow Tesla may be encountering it. it may be the reason things got better for me, too. I reformatted the dash partition to be < 32Gb.

Although if there's indeed a power down without proper unmounting of the fs on write, this is all moot (but why then a small partition works?).
 
On 40.1. I have a 16GB USB I formatted as split 8GB/~8GB (remainder) for dashcam and music. To be fair it's a cheap POS Microcenter branded thumb drive I had laying around, so if it weren't for the fact the music keeps working, I'd just assume the drive went into limbo. I have found that although it is "USB 3.0", attempting to use it at USB 3.0 often tends to send the drive into limbo and you have to unplug and plug it again. But it works fine on USB 2.0 ports.

I have had it corrupt dashcam partition multiple times and indicate it's not working with the error symbol on the camera.

However today, it didn't record anything on my trip home from work except for a bunch of 2KB files in 1 minute increments, even though it indicated it was recording. I even tapped to save at one point because I saw someone do something dumb and wanted to send it to a friend for lulz, no error occurred, gave me the 'save' icon and ding, went back to 'recording' ...
 
On 40.1. I have a 16GB USB I formatted as split 8GB/~8GB (remainder) for dashcam and music. To be fair it's a cheap POS Microcenter branded thumb drive I had laying around, so if it weren't for the fact the music keeps working, I'd just assume the drive went into limbo. I have found that although it is "USB 3.0", attempting to use it at USB 3.0 often tends to send the drive into limbo and you have to unplug and plug it again. But it works fine on USB 2.0 ports.

I have had it corrupt dashcam partition multiple times and indicate it's not working with the error symbol on the camera.

However today, it didn't record anything on my trip home from work except for a bunch of 2KB files in 1 minute increments, even though it indicated it was recording. I even tapped to save at one point because I saw someone do something dumb and wanted to send it to a friend for lulz, no error occurred, gave me the 'save' icon and ding, went back to 'recording' ...
You can try to pull the "missing" data using a tool like PhotoRec - Digital Picture and File Recovery Since the file table is getting corrupted a tool like PhotoRec ignores it (file table).
 
I was having corruption errors about every other power up and down no matter wether I paused recording or not. I was also ignoring the USB error warnings from Windows 10 when I plugged in the drive.

After reading another post about fixing these errors, I have done this now every time I have removed the drive for viewing. So far I have not had any more corruption. (Knock on wood). After doing this I have started seeing the dashcam paused whenever I power up, just like when I powered down. I do not remember seeing this before.
 
One thing that it may have to do with is the initial fat32 limitation of 32Gb and somehow Tesla may be encountering it. it may be the reason things got better for me, too. I reformatted the dash partition to be < 32Gb.

Although if there's indeed a power down without proper unmounting of the fs on write, this is all moot (but why then a small partition works?).

The other thing that is unique about my installation:

I have dual wireless phone chargers installed, and I have a USB hub installed to accommodate it all. I have not saved any 10 minute clips to date.

I used this hub: https://www.amazon.com/gp/product/B01GKK4C52/ref=oh_aui_detailpage_o01_s00?ie=UTF8&psc=1
 
Last edited:
I reformatted my 32GB USB after corruption and shrank the partition a few GB. No idea if it matters but it's been a few days running fine so far.
I originally put in an old, big as thumb, sandisk 16GB drive in and it worked for a week plus without issue. I then got a new 64GB Samsung Fit that’s much smaller and I started getting grey X. Wonder if it’s better to use a smaller size/partition.
 
i put 31Gb with gparted for both partitions (MBR table) and it works fine so far with the latest 128Gb sandisk (using only half of it at the moment). I assume more partitions can be added for music if need be. If i get >= 32gb for music it fails to re-mount from time to time, and for dash i get fsck failures.
 
I am using a 16GB drive with the same corruption issues so I suggest the partition size is not the problem. When looking at the drive after it is corrupted it is very clear that it is the last file that is being corrupted, and almost certainly due to incorrect powering down as many have suggested. Hopefully Tesla will fix in s/w rather than us needing expensive drives with built-in shut down protection!
 
I am using a 16GB drive with the same corruption issues so I suggest the partition size is not the problem. When looking at the drive after it is corrupted it is very clear that it is the last file that is being corrupted, and almost certainly due to incorrect powering down as many have suggested. Hopefully Tesla will fix in s/w rather than us needing expensive drives with built-in shut down protection!

I had one occasion when the corrupted (unplayable) file was in the middle of the list of files. The drive was corrupted and would not record, but the last file played just fine.
 
I have tried multiple drives, my latest likely futile attempt is formatting with a real windows os ;)

I would have thought a bigger disk would go longer before the x of death but the drive has plenty of space left, I've never purposely saved a file yet

It's lame if true that the car is cutting power to the drive before it has done a flush and an unmount; I'll be curious to see if the expensive (relatively) full SSD drive works better than the smaller flash pen disks...
 
I'm using this USB stick (it's really tiny!): SanDisk Ultra Fit 64GB USB 3.0 Flash Drive - SDCZ43-064G-GAM46 . I bought a pair so that I can always leave one installed in the car if I ever needed to review recordings from the other.

https://www.amazon.com/gp/product/B01BGTG3JA/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

Why are you using such a large memory footprint? It only records for an hour and then writes over it.

Edit - Or maybe I misunderstand how it works/saves the vids?
 
Last edited: