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

Sentry Sucks USB Space

This site may earn commission on affiliate links.
Can you clarify what you mean by transfering a lot of video files at a time to my laptop/desktop?

Previously, I would only put in my USB flash drive to my laptop to delete old files so I have more room to record in the car. So I’m not sure if it being faster has any relevance to my situation.

For example, if you plug in your near full capacity M.2 into your laptop and dragged and dropped all of the contents into the desktop, it would be quicker to transfer. It has a higher sustained write/read speed versus smaller thumb drives. Especially when comparing stubby thumb drives with little heat dissipation, it will throttle the transfer speed to avoid overheating.
 
For example, if you plug in your near full capacity M.2 into your laptop and dragged and dropped all of the contents into the desktop, it would be quicker to transfer. It has a higher sustained write/read speed versus smaller thumb drives. Especially when comparing stubby thumb drives with little heat dissipation, it will throttle the transfer speed to avoid overheating.

Oh I see. Is there a reason you prefer M.2 over SATA?
 
Actually, probably not. FAT32, which is the only filesystem I know works with TeslaCam, has a 2TiB filesystem size limit. Thus, anything bigger than that will be wasted money. That said, perhaps it will work with some other filesystem. Personally, I tried it with ext4fs and it did not work, so that's out of the question, unless I erred in some way. Others have confirmed it does not work with exFAT. I doubt if it would work with NTFS or HFS+. Those are all the most likely filesystems, but maybe it'll work with something more obscure.



I've discovered that Tesla's computer does not unmount the filesystem when you stop recording. Thus, when you stop recording and pull the USB drive out, you're leaving the filesystem in an unsafe state, which is likely to cause filesystem corruption. You should always perform a filesystem check/repair on the filesystem when it's in such a state. Chances are that such an operation would have fixed the problem and gotten it working again for you, although I can't be 100% sure of that. (It could be it was so badly damaged in your case that a filesystem repair wouldn't have worked; or it could be that your drive is physically failing and creating a fresh filesystem just "plastered over" that problem.) I've found that the same is true of music media, even though those should probably be mounted read-only to avoid this problem (unless Tesla is storing file-playback position data or something on the music media).

Tesla really should provide a "safe eject" type option. Used properly, that would most likely eliminate these problems, or at least greatly reduce their frequency.

I’m pretty sure there is an unmounting function though I haven’t fully vetted it. When you want to remove the usb drive without issue, hold your finger on the dashcam icon at the top of the screen until it gives a little flash (similar to when you want to turn off the HVAC without opening up the entire menu). The red recording icon should change to grey after the ‘flash’. The last time I experimented with this I didn’t have any file corruption issues like we’re common when the dashcam function first came out though admittedly I haven’t removed my USB drive in months. Now that I’m finding out about these issues with running out of storage due to Sentry mode, I’ll have some more opportunities to test this out.
 
I’m pretty sure there is an unmounting function though I haven’t fully vetted it. When you want to remove the usb drive without issue, hold your finger on the dashcam icon at the top of the screen until it gives a little flash (similar to when you want to turn off the HVAC without opening up the entire menu). The red recording icon should change to grey after the ‘flash’. The last time I experimented with this I didn’t have any file corruption issues like we’re common when the dashcam function first came out though admittedly I haven’t removed my USB drive in months. Now that I’m finding out about these issues with running out of storage due to Sentry mode, I’ll have some more opportunities to test this out.

That does not unmount the filesystem. It might help mitigate problems by turning off the recording software, but the filesystem is not completely unmounted. This is revealed by use of a filesystem check tool, like dosfsck in Linux, which will report that the filesystem was not cleanly unmounted. I've had filesystem checks on the drive recover recordings after following that procedure, but never any worse corruption. (Caveat: I've had my Tesla for barely over a week, so there may well be a chance of worse corruption than I've seen under some circumstances, even when following the procedure you describe.)

Speaking more broadly, modern OSes, including the Linux used in Teslas, cache most or all filesystem accesses. This means that data written to the drive may not actually be written to the drive when the program writes the data. Instead, the OS can hold the data in memory until it's ready to write data. This is done to improve performance; it lets the OS write data in efficient batches rather than piecemeal. In some cases, data can be held in a cache for quite a while after the application has finished writing. The drawback is that, if you write to a removable medium like a USB drive, pulling it before the cache is flushed to the disk will result in filesystem damage. Unmounting the filesystem flushes the cache. Unmounting the filesystem also clears the "dirty bit," which is set when the filesystem is mounted so that the OS, and disk-repair tools, can identify when a filesystem was improperly unmounted. Every OS provides some way to unmount filesystems, although the name for the function varies. IIRC, Windows calls it "safely removing" the device, and in macOS it's "ejecting" a device. AFAIK, Tesla provides no UI element to do this for its TeslaCam or music devices. Turning off the recording and waiting a few seconds is likely to minimize the damage, because the cache is likely to be flushed in that time, but at the very least, the filesystem's "dirty bit" will be set. There's also no guarantee that the cache will be flushed in that time period. If not, filesystem damage will result, and I've seen that myself.

Note that I'm very familiar with this subject. (I'm the author of the GPT fdisk partitioning software, which manipulates disk partitions, although not filesystems; and I deal with Linux every day in my day job.) I can say with authority that filesystem damage is more-or-less guaranteed if you unplug your TeslaCam drive with anything resembling regularity. To repair the damage before it causes serious problems, use of a filesystem check tool whenever you unplug the drive will help.
 
  • Like
  • Informative
Reactions: whatthe2 and LBU03
That does not unmount the filesystem. It might help mitigate problems by turning off the recording software, but the filesystem is not completely unmounted. This is revealed by use of a filesystem check tool, like dosfsck in Linux, which will report that the filesystem was not cleanly unmounted. I've had filesystem checks on the drive recover recordings after following that procedure, but never any worse corruption. (Caveat: I've had my Tesla for barely over a week, so there may well be a chance of worse corruption than I've seen under some circumstances, even when following the procedure you describe.)

Speaking more broadly, modern OSes, including the Linux used in Teslas, cache most or all filesystem accesses. This means that data written to the drive may not actually be written to the drive when the program writes the data. Instead, the OS can hold the data in memory until it's ready to write data. This is done to improve performance; it lets the OS write data in efficient batches rather than piecemeal. In some cases, data can be held in a cache for quite a while after the application has finished writing. The drawback is that, if you write to a removable medium like a USB drive, pulling it before the cache is flushed to the disk will result in filesystem damage. Unmounting the filesystem flushes the cache. Unmounting the filesystem also clears the "dirty bit," which is set when the filesystem is mounted so that the OS, and disk-repair tools, can identify when a filesystem was improperly unmounted. Every OS provides some way to unmount filesystems, although the name for the function varies. IIRC, Windows calls it "safely removing" the device, and in macOS it's "ejecting" a device. AFAIK, Tesla provides no UI element to do this for its TeslaCam or music devices. Turning off the recording and waiting a few seconds is likely to minimize the damage, because the cache is likely to be flushed in that time, but at the very least, the filesystem's "dirty bit" will be set. There's also no guarantee that the cache will be flushed in that time period. If not, filesystem damage will result, and I've seen that myself.

Note that I'm very familiar with this subject. (I'm the author of the GPT fdisk partitioning software, which manipulates disk partitions, although not filesystems; and I deal with Linux every day in my day job.) I can say with authority that filesystem damage is more-or-less guaranteed if you unplug your TeslaCam drive with anything resembling regularity. To repair the damage before it causes serious problems, use of a filesystem check tool whenever you unplug the drive will help.

Gotcha. I am definitely not familiar with the details of this and so took it from a layman’s approach:
When I held the dashcam button before removing the drive from my car, I didn’t have file errors when I plugged the drive into my laptop to review the recordings.
When I didn’t hold the button, I would get file errors upon plugging in the drive on my laptop.​
Thanks for the insight
 
To repair the damage before it causes serious problems, use of a filesystem check tool whenever you unplug the drive will help.
Note that Tesla appears to run fsck on a connected USB drive at some point, as evidenced by *.rec files that are sometimes created in the root directory (presumably collecting lost clusters). But I often see filesystem errors anyway when plugging the TeslaCam device into a computer.
 
Gotcha. I am definitely not familiar with the details of this and so took it from a layman’s approach:
When I held the dashcam button before removing the drive from my car, I didn’t have file errors when I plugged the drive into my laptop to review the recordings.
When I didn’t hold the button, I would get file errors upon plugging in the drive on my laptop.​
Thanks for the insight

Unplugging the drive while a recording is in progress is definitely more likely to cause serious filesystem corruption than is pausing the recording, waiting a few seconds, and then pulling the drive.

Note that Tesla appears to run fsck on a connected USB drive at some point, as evidenced by *.rec files that are sometimes created in the root directory (presumably collecting lost clusters). But I often see filesystem errors anyway when plugging the TeslaCam device into a computer.

That's interesting. I've not seen that myself -- but in the ten days or so I've had my car, I've usually run dosfsck on the partition myself, once I figured out what was going on. Given that the Tesla computer can't know when you're about to pull the drive out, it would make the most sense to run dosfsck on the drive when it's mounted; or maybe when the computer is rebooted or when you begin a recording. If Tesla is running filesystem checks itself, then the need for us to do it ourselves is reduced, but it's probably still a good idea before writing to the filesystem (like deleting old unwanted recordings).
 
For the last month and a half, I had been just pulling the flash drive out (while dashcam is on recording with red dot) and plug it back after watching the videos on my android phone (via OTG) and deleting them. This is about twice a day. It seems to be working just fine... the camera with red dot always show up again after plugging in. And there is no problem on the videos. No .rec files anywhere to be found. If there is any problem with the file system, I am just not seeing it. I have not plug the flash drive into the computer also.. just to the phone.
 
any idea when sentry mode will learn to overwrite the old files so I don't have to delete my 32gb USB stick every 3 days?

Probably never?

Unlike the dash cam, there's no human there to decide if any clip is important, so it can't delete files without possibly overwriting something you didn't want it to. (for example if you left it at the airport for a week)
 
Yes, no problem.

Personally I prefer MicroSD cards because (a) you can use a tiny adapter like this one and not clutter up your front compartment and (b) there are adapters like this one that allow you to access and delete the videos on the card from an iPhone on the go. But apart from that, the M.2 SSD solution is perfectly fine.
Ordered this same setup. Works great. Thanks.
 
I hadn't realize that the problem with SSD card is that the minimum operating temperature for it is 0℃ (32℉), so it won't work well in the winter.

I think the best choice is the Endurance Samsung Micro SD for now unless anyone else have any other insight?
 
I hadn't realize that the problem with SSD card is that the minimum operating temperature for it is 0℃ (32℉), so it won't work well in the winter.

I think the best choice is the Endurance Samsung Micro SD for now unless anyone else have any other insight?
Yes, if you live in very cold climates, High Endurance MicroSD cards are the way to go. Several companies make them: SanDisk, Samsung, Transcend, Kingston etc.
 
  • Like
Reactions: skrtskrt
My current setup is a 16gb thumb drive, but it fills up in 3 days and stops recording.

I just picked this up. It's a MicroSD to usb adapter. The as card slides right in to the area where the USB plastic stopper usually resides. It plugs right in to the usb port on the car. The other end is a micro usb connector that will plug directly in to my phone. That way I don't have to bring the card to my computer to review and free up space. Just do it all on my phone.

My wife has the car right now so I haven't tested that part out yet, but the SD card is formatted as fat32 with the teslacam folder. Already verified I can access files from both usb connectors. I will report back if I have any problems with the car recognizing it.

20190414_143851.jpg
 
I've read through all the threads I can find, but couldn't find a definitive answer to this question...

If your USB drive fills up with Sentry Mode videos (i.e., there's no more space left and therefore it stops recording any new Sentry Mode videos), will it continue recording the 1 hour loop of dashcam videos? Or will the dashcam recordings cease as well?

And if the looping dashcam videos do continue, what happens if you try to save the previous 10 minutes of dashcam footage by tapping the camera icon on the screen? Will that work? And will the looping hour of recordings continue to record after that? Or...? :confused:

Edit: I think I found my own answer. Multiple people in this thread report that a USB drive full of Sentry Mode videos stops recording dashcam videos. (If anyone can dispute this or add some detail/context, please do.)
 
Last edited: